From 02b257e1fccb9bc2d7c8bf17fb5936d90d8a1939 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Mon, 12 Sep 2016 18:23:31 +0100 Subject: [PATCH] Fix audio playing stupidly fast - fixes #689 --- docs/docs.json | 2 +- src/client/voice/pcm/FfmpegConverterEngine.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/docs.json b/docs/docs.json index 61ca51aa6b1c..0d5689fa3572 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":13,"date":1473700085048},"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\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":129,"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":138,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\rif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":174,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\rIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":199,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":75,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":80,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":85,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":100,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":208,"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":217,"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":226,"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":237,"file":"Client.js","path":"src/client"},"props":[]}],"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:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":14,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\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":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":53,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":60,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":190,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":202,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":244,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":598,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":621,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":646,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or 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":91,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection","memberof":"VoiceConnection","examples":["// play files natively\rvoiceChannel.join()\r .then(connection => {\r const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\r })\r .catch(console.log);"],"meta":{"line":224,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"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":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#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","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#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":31,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":41,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":78,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":139,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":191,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"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":[],"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":22,"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":27,"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",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":52,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["null",""]]]},"params":[{"name":"amount","description":"The number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"The amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":36,"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":46,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\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.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\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.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\rpassword here.","memberof":"ClientUser","examples":["// set password\rclient.user.setPassword('password')\r .then(user => console.log('New password set!'))\r .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\rclient.user.setAvatar(fs.readFileSync('./avatar.png'))\r .then(user => console.log(`New avatar set!`))\r .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\rclient.user.setStatus('status', 'game')\r .then(user => console.log('Changed status!'))\r .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\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":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.\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":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>!\rconsole.log(`Hello from ${user}!`);"],"inherits":"User#toString","inherited":true,"meta":{"line":168,"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":92,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send 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":119,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","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:\r\r* **`online`** - user is online\r* **`offline`** - user is offline\r* **`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\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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":92,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send 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":119,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"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":139,"file":"TextBasedChannel.js","path":"src/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":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"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":189,"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":210,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","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":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":304,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to 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.","memberof":"DMChannel","meta":{"line":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":253,"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":261,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"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":87,"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":113,"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":92,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send 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":119,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"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":139,"file":"TextBasedChannel.js","path":"src/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":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"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":189,"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":210,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","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":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":304,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to 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.","memberof":"GroupDMChannel","meta":{"line":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"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#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":253,"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":261,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"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":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\rconst member = guild.member(message.author);"],"meta":{"line":246,"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#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":263,"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":277,"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":291,"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":305,"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":319,"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":333,"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":347,"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":361,"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":375,"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":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User",")>"]]]},"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":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":411,"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":419,"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":428,"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":442,"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#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":474,"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":493,"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\rguild.leave()\r .then(g => console.log(`Left the guild ${g}`))\r .catch(console.log);"],"meta":{"line":508,"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":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":528,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":539,"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":576,"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#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":198,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":225,"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":234,"file":"Guild.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":175,"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":187,"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":198,"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":208,"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":217,"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":226,"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":235,"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":244,"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":253,"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":262,"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":278,"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":287,"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":308,"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":316,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":324,"file":"GuildMember.js","path":"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":337,"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":348,"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":92,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send 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":119,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","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 meember 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#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":122,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":131,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":149,"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":157,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":343,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":434,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":376,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":382,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":388,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":394,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":400,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":417,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":438,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":"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":29,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":117,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":35,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"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":47,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":65,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":71,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":77,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":84,"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":92,"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":101,"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":109,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":255,"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 a 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":270,"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#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":278,"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":286,"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":300,"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":321,"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":342,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message 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":371,"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":14,"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":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":27,"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":37,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":43,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"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":56,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":68,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":74,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":86,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":92,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":104,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\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":196,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":204,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":212,"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":245,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","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":"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\rconsole.log(role.serialize());"],"meta":{"line":95,"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":116,"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":128,"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":142,"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":156,"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":170,"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":184,"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":198,"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":212,"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":225,"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":236,"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":251,"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#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":82,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":92,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send 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":119,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"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":139,"file":"TextBasedChannel.js","path":"src/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":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"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":189,"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":210,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","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":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":304,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to 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.","memberof":"TextChannel","meta":{"line":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":253,"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":261,"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.\rIt 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>!\rconsole.log(`Hello from ${user}!`);"],"meta":{"line":168,"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":92,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send 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":119,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","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:\r\r* **`online`** - user is online\r* **`offline`** - user is offline\r* **`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\rvoiceChannel.setBitrate(48000)\r .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\r .catch(console.log);"],"meta":{"line":47,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The 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":60,"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":70,"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#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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":21,"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":30,"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":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\rthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":50,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"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":66,"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('id', '123123...');","collection.find(val => val.id === '123123...');"],"meta":{"line":88,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"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.find('id', '123123...');","collection.find(val => val.id === '123123...');"],"meta":{"line":119,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"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('id', '123123...')) {\r console.log('user here!');\r}"],"meta":{"line":146,"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":158,"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":174,"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":191,"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#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":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",""]]]}}]}],"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"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":92,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text 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":119,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"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":139,"file":"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":171,"file":"TextBasedChannel.js","path":"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":189,"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":210,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The 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":304,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"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.","memberof":"TextBasedChannel","meta":{"line":322,"file":"TextBasedChannel.js","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":253,"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":261,"file":"TextBasedChannel.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":56,"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":73,"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":96,"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":113,"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":135,"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":183,"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":202,"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":203,"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 or sendTTSMessage:\r```js\r{\r tts: false,\r nonce: '',\r disable_everyone: false,\r split: false,\r};\r```","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",""]],[["SplitObject",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":44,"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\r`after` are mutually exclusive. All the parameters are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":151,"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":284,"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":357,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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 that can be passed to a client:\r```js\r{\r ws: {\r large_threshold: 250,\r compress: true,\r properties: {\r $os: process ? process.platform : 'discord.js',\r $browser: 'discord.js',\r $device: 'discord.js',\r $referrer: '',\r $referring_domain: '',\r },\r },\r protocol_version: 6,\r max_message_cache: 200,\r rest_ws_bridge_timeout: 5000,\r api_request_method: 'sequential', // can be sequential or burst\r shard_id: 0,\r shard_count: 0,\r fetch_all_members: false,\r disable_everyone: false,\r};\r```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[]}],"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"}],"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":1473701018316},"classes":[{"id":"Client","name":"Client","description":"The starting point for making a Discord Bot.","meta":{"line":17,"file":"Client.js","path":"src/client"},"extends":["EventEmitter"],"classConstructor":{"id":"Client()","name":"Client","memberof":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":{"types":[[["ClientOptions",""]]]}}]},"methods":[{"id":"Client#login","name":"login","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"meta":{"line":129,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["string",">"]]]},"params":[{"name":"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":138,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",""]]]},"params":[]},{"id":"Client#syncGuilds","name":"syncGuilds","description":"This shouldn't really be necessary to most developers as it is automatically invoked every 30 seconds, however\nif you wish to force a sync of Guild data, you can use this. Only applicable to user accounts.","memberof":"Client","meta":{"line":174,"file":"Client.js","path":"src/client"},"returns":{"types":[[["null",""]]]},"params":[{"name":"guilds","description":"An array of guilds to sync","optional":true,"type":{"types":[[["Array",".<"],["Guild",">"]]]}}]},{"id":"Client#fetchUser","name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\nIf the user isn't already cached, it will only be obtainable by OAuth bot accounts.","memberof":"Client","meta":{"line":189,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"id","description":"The ID of the user to obtain","type":{"types":[[["string",""]]]}}]},{"id":"Client#fetchInvite","name":"fetchInvite","description":"Fetches an invite object from an invite code.","memberof":"Client","meta":{"line":199,"file":"Client.js","path":"src/client"},"returns":{"types":[[["Promise",".<"],["Invite",", "],["Error",">"]]]},"params":[{"name":"code","description":"the invite code.","type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"Client#users","name":"users","description":"A Collection of the Client's stored users","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]},"meta":{"line":70,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#guilds","name":"guilds","description":"A Collection of the Client's stored guilds","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Guild",">"]]]},"meta":{"line":75,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#channels","name":"channels","description":"A Collection of the Client's stored channels","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["Channel",">"]]]},"meta":{"line":80,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#token","name":"token","description":"The authorization token for the logged in user/bot.","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":85,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#user","name":"user","description":"The ClientUser representing the logged in Client","memberof":"Client","type":{"types":[[["ClientUser",""]]]},"meta":{"line":90,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#email","name":"email","description":"The email, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":95,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#password","name":"password","description":"The password, if there is one, for the logged in Client","memberof":"Client","type":{"types":[[["string",""]]]},"meta":{"line":100,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#readyTime","name":"readyTime","description":"The date at which the Client was regarded as being in the `READY` state.","memberof":"Client","type":{"types":[[["Date",""]]]},"meta":{"line":105,"file":"Client.js","path":"src/client"},"props":[]},{"id":"Client#voiceConnections","name":"voiceConnections","description":"Returns a Collection, mapping Guild ID to Voice Connections.","memberof":"Client","type":{"types":[[["Collection",".<"],["string",", "],["VoiceConnection",">"]]]},"meta":{"line":208,"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":217,"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":226,"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":237,"file":"Client.js","path":"src/client"},"props":[]}],"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:guildCreate","name":"guildCreate","description":"Emitted whenever the client joins a Guild.","memberof":"Client","meta":{"line":25,"file":"ClientDataManager.js","path":"src/client"},"params":[{"name":"guild","description":"The created guild","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:channelCreate","name":"channelCreate","description":"Emitted whenever a Channel is created.","memberof":"Client","meta":{"line":14,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was created","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelDelete","name":"channelDelete","description":"Emitted whenever a Channel is deleted.","memberof":"Client","meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that was deleted","type":{"types":[[["Channel",""]]]}}]},{"id":"Client#event:channelPinsUpdate","name":"channelPinsUpdate","description":"Emitted whenever the pins of a Channel are updated. Due to the nature of the WebSocket event, not much information\ncan be provided easily here - you need to manually check the pins yourself.","memberof":"Client","meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel that the pins update occured in","type":{"types":[[["Channel",""]]]}},{"name":"time","description":"The time of the pins update","type":{"types":[[["Date",""]]]}}]},{"id":"Client#event:guildBanAdd","name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","memberof":"Client","meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the ban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was banned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildBanRemove","name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","memberof":"Client","meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the unban occurred in","type":{"types":[[["Guild",""]]]}},{"name":"user","description":"The user that was unbanned","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:guildDelete","name":"guildDelete","description":"Emitted whenever a Guild is deleted/left.","memberof":"Client","meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that was deleted","type":{"types":[[["Guild",""]]]}}]},{"id":"Client#event:guildMembersChunk","name":"guildMembersChunk","description":"Emitted whenever a chunk of Guild members is received","memberof":"Client","meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"guild","description":"The guild that the chunks relate to","type":{"types":[[["Guild",""]]]}},{"name":"members","description":"The members in the chunk","type":{"types":[[["Array",".<"],["GuildMember",">"]]]}}]},{"id":"Client#event:message","name":"message","description":"Emitted whenever a message is created","memberof":"Client","meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The created message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDelete","name":"messageDelete","description":"Emitted whenever a message is deleted","memberof":"Client","meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"message","description":"The deleted message","type":{"types":[[["Message",""]]]}}]},{"id":"Client#event:messageDeleteBulk","name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","memberof":"Client","meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}}]},{"id":"Client#event:presenceUpdate","name":"presenceUpdate","description":"Emitted whenever a user changes one of their details or starts/stop playing a game","memberof":"Client","meta":{"line":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":53,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user started typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that started typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:typingStop","name":"typingStop","description":"Emitted whenever a user stops typing in a channel","memberof":"Client","meta":{"line":60,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"channel","description":"The channel the user stopped typing in","type":{"types":[[["Channel",""]]]}},{"name":"user","description":"The user that stopped typing","type":{"types":[[["User",""]]]}}]},{"id":"Client#event:voiceStateUpdate","name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","memberof":"Client","meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"},"params":[{"name":"oldMember","description":"The member before the voice state update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the voice state update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:error","name":"error","description":"Emitted whenever the Client encounters a serious connection error","memberof":"Client","meta":{"line":190,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"Client#event:ready","name":"ready","description":"Emitted when the Client becomes ready to start working","memberof":"Client","meta":{"line":202,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:reconnecting","name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","memberof":"Client","meta":{"line":244,"file":"WebSocketManager.js","path":"src/client/websocket"},"params":[]},{"id":"Client#event:guildMemberAdd","name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","memberof":"Client","meta":{"line":598,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the user has joined","type":{"types":[[["Guild",""]]]}},{"name":"member","description":"The member that has joined","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberUpdate","name":"guildMemberUpdate","description":"Emitted whenever a Guild Member changes - i.e. new role, removed role, nickname","memberof":"Client","meta":{"line":621,"file":"Guild.js","path":"src/structures"},"params":[{"name":"guild","description":"The guild that the update affects","type":{"types":[[["Guild",""]]]}},{"name":"oldMember","description":"The member before the update","type":{"types":[[["GuildMember",""]]]}},{"name":"newMember","description":"The member after the update","type":{"types":[[["GuildMember",""]]]}}]},{"id":"Client#event:guildMemberSpeaking","name":"guildMemberSpeaking","description":"Emitted once a Guild Member starts/stops speaking","memberof":"Client","meta":{"line":646,"file":"Guild.js","path":"src/structures"},"params":[{"name":"member","description":"The member that started/stopped speaking","type":{"types":[[["GuildMember",""]]]}},{"name":"speaking","description":"Whether or 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":91,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"The reason of the disconnection","optional":true,"type":{"types":[[["string",""]]]}}]},{"id":"VoiceConnection#playFile","name":"playFile","description":"Play the given file in the voice connection","memberof":"VoiceConnection","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.log);"],"meta":{"line":224,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["StreamDispatcher",""]]]},"params":[{"name":"file","description":"The path to the file","type":{"types":[[["string",""]]]}},{"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":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#playConvertedStream","name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","memberof":"VoiceConnection","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#createReceiver","name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","memberof":"VoiceConnection","meta":{"line":267,"file":"VoiceConnection.js","path":"src/client/voice"},"returns":{"types":[[["VoiceReceiver",""]]]},"params":[]}],"properties":[{"id":"VoiceConnection#player","name":"player","description":"The player","memberof":"VoiceConnection","type":{"types":[[["BasePlayer",""]]]},"meta":{"line":31,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#endpoint","name":"endpoint","description":"The endpoint of the connection","memberof":"VoiceConnection","type":{"types":[[["string",""]]]},"meta":{"line":36,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#channel","name":"channel","description":"The VoiceChannel for this connection","memberof":"VoiceConnection","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":41,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]},{"id":"VoiceConnection#ready","name":"ready","description":"Whether or not the connection is ready","memberof":"VoiceConnection","type":{"types":[[["boolean",""]]]},"meta":{"line":52,"file":"VoiceConnection.js","path":"src/client/voice"},"props":[]}],"events":[{"id":"VoiceConnection#event:error","name":"error","description":"Emitted whenever the connection encounters a fatal error.","memberof":"VoiceConnection","meta":{"line":78,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:disconnected","name":"disconnected","description":"Emit once the voice connection has disconnected.","memberof":"VoiceConnection","meta":{"line":115,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"error","description":"The encountered error, if any","type":{"types":[[["Error",""]]]}}]},{"id":"VoiceConnection#event:ready","name":"ready","description":"Emitted once the connection is ready (joining voice channels resolves when the connection is ready anyway)","memberof":"VoiceConnection","meta":{"line":139,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[]},{"id":"VoiceConnection#event:speaking","name":"speaking","description":"Emitted whenever a user starts/stops speaking","memberof":"VoiceConnection","meta":{"line":191,"file":"VoiceConnection.js","path":"src/client/voice"},"params":[{"name":"user","description":"The user that has started/stopped speaking","type":{"types":[[["User",""]]]}},{"name":"speaking","description":"Whether or not the user is speaking","type":{"types":[[["boolean",""]]]}}]}]},{"id":"Shard","name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","meta":{"line":7,"file":"Shard.js","path":"src/sharding"},"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":[],"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":22,"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":27,"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",""]]]}}]},"methods":[{"id":"ShardingManager#createShard","name":"createShard","description":"Spawns a single shard.","memberof":"ShardingManager","meta":{"line":52,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["null",""]]]},"params":[]},{"id":"ShardingManager#spawn","name":"spawn","description":"Spawns multiple shards.","memberof":"ShardingManager","meta":{"line":63,"file":"ShardingManager.js","path":"src/sharding"},"returns":{"types":[[["null",""]]]},"params":[{"name":"amount","description":"The number of shards to spawn","optional":true,"type":{"types":[[["number",""]]]}}]}],"properties":[{"id":"ShardingManager#file","name":"file","description":"Path to the shard script file","memberof":"ShardingManager","type":{"types":[[["string",""]]]},"meta":{"line":26,"file":"ShardingManager.js","path":"src/sharding"},"props":[]},{"id":"ShardingManager#totalShards","name":"totalShards","description":"The amount of shards that this manager is going to spawn","memberof":"ShardingManager","type":{"types":[[["number",""]]]},"meta":{"line":36,"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":46,"file":"ShardingManager.js","path":"src/sharding"},"props":[]}],"events":[]},{"id":"Channel","name":"Channel","description":"Represents any Channel on Discord","meta":{"line":4,"file":"Channel.js","path":"src/structures"},"methods":[{"id":"Channel#delete","name":"delete","description":"Deletes the channel","memberof":"Channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"meta":{"line":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":168,"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":92,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send 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":119,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":92,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send 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":119,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"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":139,"file":"TextBasedChannel.js","path":"src/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":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"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":189,"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":210,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","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":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":304,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to 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.","memberof":"DMChannel","meta":{"line":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":253,"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":261,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"DMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"DMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"DMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `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":87,"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":113,"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":92,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send 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":119,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"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":139,"file":"TextBasedChannel.js","path":"src/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":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"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":189,"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":210,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","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":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":304,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to 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.","memberof":"GroupDMChannel","meta":{"line":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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#owner","name":"owner","description":"The owner of this Group DM.","memberof":"GroupDMChannel","type":{"types":[[["User",""]]]},"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#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":253,"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":261,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"GroupDMChannel#client","name":"client","description":"The client that instantiated the Channel","memberof":"GroupDMChannel","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"Channel.js","path":"src/structures"},"props":[]},{"id":"GroupDMChannel#type","name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `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":246,"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#edit","name":"edit","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"meta":{"line":263,"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":277,"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":291,"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":305,"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":319,"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":333,"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":347,"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":361,"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":375,"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":389,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<("],["GuildMember","|"],["User",")>"]]]},"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":403,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["User",">"]]]},"params":[{"name":"user","description":"The user to unban","type":{"types":[[["UserResolvable",""]]]}}]},{"id":"Guild#fetchBans","name":"fetchBans","description":"Fetch a Collection of banned users in this Guild.","memberof":"Guild","meta":{"line":411,"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":419,"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":428,"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":442,"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#createChannel","name":"createChannel","description":"Creates a new Channel in the Guild.","memberof":"Guild","examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"meta":{"line":474,"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":493,"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":508,"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":521,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Guild",">"]]]},"params":[]},{"id":"Guild#sync","name":"sync","description":"Syncs this guild (already done automatically every 30 seconds). Only applicable to user accounts.","memberof":"Guild","meta":{"line":528,"file":"Guild.js","path":"src/structures"},"returns":{"types":[[["null",""]]]},"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":539,"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":576,"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#creationDate","name":"creationDate","description":"The time the guild was created","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":198,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#joinDate","name":"joinDate","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"types":[[["Date",""]]]},"meta":{"line":206,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#iconURL","name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","memberof":"Guild","type":{"types":[[["string",""]]]},"meta":{"line":215,"file":"Guild.js","path":"src/structures"},"props":[]},{"id":"Guild#owner","name":"owner","description":"The owner of the Guild","memberof":"Guild","type":{"types":[[["GuildMember",""]]]},"meta":{"line":225,"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":234,"file":"Guild.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":175,"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":187,"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":198,"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":208,"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":217,"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":226,"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":235,"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":244,"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":253,"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":262,"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":278,"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":287,"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":308,"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":316,"file":"GuildMember.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["DMChannel",">"]]]},"params":[]},{"id":"GuildMember#kick","name":"kick","description":"Kick this member from the Guild","memberof":"GuildMember","meta":{"line":324,"file":"GuildMember.js","path":"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":337,"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":348,"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":92,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send 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":119,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","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 meember 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#mute","name":"mute","description":"Whether this member is muted in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":122,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#deaf","name":"deaf","description":"Whether this member is deafened in any way","memberof":"GuildMember","type":{"types":[[["boolean",""]]]},"meta":{"line":131,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#voiceChannel","name":"voiceChannel","description":"The voice channel this member is in, if any","memberof":"GuildMember","type":{"types":[[["VoiceChannel",""]]]},"meta":{"line":140,"file":"GuildMember.js","path":"src/structures"},"props":[]},{"id":"GuildMember#id","name":"id","description":"The ID of this User","memberof":"GuildMember","type":{"types":[[["string",""]]]},"meta":{"line":149,"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":157,"file":"GuildMember.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageCollector","name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","meta":{"line":343,"file":"TextBasedChannel.js","path":"src/structures/interface"},"extends":["EventEmitter"],"classConstructor":{"id":"MessageCollector()","name":"MessageCollector","memberof":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":{"types":[[["Channel",""]]]}},{"name":"filter","description":"The filter function","type":{"types":[[["CollectorFilterFunction",""]]]}},{"name":"options","description":"Options for the collector","optional":true,"type":{"types":[[["CollectorOptions",""]]]}}]},"methods":[{"id":"MessageCollector#stop","name":"stop","description":"Stops the collector and emits `end`.","memberof":"MessageCollector","meta":{"line":434,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"type":{"types":[[["string",""]]]}}]}],"properties":[{"id":"MessageCollector#channel","name":"channel","description":"The channel this collector is operating on","memberof":"MessageCollector","type":{"types":[[["Channel",""]]]},"meta":{"line":376,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#filter","name":"filter","description":"A function used to filter messages that the collector collects.","memberof":"MessageCollector","type":{"types":[[["CollectorFilterFunction",""]]]},"meta":{"line":382,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#options","name":"options","description":"Options for the collecor.","memberof":"MessageCollector","type":{"types":[[["CollectorOptions",""]]]},"meta":{"line":388,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#ended","name":"ended","description":"Whether this collector has stopped collecting Messages.","memberof":"MessageCollector","type":{"types":[[["boolean",""]]]},"meta":{"line":394,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]},{"id":"MessageCollector#collected","name":"collected","description":"A collection of collected messages, mapped by message ID.","memberof":"MessageCollector","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]},"meta":{"line":400,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[{"id":"MessageCollector#event:message","name":"message","description":"Emitted whenever the Collector receives a Message that passes the filter test.","memberof":"MessageCollector","meta":{"line":417,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"message","description":"The received message","type":{"types":[[["Message",""]]]}},{"name":"collector","description":"The collector the message passed through","type":{"types":[[["MessageCollector",""]]]}}]},{"id":"MessageCollector#event:end","name":"end","description":"Emitted when the Collector stops collecting.","memberof":"MessageCollector","meta":{"line":438,"file":"TextBasedChannel.js","path":"src/structures/interface"},"params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the Collector, mapped by the ID of the Messages.","type":{"types":[[["Collection",".<"],["string",", "],["Message",">"]]]}},{"name":"reason","description":"The reason for the end of the collector. If it ended because it reached the specified time\nlimit, this would be `time`. If you invoke `.stop()` without specifying a reason, this would be `user`. If it\nended because it reached its message limit, it will be `limit`.","type":{"types":[[["string",""]]]}}]}]},{"id":"Invite","name":"Invite","description":"Represents an Invitation to a Guild Channel.\nThe only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.","meta":{"line":29,"file":"Invite.js","path":"src/structures"},"methods":[{"id":"Invite#delete","name":"delete","description":"Deletes this invite","memberof":"Invite","meta":{"line":117,"file":"Invite.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["Invite",">"]]]},"params":[]}],"properties":[{"id":"Invite#client","name":"client","description":"The client that instantiated the invite","memberof":"Invite","type":{"types":[[["Client",""]]]},"meta":{"line":35,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#guild","name":"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":47,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#code","name":"code","description":"The code for this invite","memberof":"Invite","type":{"types":[[["string",""]]]},"meta":{"line":53,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#temporary","name":"temporary","description":"Whether or not this invite is temporary","memberof":"Invite","type":{"types":[[["boolean",""]]]},"meta":{"line":59,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxAge","name":"maxAge","description":"The maximum age of the invite, in seconds","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":65,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#uses","name":"uses","description":"How many times this invite has been used","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":71,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#maxUses","name":"maxUses","description":"The maximum uses of this invite","memberof":"Invite","type":{"types":[[["number",""]]]},"meta":{"line":77,"file":"Invite.js","path":"src/structures"},"props":[]},{"id":"Invite#inviter","name":"inviter","description":"The user who created this invite","memberof":"Invite","type":{"types":[[["User",""]]]},"meta":{"line":84,"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":92,"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":101,"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":109,"file":"Invite.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"Message","name":"Message","description":"Represents a Message on Discord","meta":{"line":8,"file":"Message.js","path":"src/structures"},"methods":[{"id":"Message#isMentioned","name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","memberof":"Message","meta":{"line":255,"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 a message","memberof":"Message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"meta":{"line":270,"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#pin","name":"pin","description":"Pins this message to the channel's pinned messages","memberof":"Message","meta":{"line":278,"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":286,"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":300,"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":321,"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":342,"file":"Message.js","path":"src/structures"},"returns":{"types":[[["boolean",""]]]},"params":[{"name":"message","description":"The message 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":371,"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":14,"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":21,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#guild","name":"guild","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"types":[[["Guild",""]]]},"meta":{"line":27,"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":37,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#content","name":"content","description":"The content of the message","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":43,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#author","name":"author","description":"The author of the message","memberof":"Message","type":{"types":[[["User",""]]]},"meta":{"line":49,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"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":56,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#pinned","name":"pinned","description":"Whether or not this message is pinned","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":62,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#tts","name":"tts","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":68,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#nonce","name":"nonce","description":"A random number used for checking message delivery","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":74,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#system","name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","memberof":"Message","type":{"types":[[["boolean",""]]]},"meta":{"line":80,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#embeds","name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"types":[[["Array",".<"],["Embed",">"]]]},"meta":{"line":86,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#attachments","name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","memberof":"Message","type":{"types":[[["Collection",".<"],["string",", "],["MessageAttachment",">"]]]},"meta":{"line":92,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#mentions","name":"mentions","description":"An object containing a further users, roles or channels collections","memberof":"Message","type":{"types":[[["Object",""]]]},"meta":{"line":104,"file":"Message.js","path":"src/structures"},"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":{"types":[[["Collection",".<"],["string",", "],["User",">"]]]}},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":{"types":[[["Collection",".<"],["string",", "],["Role",">"]]]}},{"name":"mentions.channels","description":"Mentioned channels,\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":196,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#editedTimestamp","name":"editedTimestamp","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"types":[[["Date",""]]]},"meta":{"line":204,"file":"Message.js","path":"src/structures"},"props":[]},{"id":"Message#cleanContent","name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text.","memberof":"Message","type":{"types":[[["string",""]]]},"meta":{"line":212,"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":245,"file":"Message.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"MessageAttachment","name":"MessageAttachment","description":"Represents an Attachment in a Message","meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"},"methods":[],"properties":[{"id":"MessageAttachment#client","name":"client","description":"The Client that instantiated this Message.","memberof":"MessageAttachment","type":{"types":[[["Client",""]]]},"meta":{"line":10,"file":"MessageAttachment.js","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":"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":95,"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":116,"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":128,"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":142,"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":156,"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":170,"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":184,"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":198,"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":212,"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":225,"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":236,"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":251,"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#creationDate","name":"creationDate","description":"The time the role was created","memberof":"Role","type":{"types":[[["Date",""]]]},"meta":{"line":73,"file":"Role.js","path":"src/structures"},"props":[]},{"id":"Role#hexColor","name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","memberof":"Role","type":{"types":[[["string",""]]]},"meta":{"line":82,"file":"Role.js","path":"src/structures"},"props":[]}],"events":[]},{"id":"TextChannel","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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":92,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send 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":119,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"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":139,"file":"TextBasedChannel.js","path":"src/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":171,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"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":189,"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":210,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"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":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["null",""]]]},"params":[{"name":"force","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":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The filter to create the 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":304,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"The filter function to 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.","memberof":"TextChannel","meta":{"line":322,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":253,"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":261,"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":168,"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"content","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":92,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text message to send 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":119,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"types":[[["string",""]]]}},{"name":"content","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":47,"file":"VoiceChannel.js","path":"src/structures"},"returns":{"types":[[["Promise",".<"],["VoiceChannel",">"]]]},"params":[{"name":"bitrate","description":"The new bitrate","type":{"types":[[["number",""]]]}}]},{"id":"VoiceChannel#join","name":"join","description":"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":60,"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":70,"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#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#first","name":"first","description":"Returns the first item in this collection.","memberof":"Collection","meta":{"line":21,"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":30,"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":40,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[]},{"id":"Collection#deleteAll","name":"deleteAll","description":"If the items in this collection have a delete method (e.g. messages), invoke\nthe delete method. Returns an array of promises","memberof":"Collection","meta":{"line":50,"file":"Collection.js","path":"src/util"},"returns":{"types":[[["Array",".<"],["Promise",">"]]]},"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":66,"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('id', '123123...');","collection.find(val => val.id === '123123...');"],"meta":{"line":88,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"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.find('id', '123123...');","collection.find(val => val.id === '123123...');"],"meta":{"line":119,"file":"Collection.js","path":"src/util"},"returns":{"types":[["*",""]]},"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":{"types":[[["string",""]],[["function",""]]]}},{"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('id', '123123...')) {\n console.log('user here!');\n}"],"meta":{"line":146,"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":158,"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":174,"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":191,"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#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":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",""]]]}}]}],"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":64,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"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":79,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"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":92,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Message",">"]]]},"params":[{"name":"attachment","description":"The file to send","type":{"types":[[["FileResolvable",""]]]}},{"name":"fileName","description":"The name and extension of the file","optional":true,"type":{"types":[[["string",""]]]}},{"name":"content","description":"Text 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":119,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<("],["Message","|"],["Array",".<"],["Message",">)>"]]]},"params":[{"name":"lang","description":"Language for the code block","type":{"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":139,"file":"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":171,"file":"TextBasedChannel.js","path":"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":189,"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":210,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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":238,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["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":280,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["MessageCollector",""]]]},"params":[{"name":"filter","description":"The 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":304,"file":"TextBasedChannel.js","path":"src/structures/interface"},"returns":{"types":[[["Promise",".<"],["Collection",".<"],["string",", "],["Message",">>"]]]},"params":[{"name":"filter","description":"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.","memberof":"TextBasedChannel","meta":{"line":322,"file":"TextBasedChannel.js","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":253,"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":261,"file":"TextBasedChannel.js","path":"src/structures/interface"},"props":[]}],"events":[]}],"typedefs":[{"id":"UserResolvable","name":"UserResolvable","description":"Data that resolves to give a User object. This can 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":56,"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":73,"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":96,"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":113,"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":135,"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":183,"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":202,"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":203,"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 or sendTTSMessage:\n```js\n{\n tts: false,\n nonce: '',\n disable_everyone: false,\n split: false,\n};\n```","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",""]],[["SplitObject",""]]]}}]},{"id":"SplitOptions","name":"SplitOptions","description":"Options for splitting a message","type":{"types":[[["Object",""]]]},"meta":{"line":44,"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":151,"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":284,"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":344,"file":"TextBasedChannel.js","path":"src/structures/interface"},"properties":[]},{"id":"CollectorOptions","name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":{"types":[[["Object",""]]]},"meta":{"line":357,"file":"TextBasedChannel.js","path":"src/structures/interface"},"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 that can be passed to a client:\n```js\n{\n ws: {\n large_threshold: 250,\n compress: true,\n properties: {\n $os: process ? process.platform : 'discord.js',\n $browser: 'discord.js',\n $device: 'discord.js',\n $referrer: '',\n $referring_domain: '',\n },\n },\n protocol_version: 6,\n max_message_cache: 200,\n rest_ws_bridge_timeout: 5000,\n api_request_method: 'sequential', // can be sequential or burst\n shard_id: 0,\n shard_count: 0,\n fetch_all_members: false,\n disable_everyone: false,\n};\n```","type":{"types":[[["Object",""]]]},"meta":{"line":1,"file":"Constants.js","path":"src/util"},"properties":[]}],"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"}],"examples":[{"category":"examples","name":"Ping Pong","data":"```js\n/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // 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/pcm/FfmpegConverterEngine.js b/src/client/voice/pcm/FfmpegConverterEngine.js index ab03e29862a0..ed854a8f2734 100644 --- a/src/client/voice/pcm/FfmpegConverterEngine.js +++ b/src/client/voice/pcm/FfmpegConverterEngine.js @@ -20,6 +20,7 @@ class FfmpegConverterEngine extends ConverterEngine { '-i', '-', '-f', 's16le', '-ar', '48000', + '-ac', '2', '-ss', String(seek), 'pipe:1', ], { stdio: ['pipe', 'pipe', 'ignore'] });