discord.js/11.0.0.json
2020-08-15 20:21:27 +02:00

1 line
306 KiB
JSON

{"meta":{"generator":"0.6.2","format":19,"date":1483030707654},"custom":{"general":{"name":"General","files":{"welcome":{"name":"Welcome","type":"md","content":"<div align=\"center\">\n <br />\n <p>\n <a href=\"https://discord.js.org\"><img src=\"https://discord.js.org/static/logo.svg\" width=\"546\" alt=\"discord.js\" /></a>\n </p>\n <br />\n <p>\n <a href=\"https://discord.gg/bRCvFy9\"><img src=\"https://discordapp.com/api/guilds/222078108977594368/embed.png\" alt=\"Discord server\" /></a>\n <a href=\"https://www.npmjs.com/package/discord.js\"><img src=\"https://img.shields.io/npm/v/discord.js.svg?maxAge=3600\" alt=\"NPM version\" /></a>\n <a href=\"https://www.npmjs.com/package/discord.js\"><img src=\"https://img.shields.io/npm/dt/discord.js.svg?maxAge=3600\" alt=\"NPM downloads\" /></a>\n <a href=\"https://travis-ci.org/hydrabolt/discord.js\"><img src=\"https://travis-ci.org/hydrabolt/discord.js.svg\" alt=\"Build status\" /></a>\n <a href=\"https://david-dm.org/hydrabolt/discord.js\"><img src=\"https://img.shields.io/david/hydrabolt/discord.js.svg?maxAge=3600\" alt=\"Dependencies\" /></a>\n </p>\n <p>\n <a href=\"https://nodei.co/npm/discord.js/\"><img src=\"https://nodei.co/npm/discord.js.png?downloads=true&stars=true\" alt=\"NPM info\" /></a>\n </p>\n</div>\n\n# Welcome!\nWelcome to the discord.js v10 documentation.\nv10 is just a more consistent and stable iteration over v9, and contains loads of new and improved features, optimisations, and bug fixes.\n\n## About\ndiscord.js is a powerful node.js module that allows you to interact with the\n[Discord API](https://discordapp.com/developers/docs/intro) very easily.\n\n- Object-oriented\n- Predictable abstractions\n- Performant\n- Nearly 100% coverage of the Discord API\n\n## Installation\n**Node.js 6.0.0 or newer is required.** \nIgnore any warnings about unmet peer dependencies - all of them are optional.\n\nWithout voice support: `npm install discord.js --save` \nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus --save` \nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript --save`\n\n### Audio engines\nThe preferred audio engine is node-opus, as it performs significantly better than opusscript. When both are available, discord.js will automatically choose node-opus.\nUsing opusscript is only recommended for development environments where node-opus is tough to get working.\nFor production bots, using node-opus should be considered a necessity, especially if they're going to be running on multiple servers.\n\n### Optional packages\n- [uws](https://www.npmjs.com/package/uws) for much a much faster WebSocket connection (`npm install uws --save`)\n- [erlpack](https://github.com/hammerandchisel/erlpack) for significantly faster WebSocket data (de)serialisation (`npm install hammerandchisel/erlpack --save`)\n\n## Web distributions\nWeb builds of discord.js that are fully capable of running in browsers are available [here](https://github.com/hydrabolt/discord.js/tree/webpack).\nThese are built by [Webpack 2](https://webpack.js.org/). The API is identical, but rather than using `require('discord.js')`,\nthe entire `Discord` object is available as a global (on the `window` object).\nThe ShardingManager and any voice-related functionality is unavailable in these builds.\n\n## Guides\n* [LuckyEvie's general guide](https://eslachance.gitbooks.io/discord-js-bot-guide/content/)\n* [York's v9 upgrade guide](https://yorkaargh.wordpress.com/2016/09/03/updating-discord-js-bots/)\n\n## Links\n* [Website](https://discord.js.org/)\n* [Discord.js server](https://discord.gg/bRCvFy9)\n* [Discord API server](https://discord.gg/rV4BwdK)\n* [Documentation](https://discord.js.org/#/docs)\n* [Legacy (v8) documentation](http://discordjs.readthedocs.io/en/8.2.0/docs_client.html)\n* [Examples](https://github.com/hydrabolt/discord.js/tree/master/docs/examples)\n* [GitHub](https://github.com/hydrabolt/discord.js)\n* [NPM](https://www.npmjs.com/package/discord.js)\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\n\n## Help\nIf you don't understand something in the documentation, you are experiencing problems, or you just need a gentle\nnudge in the right direction, please don't hesitate to join our official [Discord.js Server](https://discord.gg/bRCvFy9).\n","path":"docs/general/welcome.md"},"updating":{"name":"Updating your code","type":"md","content":"# Version 10\nVersion 10's non-BC changes focus on cleaning up some inconsistencies that exist in previous versions.\nUpgrading from v9 should be quick and painless.\n\n## Client options\nAll client options have been converted to camelCase rather than snake_case, and `max_message_cache` was renamed to `messageCacheMaxSize`.\n\nv9 code example:\n```js\nconst client = new Discord.Client({\n disable_everyone: true,\n max_message_cache: 500,\n message_cache_lifetime: 120,\n message_sweep_interval: 60\n});\n```\n\nv10 code example:\n```js\nconst client = new Discord.Client({\n disableEveryone: true,\n messageCacheMaxSize: 500,\n messageCacheLifetime: 120,\n messageSweepInterval: 60\n});\n```\n\n## Presences\nPresences have been completely restructured.\nPrevious versions of discord.js assumed that users had the same presence amongst all guilds - with the introduction of sharding, however, this is no longer the case.\n\nv9 discord.js code may look something like this:\n```js\nUser.status; // the status of the user\nUser.game; // the game that the user is playing\nClientUser.setStatus(status, game, url); // set the new status for the user\n```\n\nv10 moves presences to GuildMember instances. For the sake of simplicity, though, User classes also expose presences.\nWhen accessing a presence on a User object, it simply finds the first GuildMember for the user, and uses its presence.\nAdditionally, the introduction of the Presence class keeps all of the presence data organised.\n\n**It is strongly recommended that you use a GuildMember's presence where available, rather than a User.\nA user may have an entirely different presence between two different guilds.**\n\nv10 code:\n```js\nMemberOrUser.presence.status; // the status of the member or user\nMemberOrUser.presence.game; // the game that the member or user is playing\nClientUser.setStatus(status); // online, idle, dnd, offline\nClientUser.setGame(game, streamingURL); // a game\nClientUser.setPresence(fullPresence); // status and game combined\n```\n\n## Voice\nVoice has been rewritten internally, but in a backwards-compatible manner.\nThere is only one breaking change here; the `disconnected` event was renamed to `disconnect`.\nSeveral more events have been made available to a VoiceConnection, so see the documentation.\n\n## Events\nMany events have been renamed or had their arguments change.\n\n### Client events\n| Version 9 | Version 10 |\n|------------------------------------------------------|-----------------------------------------------|\n| guildMemberAdd(guild, member) | guildMemberAdd(member) |\n| guildMemberAvailable(guild, member) | guildMemberAvailable(member) |\n| guildMemberRemove(guild, member) | guildMemberRemove(member) |\n| guildMembersChunk(guild, members) | guildMembersChunk(members) |\n| guildMemberUpdate(guild, oldMember, newMember) | guildMemberUpdate(oldMember, newMember) |\n| guildRoleCreate(guild, role) | roleCreate(role) |\n| guildRoleDelete(guild, role) | roleDelete(role) |\n| guildRoleUpdate(guild, oldRole, newRole) | roleUpdate(oldRole, newRole) |\n\nThe guild parameter that has been dropped from the guild-related events can still be derived using `member.guild` or `role.guild`.\n\n### VoiceConnection events\n| Version 9 | Version 10 |\n|--------------|------------|\n| disconnected | disconnect |\n\n## Dates and timestamps\nAll dates/timestamps on the structures have been refactored to have a consistent naming scheme and availability.\nAll of them are named similarly to this: \n**Date:** `Message.createdAt` \n**Timestamp:** `Message.createdTimestamp` \nSee the docs for each structure to see which date/timestamps are available on them.\n\n\n# Version 9\nThe version 9 (v9) rewrite takes a much more object-oriented approach than previous versions,\nwhich allows your code to be much more readable and manageable.\nIt's been rebuilt from the ground up and should be much more stable, fixing caching issues that affected\nolder versions. It also has support for newer Discord Features, such as emojis.\n\nVersion 9, while containing a sizable number of breaking changes, does not require much change in your code's logic -\nmost of the concepts are still the same, but loads of functions have been moved around.\nThe vast majority of methods you're used to using have been moved out of the Client class,\ninto other more relevant classes where they belong.\nBecause of this, you will need to convert most of your calls over to the new methods.\n\nHere are a few examples of methods that have changed:\n* `Client.sendMessage(channel, message)` ==> `TextChannel.sendMessage(message)`\n * `Client.sendMessage(user, message)` ==> `User.sendMessage(message)`\n* `Client.updateMessage(message, \"New content\")` ==> `Message.edit(\"New Content\")`\n* `Client.getChannelLogs(channel, limit)` ==> `TextChannel.fetchMessages({options})`\n* `Server.detailsOfUser(User)` ==> `Server.members.get(User).properties` (retrieving a member gives a GuildMember object)\n* `Client.joinVoiceChannel(voicechannel)` => `VoiceChannel.join()`\n\nA couple more important details:\n* `Client.loginWithToken(\"token\")` ==> `client.login(\"token\")`\n* `Client.servers.length` ==> `client.guilds.size` (all instances of `server` are now `guild`)\n\n## No more callbacks!\nVersion 9 eschews callbacks in favour of Promises. This means all code relying on callbacks must be changed. \nFor example, the following code:\n\n```js\nclient.getChannelLogs(channel, 100, function(messages) {\n console.log(`${messages.length} messages found`);\n});\n```\n\n```js\nchannel.fetchMessages({limit: 100}).then(messages => {\n console.log(`${messages.size} messages found`);\n});\n```\n","path":"docs/general/updating.md"},"faq":{"name":"FAQ","type":"md","content":"# Frequently Asked Questions\nThese are just questions that get asked frequently, that usually have a common resolution.\nIf you have issues not listed here, please ask in the [official Discord server](https://discord.gg/bRCvFy9).\nAlways make sure to read the documentation.\n\n## No matter what, I get `SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode`‽\nUpdate to Node.js 6.0.0 or newer.\n\n## How do I get voice working?\n- Install FFMPEG.\n- Install either the `node-opus` package or the `opusscript` package.\n node-opus is greatly preferred, due to it having significantly better performance.\n\n## How do I install FFMPEG?\n- **npm:** `npm install --save ffmpeg-binaries`\n- **Ubuntu 16.04:** `sudo apt install ffmpeg`\n- **Ubuntu 14.04:** `sudo apt-get install libav-tools`\n- **Windows:** See the [FFMPEG section of AoDude's guide](https://github.com/bdistin/OhGodMusicBot/blob/master/README.md#download-ffmpeg).\n\n## How do I set up node-opus?\n- **Ubuntu:** Simply run `npm install node-opus`, and it's done. Congrats!\n- **Windows:** Run `npm install --global --production windows-build-tools` in an admin command prompt or PowerShell.\n Then, running `npm install node-opus` in your bot's directory should successfully build it. Woo!\n","path":"docs/general/faq.md"}}},"examples":{"name":"Examples","files":{"ping":{"name":"Ping","type":"js","content":"/*\n A ping pong bot, whenever you send \"ping\", it replies \"pong\".\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create an instance of a Discord Client, and call it bot\nconst bot = new Discord.Client();\n\n// the token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// the ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted.\nbot.on('ready', () => {\n console.log('I am ready!');\n});\n\n// create an event listener for messages\nbot.on('message', message => {\n // if the message is \"ping\",\n if (message.content === 'ping') {\n // send \"pong\" to the same channel.\n message.channel.sendMessage('pong');\n }\n});\n\n// log our bot in\nbot.login(token);\n","path":"docs/examples/ping.js"},"avatars":{"name":"Avatars","type":"js","content":"/*\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","path":"docs/examples/avatars.js"},"webhook":{"name":"Webhook","type":"js","content":"/*\n Send a message using a webhook\n*/\n\n// import the discord.js module\nconst Discord = require('discord.js');\n\n// create a new webhook\nconst hook = new Discord.WebhookClient('webhook id', 'webhook token');\n\n// send a message using the webhook\nhook.sendMessage('I am now alive!');\n","path":"docs/examples/webhook.js"}}}},"classes":[{"name":"Client","description":"The starting point for making a Discord Bot.","extends":["EventEmitter"],"construct":{"name":"Client","params":[{"name":"options","description":"Options for the client","optional":true,"type":[[["ClientOptions"]]]}]},"props":[{"name":"options","description":"The options the client was instantiated with","type":[[["ClientOptions"]]],"meta":{"line":34,"file":"Client.js","path":"src/client"}},{"name":"rest","description":"The REST manager of the client","access":"private","type":[[["RESTManager"]]],"meta":{"line":42,"file":"Client.js","path":"src/client"}},{"name":"dataManager","description":"The data manager of the Client","access":"private","type":[[["ClientDataManager"]]],"meta":{"line":49,"file":"Client.js","path":"src/client"}},{"name":"manager","description":"The manager of the Client","access":"private","type":[[["ClientManager"]]],"meta":{"line":56,"file":"Client.js","path":"src/client"}},{"name":"ws","description":"The WebSocket Manager of the Client","access":"private","type":[[["WebSocketManager"]]],"meta":{"line":63,"file":"Client.js","path":"src/client"}},{"name":"resolver","description":"The Data Resolver of the Client","access":"private","type":[[["ClientDataResolver"]]],"meta":{"line":70,"file":"Client.js","path":"src/client"}},{"name":"actions","description":"The Action Manager of the Client","access":"private","type":[[["ActionsManager"]]],"meta":{"line":77,"file":"Client.js","path":"src/client"}},{"name":"voice","description":"The Voice Manager of the Client (`null` in browsers)","access":"private","nullable":true,"type":[[["ClientVoiceManager"]]],"meta":{"line":84,"file":"Client.js","path":"src/client"}},{"name":"shard","description":"The shard helpers for the client (only if the process was spawned as a child, such as from a ShardingManager)","nullable":true,"type":[[["ShardClientUtil"]]],"meta":{"line":90,"file":"Client.js","path":"src/client"}},{"name":"users","description":"A collection of the Client's stored users","type":[[["Collection","<"],["string",", "],["User",">"]]],"meta":{"line":96,"file":"Client.js","path":"src/client"}},{"name":"guilds","description":"A collection of the Client's stored guilds","type":[[["Collection","<"],["string",", "],["Guild",">"]]],"meta":{"line":102,"file":"Client.js","path":"src/client"}},{"name":"channels","description":"A collection of the Client's stored channels","type":[[["Collection","<"],["string",", "],["Channel",">"]]],"meta":{"line":108,"file":"Client.js","path":"src/client"}},{"name":"presences","description":"A collection of presences for friends of the logged in user.\n<warn>This is only filled when using a user account.</warn>","type":[[["Collection","<"],["string",", "],["Presence",">"]]],"meta":{"line":115,"file":"Client.js","path":"src/client"}},{"name":"token","description":"The authorization token for the logged in user/bot.","nullable":true,"type":[[["string"]]],"meta":{"line":122,"file":"Client.js","path":"src/client"}},{"name":"user","description":"The ClientUser representing the logged in Client","nullable":true,"type":[[["ClientUser"]]],"meta":{"line":131,"file":"Client.js","path":"src/client"}},{"name":"readyAt","description":"The date at which the Client was regarded as being in the `READY` state.","nullable":true,"type":[[["Date"]]],"meta":{"line":137,"file":"Client.js","path":"src/client"}},{"name":"pings","description":"The previous heartbeat pings of the websocket (most recent first, limited to three elements)","type":[[["Array","<"],["number",">"]]],"meta":{"line":143,"file":"Client.js","path":"src/client"}},{"name":"status","description":"The status for the logged in Client.","readonly":true,"nullable":true,"type":[[["number"]]],"meta":{"line":159,"file":"Client.js","path":"src/client"}},{"name":"uptime","description":"The uptime for the logged in Client.","readonly":true,"nullable":true,"type":[[["number"]]],"meta":{"line":168,"file":"Client.js","path":"src/client"}},{"name":"ping","description":"The average heartbeat ping of the websocket","readonly":true,"type":[[["number"]]],"meta":{"line":177,"file":"Client.js","path":"src/client"}},{"name":"voiceConnections","description":"Returns a collection, mapping guild ID to voice connections.","readonly":true,"type":[[["Collection","<"],["string",", "],["VoiceConnection",">"]]],"meta":{"line":186,"file":"Client.js","path":"src/client"}},{"name":"emojis","description":"The emojis that the client can use. Mapped by emoji ID.","readonly":true,"type":[[["Collection","<"],["string",", "],["Emoji",">"]]],"meta":{"line":196,"file":"Client.js","path":"src/client"}},{"name":"readyTimestamp","description":"The timestamp that the client was last ready at","readonly":true,"nullable":true,"type":[[["number"]]],"meta":{"line":209,"file":"Client.js","path":"src/client"}},{"name":"browser","description":"Whether the client is in a browser environment","readonly":true,"type":[[["boolean"]]],"meta":{"line":218,"file":"Client.js","path":"src/client"}}],"methods":[{"name":"login","description":"Logs the client in. If successful, resolves with the account's token. <warn>If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.</warn>","examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"params":[{"name":"token","description":"The token used for the account.","type":[[["string"]]]}],"returns":[[["Promise","<"],["string",">"]]],"meta":{"line":239,"file":"Client.js","path":"src/client"}},{"name":"destroy","description":"Destroys the client and logs out.","returns":[[["Promise"]]],"meta":{"line":247,"file":"Client.js","path":"src/client"}},{"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.\n<warn>This is only available when using a user account.</warn>","params":[{"name":"guilds","description":"An array or collection of guilds to sync","optional":true,"default":"this.guilds","type":[[["Array","<"],["Guild",">"]],[["Collection","<"],["string",", "],["Guild",">"]]]}],"meta":{"line":261,"file":"Client.js","path":"src/client"}},{"name":"fetchUser","description":"Caches a user, or obtains it from the cache if it's already cached.\n<warn>This is only available when using a bot account.</warn>","params":[{"name":"id","description":"The ID of the user to obtain","type":[[["string"]]]}],"returns":[[["Promise","<"],["User",">"]]],"meta":{"line":275,"file":"Client.js","path":"src/client"}},{"name":"fetchInvite","description":"Fetches an invite object from an invite code.","params":[{"name":"invite","description":"An invite code or URL","type":[[["InviteResolvable"]]]}],"returns":[[["Promise","<"],["Invite",">"]]],"meta":{"line":285,"file":"Client.js","path":"src/client"}},{"name":"fetchWebhook","description":"Fetch a webhook by ID.","params":[{"name":"id","description":"ID of the webhook","type":[[["string"]]]},{"name":"token","description":"Token for the webhook","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Webhook",">"]]],"meta":{"line":296,"file":"Client.js","path":"src/client"}},{"name":"sweepMessages","description":"Sweeps all channels' messages and removes the ones older than the max message lifetime.\nIf the message has been edited, the time of the edit is used rather than the time of the original message.","params":[{"name":"lifetime","description":"Messages that are older than this (in seconds)\nwill be removed from the caches. The default is based on the client's `messageCacheLifetime` option.","optional":true,"default":"this.options.messageCacheLifetime","type":[[["number"]]]}],"returns":{"types":[[["number"]]],"description":"Amount of messages that were removed from the caches,\nor -1 if the message cache lifetime is unlimited"},"meta":{"line":308,"file":"Client.js","path":"src/client"}},{"name":"fetchApplication","description":"Gets the bot's OAuth2 application.\n<warn>This is only available when using a bot account.</warn>","returns":[[["Promise","<"],["ClientOAuth2Application",">"]]],"meta":{"line":341,"file":"Client.js","path":"src/client"}},{"name":"generateInvite","description":"Generate an invite link for your bot","examples":["client.generateInvite(['SEND_MESSAGES', 'MANAGE_GUILD', 'MENTION_EVERYONE'])\n .then(link => {\n console.log(`Generated bot invite link: ${link}`);\n });"],"params":[{"name":"permissions","description":"An array of permissions to request","optional":true,"type":[[["Array","<"],["PermissionResolvable",">"]],[["number"]]]}],"returns":{"types":[[["Promise","<"],["string",">"]]],"description":"The invite link"},"meta":{"line":356,"file":"Client.js","path":"src/client"}},{"name":"setTimeout","description":"Sets a timeout that will be automatically cancelled if the client is destroyed.","params":[{"name":"fn","description":"Function to execute","type":[[["function"]]]},{"name":"delay","description":"Time to wait before executing (in milliseconds)","type":[[["number"]]]},{"name":"args","description":"Arguments for the function","variable":true,"type":[["*"]]}],"returns":[[["Timeout"]]],"meta":{"line":374,"file":"Client.js","path":"src/client"}},{"name":"clearTimeout","description":"Clears a timeout","params":[{"name":"timeout","description":"Timeout to cancel","type":[[["Timeout"]]]}],"meta":{"line":387,"file":"Client.js","path":"src/client"}},{"name":"setInterval","description":"Sets an interval that will be automatically cancelled if the client is destroyed.","params":[{"name":"fn","description":"Function to execute","type":[[["function"]]]},{"name":"delay","description":"Time to wait before executing (in milliseconds)","type":[[["number"]]]},{"name":"args","description":"Arguments for the function","variable":true,"type":[["*"]]}],"returns":[[["Timeout"]]],"meta":{"line":399,"file":"Client.js","path":"src/client"}},{"name":"clearInterval","description":"Clears an interval","params":[{"name":"interval","description":"Interval to cancel","type":[[["Timeout"]]]}],"meta":{"line":409,"file":"Client.js","path":"src/client"}}],"events":[{"name":"channelUpdate","description":"Emitted whenever a channel is updated - e.g. name change, topic change.","params":[{"name":"oldChannel","description":"The channel before the update","type":[[["Channel"]]]},{"name":"newChannel","description":"The channel after the update","type":[[["Channel"]]]}],"meta":{"line":27,"file":"ChannelUpdate.js","path":"src/client/actions"}},{"name":"guildUnavailable","description":"Emitted whenever a guild becomes unavailable, likely due to a server outage.","params":[{"name":"guild","description":"The guild that has become unavailable.","type":[[["Guild"]]]}],"meta":{"line":45,"file":"GuildDelete.js","path":"src/client/actions"}},{"name":"emojiCreate","description":"Emitted whenever a custom emoji is created in a guild","params":[{"name":"emoji","description":"The emoji that was created.","type":[[["Emoji"]]]}],"meta":{"line":13,"file":"GuildEmojiCreate.js","path":"src/client/actions"}},{"name":"emojiDelete","description":"Emitted whenever a custom guild emoji is deleted","params":[{"name":"emoji","description":"The emoji that was deleted.","type":[[["Emoji"]]]}],"meta":{"line":13,"file":"GuildEmojiDelete.js","path":"src/client/actions"}},{"name":"emojiUpdate","description":"Emitted whenever a custom guild emoji is updated","params":[{"name":"oldEmoji","description":"The old emoji","type":[[["Emoji"]]]},{"name":"newEmoji","description":"The new emoji","type":[[["Emoji"]]]}],"meta":{"line":9,"file":"GuildEmojiUpdate.js","path":"src/client/actions"}},{"name":"guildMemberRemove","description":"Emitted whenever a member leaves a guild, or is kicked.","params":[{"name":"member","description":"The member that has left/been kicked from the guild.","type":[[["GuildMember"]]]}],"meta":{"line":43,"file":"GuildMemberRemove.js","path":"src/client/actions"}},{"name":"roleCreate","description":"Emitted whenever a role is created.","params":[{"name":"role","description":"The role that was created.","type":[[["Role"]]]}],"meta":{"line":26,"file":"GuildRoleCreate.js","path":"src/client/actions"}},{"name":"roleDelete","description":"Emitted whenever a guild role is deleted.","params":[{"name":"role","description":"The role that was deleted.","type":[[["Role"]]]}],"meta":{"line":40,"file":"GuildRoleDelete.js","path":"src/client/actions"}},{"name":"roleUpdate","description":"Emitted whenever a guild role is updated.","params":[{"name":"oldRole","description":"The role before the update.","type":[[["Role"]]]},{"name":"newRole","description":"The role after the update.","type":[[["Role"]]]}],"meta":{"line":34,"file":"GuildRoleUpdate.js","path":"src/client/actions"}},{"name":"guildUpdate","description":"Emitted whenever a guild is updated - e.g. name change.","params":[{"name":"oldGuild","description":"The guild before the update.","type":[[["Guild"]]]},{"name":"newGuild","description":"The guild after the update.","type":[[["Guild"]]]}],"meta":{"line":27,"file":"GuildUpdate.js","path":"src/client/actions"}},{"name":"messageReactionAdd","description":"Emitted whenever a reaction is added to a message.","params":[{"name":"messageReaction","description":"The reaction object.","type":[[["MessageReaction"]]]},{"name":"user","description":"The user that applied the emoji or reaction emoji.","type":[[["User"]]]}],"meta":{"line":37,"file":"MessageReactionAdd.js","path":"src/client/actions"}},{"name":"messageReactionRemove","description":"Emitted whenever a reaction is removed from a message.","params":[{"name":"messageReaction","description":"The reaction object.","type":[[["MessageReaction"]]]},{"name":"user","description":"The user that removed the emoji or reaction emoji.","type":[[["User"]]]}],"meta":{"line":37,"file":"MessageReactionRemove.js","path":"src/client/actions"}},{"name":"messageReactionRemoveAll","description":"Emitted whenever all reactions are removed from a message.","params":[{"name":"messageReaction","description":"The reaction object.","type":[[["MessageReaction"]]]}],"meta":{"line":20,"file":"MessageReactionRemoveAll.js","path":"src/client/actions"}},{"name":"messageUpdate","description":"Emitted whenever a message is updated - e.g. embed or content change.","params":[{"name":"oldMessage","description":"The message before the update.","type":[[["Message"]]]},{"name":"newMessage","description":"The message after the update.","type":[[["Message"]]]}],"meta":{"line":36,"file":"MessageUpdate.js","path":"src/client/actions"}},{"name":"userNoteUpdate","description":"Emitted whenever a note is updated.","params":[{"name":"user","description":"The user the note belongs to","type":[[["User"]]]},{"name":"oldNote","description":"The note content before the update","type":[[["string"]]]},{"name":"newNote","description":"The note content after the update","type":[[["string"]]]}],"meta":{"line":22,"file":"UserNoteUpdate.js","path":"src/client/actions"}},{"name":"warn","description":"Emitted for general warnings","params":[{"name":"info","description":"The warning","type":[[["string"]]]}],"meta":{"line":468,"file":"Client.js","path":"src/client"}},{"name":"debug","description":"Emitted for general debugging information","params":[{"name":"info","description":"The debug information","type":[[["string"]]]}],"meta":{"line":474,"file":"Client.js","path":"src/client"}},{"name":"guildCreate","description":"Emitted whenever the client joins a guild.","params":[{"name":"guild","description":"The created guild","type":[[["Guild"]]]}],"meta":{"line":26,"file":"ClientDataManager.js","path":"src/client"}},{"name":"channelCreate","description":"Emitted whenever a channel is created.","params":[{"name":"channel","description":"The channel that was created","type":[[["Channel"]]]}],"meta":{"line":11,"file":"ChannelCreate.js","path":"src/client/websocket/packets/handlers"}},{"name":"channelDelete","description":"Emitted whenever a channel is deleted.","params":[{"name":"channel","description":"The channel that was deleted","type":[[["Channel"]]]}],"meta":{"line":14,"file":"ChannelDelete.js","path":"src/client/websocket/packets/handlers"}},{"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.","params":[{"name":"channel","description":"The channel that the pins update occured in","type":[[["Channel"]]]},{"name":"time","description":"The time of the pins update","type":[[["Date"]]]}],"meta":{"line":23,"file":"ChannelPinsUpdate.js","path":"src/client/websocket/packets/handlers"}},{"name":"guildBanAdd","description":"Emitted whenever a member is banned from a guild.","params":[{"name":"guild","description":"The guild that the ban occurred in","type":[[["Guild"]]]},{"name":"user","description":"The user that was banned","type":[[["User"]]]}],"meta":{"line":16,"file":"GuildBanAdd.js","path":"src/client/websocket/packets/handlers"}},{"name":"guildBanRemove","description":"Emitted whenever a member is unbanned from a guild.","params":[{"name":"guild","description":"The guild that the unban occurred in","type":[[["Guild"]]]},{"name":"user","description":"The user that was unbanned","type":[[["User"]]]}],"meta":{"line":13,"file":"GuildBanRemove.js","path":"src/client/websocket/packets/handlers"}},{"name":"guildDelete","description":"Emitted whenever a guild is deleted/left.","params":[{"name":"guild","description":"The guild that was deleted","type":[[["Guild"]]]}],"meta":{"line":13,"file":"GuildDelete.js","path":"src/client/websocket/packets/handlers"}},{"name":"guildMembersChunk","description":"Emitted whenever a chunk of guild members is received (all members come from the same guild)","params":[{"name":"members","description":"The members in the chunk","type":[[["Array","<"],["GuildMember",">"]]]}],"meta":{"line":22,"file":"GuildMembersChunk.js","path":"src/client/websocket/packets/handlers"}},{"name":"message","description":"Emitted whenever a message is created","params":[{"name":"message","description":"The created message","type":[[["Message"]]]}],"meta":{"line":13,"file":"MessageCreate.js","path":"src/client/websocket/packets/handlers"}},{"name":"messageDelete","description":"Emitted whenever a message is deleted","params":[{"name":"message","description":"The deleted message","type":[[["Message"]]]}],"meta":{"line":13,"file":"MessageDelete.js","path":"src/client/websocket/packets/handlers"}},{"name":"messageDeleteBulk","description":"Emitted whenever messages are deleted in bulk","params":[{"name":"messages","description":"The deleted messages, mapped by their ID","type":[[["Collection","<"],["string",", "],["Message",">"]]]}],"meta":{"line":11,"file":"MessageDeleteBulk.js","path":"src/client/websocket/packets/handlers"}},{"name":"presenceUpdate","description":"Emitted whenever a guild member's presence changes, or they change one of their details.","params":[{"name":"oldMember","description":"The member before the presence update","type":[[["GuildMember"]]]},{"name":"newMember","description":"The member after the presence update","type":[[["GuildMember"]]]}],"meta":{"line":52,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"}},{"name":"userUpdate","description":"Emitted whenever a user's details (e.g. username) are changed.","params":[{"name":"oldUser","description":"The user before the update","type":[[["User"]]]},{"name":"newUser","description":"The user after the update","type":[[["User"]]]}],"meta":{"line":59,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"}},{"name":"guildMemberAvailable","description":"Emitted whenever a member becomes available in a large guild","params":[{"name":"member","description":"The member that became available","type":[[["GuildMember"]]]}],"meta":{"line":66,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"}},{"name":"typingStart","description":"Emitted whenever a user starts typing in a channel","params":[{"name":"channel","description":"The channel the user started typing in","type":[[["Channel"]]]},{"name":"user","description":"The user that started typing","type":[[["User"]]]}],"meta":{"line":54,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"}},{"name":"typingStop","description":"Emitted whenever a user stops typing in a channel","params":[{"name":"channel","description":"The channel the user stopped typing in","type":[[["Channel"]]]},{"name":"user","description":"The user that stopped typing","type":[[["User"]]]}],"meta":{"line":61,"file":"TypingStart.js","path":"src/client/websocket/packets/handlers"}},{"name":"voiceStateUpdate","description":"Emitted whenever a user changes voice state - e.g. joins/leaves a channel, mutes/unmutes.","params":[{"name":"oldMember","description":"The member before the voice state update","type":[[["GuildMember"]]]},{"name":"newMember","description":"The member after the voice state update","type":[[["GuildMember"]]]}],"meta":{"line":42,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"}},{"name":"disconnect","description":"Emitted whenever the client websocket is disconnected","params":[{"name":"event","description":"The WebSocket close event","type":[[["CloseEvent"]]]}],"meta":{"line":246,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"error","description":"Emitted whenever the Client encounters a serious connection error","params":[{"name":"error","description":"The encountered error","type":[[["Error"]]]}],"meta":{"line":310,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"ready","description":"Emitted when the Client becomes ready to start working","meta":{"line":320,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"reconnecting","description":"Emitted when the Client tries to reconnect after being disconnected","meta":{"line":364,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"guildMemberAdd","description":"Emitted whenever a user joins a guild.","params":[{"name":"member","description":"The member that has joined a guild","type":[[["GuildMember"]]]}],"meta":{"line":777,"file":"Guild.js","path":"src/structures"}},{"name":"guildMemberUpdate","description":"Emitted whenever a guild member changes - i.e. new role, removed role, nickname","params":[{"name":"oldMember","description":"The member before the update","type":[[["GuildMember"]]]},{"name":"newMember","description":"The member after the update","type":[[["GuildMember"]]]}],"meta":{"line":799,"file":"Guild.js","path":"src/structures"}},{"name":"guildMemberSpeaking","description":"Emitted once a guild member starts/stops speaking","params":[{"name":"member","description":"The member that started/stopped speaking","type":[[["GuildMember"]]]},{"name":"speaking","description":"Whether or not the member is speaking","type":[[["boolean"]]]}],"meta":{"line":823,"file":"Guild.js","path":"src/structures"}}],"meta":{"line":19,"file":"Client.js","path":"src/client"}},{"name":"ClientDataResolver","description":"The DataResolver identifies different objects and tries to resolve a specific piece of information from them, e.g.\nextracting a User from a Message object.","access":"private","construct":{"name":"ClientDataResolver","params":[{"name":"client","description":"The client the resolver is for","type":[[["Client"]]]}]},"methods":[{"name":"resolveUser","description":"Resolves a UserResolvable to a User object","params":[{"name":"user","description":"The UserResolvable to identify","type":[[["UserResolvable"]]]}],"returns":{"types":[[["User"]]],"nullable":true},"meta":{"line":43,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveUserID","description":"Resolves a UserResolvable to a user ID string","params":[{"name":"user","description":"The UserResolvable to identify","type":[[["UserResolvable"]]]}],"returns":{"types":[[["string"]]],"nullable":true},"meta":{"line":57,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveGuild","description":"Resolves a GuildResolvable to a Guild object","params":[{"name":"guild","description":"The GuildResolvable to identify","type":[[["GuildResolvable"]]]}],"returns":{"types":[[["Guild"]]],"nullable":true},"meta":{"line":77,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveGuildMember","description":"Resolves a GuildMemberResolvable to a GuildMember object","params":[{"name":"guild","description":"The guild that the member is part of","type":[[["GuildResolvable"]]]},{"name":"user","description":"The user that is part of the guild","type":[[["UserResolvable"]]]}],"returns":{"types":[[["GuildMember"]]],"nullable":true},"meta":{"line":96,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveChannel","description":"Resolves a ChannelResolvable to a Channel object","params":[{"name":"channel","description":"The channel resolvable to resolve","type":[[["ChannelResolvable"]]]}],"returns":{"types":[[["Channel"]]],"nullable":true},"meta":{"line":118,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveInviteCode","description":"Resolves InviteResolvable to an invite code","params":[{"name":"data","description":"The invite resolvable to resolve","type":[[["InviteResolvable"]]]}],"returns":[[["string"]]],"meta":{"line":138,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolvePermission","description":"Resolves a PermissionResolvable to a permission number","params":[{"name":"permission","description":"The permission resolvable to resolve","type":[[["PermissionResolvable"]]]}],"returns":[[["number"]]],"meta":{"line":190,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolvePermissions","description":"Turn an array of permissions into a valid Discord permission bitfield","params":[{"name":"permissions","description":"Permissions to resolve together","type":[[["Array","<"],["PermissionResolvable",">"]]]}],"returns":[[["number"]]],"meta":{"line":201,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveString","description":"Resolves a StringResolvable to a string","params":[{"name":"data","description":"The string resolvable to resolve","type":[[["StringResolvable"]]]}],"returns":[[["string"]]],"meta":{"line":220,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveBase64","description":"Resolves a Base64Resolvable to a Base 64 image","params":[{"name":"data","description":"The base 64 resolvable you want to resolve","type":[[["Base64Resolvable"]]]}],"returns":{"types":[[["string"]]],"nullable":true},"meta":{"line":238,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveBuffer","description":"Resolves a BufferResolvable to a Buffer","params":[{"name":"resource","description":"The buffer resolvable to resolve","type":[[["BufferResolvable"]]]}],"returns":[[["Promise","<"],["Buffer",">"]]],"meta":{"line":256,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveEmojiIdentifier","description":"Resolves an EmojiResolvable to an emoji identifier","params":[{"name":"emoji","description":"The emoji resolvable to resolve","type":[[["EmojiIdentifierResolvable"]]]}],"returns":[[["string"]]],"meta":{"line":300,"file":"ClientDataResolver.js","path":"src/client"}}],"meta":{"line":20,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"ClientManager","description":"Manages the State and Background Tasks of the Client","access":"private","props":[{"name":"client","description":"The Client that instantiated this Manager","type":[[["Client"]]],"meta":{"line":13,"file":"ClientManager.js","path":"src/client"}},{"name":"heartbeatInterval","description":"The heartbeat interval, null if not yet set","nullable":true,"type":[[["number"]]],"meta":{"line":19,"file":"ClientManager.js","path":"src/client"}}],"methods":[{"name":"connectToWebSocket","description":"Connects the Client to the WebSocket","params":[{"name":"token","description":"The authorization token","type":[[["string"]]]},{"name":"resolve","description":"Function to run when connection is successful","type":[[["function"]]]},{"name":"reject","description":"Function to run when connection fails","type":[[["function"]]]}],"meta":{"line":28,"file":"ClientManager.js","path":"src/client"}},{"name":"setupKeepAlive","description":"Sets up a keep-alive interval to keep the Client's connection valid","params":[{"name":"time","description":"The interval in milliseconds at which heartbeat packets should be sent","type":[[["number"]]]}],"meta":{"line":50,"file":"ClientManager.js","path":"src/client"}}],"meta":{"line":7,"file":"ClientManager.js","path":"src/client"}},{"name":"RequestHandler","description":"A base class for different types of rate limiting handlers for the REST API.","access":"private","construct":{"name":"RequestHandler","params":[{"name":"restManager","description":"The REST manager to use","type":[[["RESTManager"]]]}]},"props":[{"name":"restManager","description":"The RESTManager that instantiated this RequestHandler","type":[[["RESTManager"]]],"meta":{"line":14,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}},{"name":"queue","description":"A list of requests that have yet to be processed.","type":[[["Array","<"],["APIRequest",">"]]],"meta":{"line":20,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}},{"name":"globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","type":[[["boolean"]]],"meta":{"line":27,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}}],"methods":[{"name":"push","description":"Push a new API request into this bucket","params":[{"name":"request","description":"The new request to push into the queue","type":[[["APIRequest"]]]}],"meta":{"line":39,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}},{"name":"handle","description":"Attempts to get this RequestHandler to process its current queue","meta":{"line":46,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}}],"meta":{"line":5,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}},{"name":"SequentialRequestHandler","description":"Handles API Requests sequentially, i.e. we wait until the current request is finished before moving onto\nthe next. This plays a _lot_ nicer in terms of avoiding 429's when there is more than one session of the account,\nbut it can be slower.","extends":["RequestHandler"],"access":"private","construct":{"name":"SequentialRequestHandler","params":[{"name":"restManager","description":"The REST manager to use","type":[[["RESTManager"]]]},{"name":"endpoint","description":"The endpoint to handle","type":[[["string"]]]}]},"props":[{"name":"waiting","description":"Whether this rate limiter is waiting for a response from a request","type":[[["boolean"]]],"meta":{"line":22,"file":"Sequential.js","path":"src/client/rest/RequestHandlers"}},{"name":"endpoint","description":"The endpoint that this handler is handling","type":[[["string"]]],"meta":{"line":28,"file":"Sequential.js","path":"src/client/rest/RequestHandlers"}},{"name":"timeDifference","description":"The time difference between Discord's Dates and the local computer's Dates. A positive number means the local\ncomputer's time is ahead of Discord's.","type":[[["number"]]],"meta":{"line":35,"file":"Sequential.js","path":"src/client/rest/RequestHandlers"}},{"name":"restManager","description":"The RESTManager that instantiated this RequestHandler","type":[[["RESTManager"]]],"meta":{"line":14,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}},{"name":"queue","description":"A list of requests that have yet to be processed.","type":[[["Array","<"],["APIRequest",">"]]],"meta":{"line":20,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}},{"name":"globalLimit","description":"Whether or not the client is being rate limited on every endpoint.","type":[[["boolean"]]],"meta":{"line":27,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}}],"methods":[{"name":"execute","description":"Performs a request then resolves a promise to indicate its readiness for a new request","params":[{"name":"item","description":"The item to execute","type":[[["APIRequest"]]]}],"returns":[[["Promise","<(?"],["Object","|"],["Error",")>"]]],"meta":{"line":48,"file":"Sequential.js","path":"src/client/rest/RequestHandlers"}},{"name":"push","description":"Push a new API request into this bucket","inherits":"RequestHandler#push","inherited":true,"params":[{"name":"request","description":"The new request to push into the queue","type":[[["APIRequest"]]]}],"meta":{"line":39,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}},{"name":"handle","description":"Attempts to get this RequestHandler to process its current queue","inherits":"RequestHandler#handle","inherited":true,"meta":{"line":46,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}}],"meta":{"line":10,"file":"Sequential.js","path":"src/client/rest/RequestHandlers"}},{"name":"ClientVoiceManager","description":"Manages all the voice stuff for the Client","access":"private","props":[{"name":"client","description":"The client that instantiated this voice manager","type":[[["Client"]]],"meta":{"line":17,"file":"ClientVoiceManager.js","path":"src/client/voice"}},{"name":"connections","description":"A collection mapping connection IDs to the Connection objects","type":[[["Collection","<"],["string",", "],["VoiceConnection",">"]]],"meta":{"line":23,"file":"ClientVoiceManager.js","path":"src/client/voice"}},{"name":"pending","description":"Pending connection attempts, maps guild ID to VoiceChannel","type":[[["Collection","<"],["string",", "],["VoiceChannel",">"]]],"meta":{"line":29,"file":"ClientVoiceManager.js","path":"src/client/voice"}}],"methods":[{"name":"sendVoiceStateUpdate","description":"Sends a request to the main gateway to join a voice channel","params":[{"name":"channel","description":"The channel to join","type":[[["VoiceChannel"]]]},{"name":"options","description":"The options to provide","optional":true,"type":[[["Object"]]]}],"meta":{"line":48,"file":"ClientVoiceManager.js","path":"src/client/voice"}},{"name":"joinChannel","description":"Sets up a request to join a voice channel","params":[{"name":"channel","description":"The voice channel to join","type":[[["VoiceChannel"]]]}],"returns":[[["Promise","<"],["VoiceConnection",">"]]],"meta":{"line":79,"file":"ClientVoiceManager.js","path":"src/client/voice"}}],"meta":{"line":11,"file":"ClientVoiceManager.js","path":"src/client/voice"}},{"name":"PendingVoiceConnection","description":"Represents a Pending Voice Connection","access":"private","props":[{"name":"voiceManager","description":"The ClientVoiceManager that instantiated this pending connection","type":[[["ClientVoiceManager"]]],"meta":{"line":125,"file":"ClientVoiceManager.js","path":"src/client/voice"}},{"name":"channel","description":"The channel that this pending voice connection will attempt to join","type":[[["VoiceChannel"]]],"meta":{"line":131,"file":"ClientVoiceManager.js","path":"src/client/voice"}},{"name":"deathTimer","description":"The timeout that will be invoked after 15 seconds signifying a failure to connect","type":[[["Timeout"]]],"meta":{"line":137,"file":"ClientVoiceManager.js","path":"src/client/voice"}},{"name":"data","description":"An object containing data required to connect to the voice servers with","type":[[["Object"]]],"meta":{"line":144,"file":"ClientVoiceManager.js","path":"src/client/voice"}}],"methods":[{"name":"setTokenAndEndpoint","description":"Set the token and endpoint required to connect to the the voice servers","params":[{"name":"token","description":"the token","type":[[["string"]]]},{"name":"endpoint","description":"the endpoint","type":[[["string"]]]}],"returns":[[["void"]]],"meta":{"line":164,"file":"ClientVoiceManager.js","path":"src/client/voice"}},{"name":"setSessionID","description":"Sets the Session ID for the connection","params":[{"name":"sessionID","description":"the session ID","type":[[["string"]]]}],"meta":{"line":199,"file":"ClientVoiceManager.js","path":"src/client/voice"}},{"name":"upgrade","description":"Upgrades this Pending Connection to a full Voice Connection","returns":[[["VoiceConnection"]]],"meta":{"line":240,"file":"ClientVoiceManager.js","path":"src/client/voice"}}],"meta":{"line":117,"file":"ClientVoiceManager.js","path":"src/client/voice"}},{"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 const dispatcher = connection.playFile('./file.mp3');\n});\n```","extends":["EventEmitter"],"props":[{"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.","type":[[["number"]]],"meta":{"line":39,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"paused","description":"Whether playing is paused","type":[[["boolean"]]],"meta":{"line":45,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"time","description":"How long the stream dispatcher has been \"speaking\" for","readonly":true,"type":[[["number"]]],"meta":{"line":55,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"totalStreamTime","description":"The total time, taking into account pauses and skips, that the dispatcher has been streaming for","readonly":true,"type":[[["number"]]],"meta":{"line":64,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"volume","description":"The volume of the stream, relative to the stream's input volume","readonly":true,"type":[[["number"]]],"meta":{"line":73,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}}],"methods":[{"name":"setVolume","description":"Sets the volume relative to the input stream - i.e. 1 is normal, 0.5 is half, 2 is double.","params":[{"name":"volume","description":"The volume that you want to set","type":[[["number"]]]}],"meta":{"line":81,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"setVolumeDecibels","description":"Set the volume in decibels","params":[{"name":"db","description":"The decibels","type":[[["number"]]]}],"meta":{"line":89,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"setVolumeLogarithmic","description":"Set the volume so that a perceived value of 0.5 is half the perceived volume etc.","params":[{"name":"value","description":"The value for the volume","type":[[["number"]]]}],"meta":{"line":97,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however)","meta":{"line":104,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"resume","description":"Resumes sending voice packets to the voice connection (may be further on in the stream than when paused)","meta":{"line":111,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"end","description":"Stops the current stream permanently and emits an `end` event.","params":[{"name":"reason","description":"An optional reason for stopping the dispatcher.","optional":true,"default":"'user'","type":[[["string"]]]}],"meta":{"line":119,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}}],"events":[{"name":"speaking","description":"Emitted when the dispatcher starts/stops speaking","params":[{"name":"value","description":"Whether or not the dispatcher is speaking","type":[[["boolean"]]]}],"meta":{"line":125,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"start","description":"Emitted once the dispatcher starts streaming","meta":{"line":197,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"end","description":"Emitted once the stream has ended. Attach a `once` listener to this.","params":[{"name":"reason","description":"The reason for the end of the dispatcher. If it ended because it reached the end of the\nstream, this would be `stream`. If you invoke `.end()` without specifying a reason, this would be `user`.","type":[[["string"]]]}],"meta":{"line":238,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"error","description":"Emitted once the stream has encountered an error. Attach a `once` listener to this. Also emits `end`.","params":[{"name":"err","description":"The encountered error","type":[[["Error"]]]}],"meta":{"line":249,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"debug","description":"Emitted when the stream wants to give debug information.","params":[{"name":"information","description":"The debug information","type":[[["string"]]]}],"meta":{"line":259,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}}],"meta":{"line":18,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"AudioPlayer","description":"Represents the Audio Player of a Voice Connection","extends":["EventEmitter"],"access":"private","props":[{"name":"voiceConnection","description":"The voice connection the player belongs to","type":[[["VoiceConnection"]]],"meta":{"line":18,"file":"AudioPlayer.js","path":"src/client/voice/player"}},{"name":"dispatcher","description":"The current stream dispatcher, if a stream is being played","type":[[["StreamDispatcher"]]],"meta":{"line":26,"file":"AudioPlayer.js","path":"src/client/voice/player"}}],"meta":{"line":11,"file":"AudioPlayer.js","path":"src/client/voice/player"}},{"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```","extends":["EventEmitter"],"props":[{"name":"destroyed","description":"Whether or not this receiver has been destroyed.","type":[[["boolean"]]],"meta":{"line":33,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"}},{"name":"voiceConnection","description":"The VoiceConnection that instantiated this","type":[[["VoiceConnection"]]],"meta":{"line":39,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"}}],"methods":[{"name":"recreate","description":"If this VoiceReceiver has been destroyed, running `recreate()` will recreate the listener.\nThis avoids you having to create a new receiver.\n<info>Any streams that you had prior to destroying the receiver will not be recreated.</info>","meta":{"line":65,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"}},{"name":"destroy","description":"Destroy this VoiceReceiver, also ending any streams that it may be controlling.","meta":{"line":75,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"}},{"name":"createOpusStream","description":"Creates a readable stream for a user that provides opus data while the user is speaking. When the user\nstops speaking, the stream is destroyed.","params":[{"name":"user","description":"The user to create the stream for","type":[[["UserResolvable"]]]}],"returns":[[["ReadableStream"]]],"meta":{"line":94,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"}},{"name":"createPCMStream","description":"Creates a readable stream for a user that provides PCM data while the user is speaking. When the user\nstops speaking, the stream is destroyed. The stream is 32-bit signed stereo PCM at 48KHz.","params":[{"name":"user","description":"The user to create the stream for","type":[[["UserResolvable"]]]}],"returns":[[["ReadableStream"]]],"meta":{"line":109,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"}}],"events":[{"name":"warn","description":"Emitted whenever a voice packet cannot be decrypted","params":[{"name":"message","description":"The warning message","type":[[["string"]]]}],"meta":{"line":122,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"}},{"name":"opus","description":"Emitted whenever voice data is received from the voice connection. This is _always_ emitted (unlike PCM).","params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":[[["User"]]]},{"name":"buffer","description":"The opus buffer","type":[[["Buffer"]]]}],"meta":{"line":132,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"}},{"name":"pcm","description":"Emits decoded voice data when it's received. For performance reasons, the decoding will only\nhappen if there is at least one `pcm` listener on this receiver.","params":[{"name":"user","description":"The user that is sending the buffer (is speaking)","type":[[["User"]]]},{"name":"buffer","description":"The decoded buffer","type":[[["Buffer"]]]}],"meta":{"line":140,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"}}],"meta":{"line":18,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"}},{"name":"SecretKey","description":"Represents a Secret Key used in encryption over voice","access":"private","props":[{"name":"key","description":"The key used for encryption","type":[[["Uint8Array"]]],"meta":{"line":11,"file":"SecretKey.js","path":"src/client/voice/util"}}],"meta":{"line":5,"file":"SecretKey.js","path":"src/client/voice/util"}},{"name":"VoiceConnection","description":"Represents a connection to a voice channel in Discord.\n```js\n// obtained using:\nvoiceChannel.join().then(connection => {\n\n});\n```","extends":["EventEmitter"],"props":[{"name":"voiceManager","description":"The Voice Manager that instantiated this connection","type":[[["ClientVoiceManager"]]],"meta":{"line":27,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"channel","description":"The voice channel this connection is currently serving","type":[[["VoiceChannel"]]],"meta":{"line":33,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"speaking","description":"Whether we're currently transmitting audio","type":[[["boolean"]]],"meta":{"line":39,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"receivers","description":"An array of Voice Receivers that have been created for this connection","type":[[["Array","<"],["VoiceReceiver",">"]]],"meta":{"line":45,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"authentication","description":"The authentication data needed to connect to the voice server","access":"private","type":[[["Object"]]],"meta":{"line":52,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"player","description":"The audio player for this voice connection","type":[[["AudioPlayer"]]],"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"ssrcMap","description":"Map SSRC to speaking values","access":"private","type":[[["Map","<"],["number",", "],["boolean",">"]]],"meta":{"line":84,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"ready","description":"Whether this connection is ready","access":"private","type":[[["boolean"]]],"meta":{"line":91,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"sockets","description":"Object that wraps contains the `ws` and `udp` sockets of this voice connection","access":"private","type":[[["Object"]]],"meta":{"line":98,"file":"VoiceConnection.js","path":"src/client/voice"}}],"methods":[{"name":"setSpeaking","description":"Sets whether the voice connection should display as \"speaking\" or not","access":"private","params":[{"name":"value","description":"whether or not to speak","type":[[["boolean"]]]}],"meta":{"line":107,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"disconnect","description":"Disconnect the voice connection, causing a disconnect and closing event to be emitted.","meta":{"line":124,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"connect","description":"Connect the voice connection","access":"private","meta":{"line":146,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"playFile","description":"Play the given file in the voice connection.","examples":["// play files natively\nvoiceChannel.join()\n .then(connection => {\n const dispatcher = connection.playFile('C:/Users/Discord/Desktop/music.mp3');\n })\n .catch(console.error);"],"params":[{"name":"file","description":"The path to the file","type":[[["string"]]]},{"name":"options","description":"Options for playing the stream","optional":true,"type":[[["StreamOptions"]]]}],"returns":[[["StreamDispatcher"]]],"meta":{"line":229,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"playStream","description":"Plays and converts an audio stream in the voice connection.","examples":["// play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', {filter : 'audioonly'});\n const dispatcher = connection.playStream(stream, streamOptions);\n })\n .catch(console.error);"],"params":[{"name":"stream","description":"The audio stream to play","type":[[["ReadableStream"]]]},{"name":"options","description":"Options for playing the stream","optional":true,"type":[[["StreamOptions"]]]}],"returns":[[["StreamDispatcher"]]],"meta":{"line":249,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM at 48KHz.","params":[{"name":"stream","description":"The audio stream to play.","type":[[["ReadableStream"]]]},{"name":"options","description":"Options for playing the stream","optional":true,"type":[[["StreamOptions"]]]}],"returns":[[["StreamDispatcher"]]],"meta":{"line":260,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data. It's recommended to only create one of these.","returns":[[["VoiceReceiver"]]],"meta":{"line":269,"file":"VoiceConnection.js","path":"src/client/voice"}}],"events":[{"name":"debug","description":"Debug info from the connection","params":[{"name":"message","description":"the debug message","type":[[["string"]]]}],"meta":{"line":61,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"warn","description":"Warning info from the connection","params":[{"name":"warning","description":"the warning","type":[[["string"]],[["Error"]]]}],"meta":{"line":70,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"disconnect","description":"Emitted when the voice connection disconnects","meta":{"line":135,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"error","description":"Emitted whenever the connection encounters an error.","params":[{"name":"error","description":"the encountered error","type":[[["Error"]]]}],"meta":{"line":156,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"ready","description":"Emitted once the connection is ready, when a promise to join a voice channel resolves,\nthe connection will already be ready.","meta":{"line":169,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"speaking","description":"Emitted whenever a user starts/stops speaking","params":[{"name":"user","description":"The user that has started/stopped speaking","type":[[["User"]]]},{"name":"speaking","description":"Whether or not the user is speaking","type":[[["boolean"]]]}],"meta":{"line":197,"file":"VoiceConnection.js","path":"src/client/voice"}}],"meta":{"line":19,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"VoiceConnectionUDPClient","description":"Represents a UDP Client for a Voice Connection","extends":["EventEmitter"],"access":"private","props":[{"name":"voiceConnection","description":"The voice connection that this UDP client serves","type":[[["VoiceConnection"]]],"meta":{"line":19,"file":"VoiceUDPClient.js","path":"src/client/voice"}},{"name":"socket","description":"The UDP socket","nullable":true,"type":[[["Socket"]]],"meta":{"line":25,"file":"VoiceUDPClient.js","path":"src/client/voice"}},{"name":"discordAddress","description":"The address of the discord voice server","nullable":true,"type":[[["string"]]],"meta":{"line":31,"file":"VoiceUDPClient.js","path":"src/client/voice"}},{"name":"localAddress","description":"The local IP address","nullable":true,"type":[[["string"]]],"meta":{"line":37,"file":"VoiceUDPClient.js","path":"src/client/voice"}},{"name":"localPort","description":"The local port","nullable":true,"type":[[["string"]]],"meta":{"line":43,"file":"VoiceUDPClient.js","path":"src/client/voice"}},{"name":"discordPort","description":"The port of the discord voice server","readonly":true,"type":[[["number"]]],"meta":{"line":64,"file":"VoiceUDPClient.js","path":"src/client/voice"}}],"methods":[{"name":"findEndpointAddress","description":"Tries to resolve the voice server endpoint to an address","returns":[[["Promise","<"],["string",">"]]],"meta":{"line":72,"file":"VoiceUDPClient.js","path":"src/client/voice"}},{"name":"send","description":"Send a packet to the UDP client","params":[{"name":"packet","description":"the packet to send","type":[[["Object"]]]}],"returns":[[["Promise","<"],["Object",">"]]],"meta":{"line":90,"file":"VoiceUDPClient.js","path":"src/client/voice"}}],"meta":{"line":11,"file":"VoiceUDPClient.js","path":"src/client/voice"}},{"name":"VoiceWebSocket","description":"Represents a Voice Connection's WebSocket","extends":["EventEmitter"],"access":"private","props":[{"name":"voiceConnection","description":"The Voice Connection that this WebSocket serves","type":[[["VoiceConnection"]]],"meta":{"line":25,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"attempts","description":"How many connection attempts have been made","type":[[["number"]]],"meta":{"line":31,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"client","description":"The client of this voice websocket","readonly":true,"type":[[["Client"]]],"meta":{"line":48,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"ws","description":"The actual WebSocket used to connect to the Voice WebSocket Server.","type":[[["WebSocket"]]],"meta":{"line":80,"file":"VoiceWebSocket.js","path":"src/client/voice"}}],"methods":[{"name":"reset","description":"Resets the current WebSocket","meta":{"line":55,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"connect","description":"Starts connecting to the Voice WebSocket Server.","meta":{"line":66,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"send","description":"Sends data to the WebSocket if it is open.","params":[{"name":"data","description":"the data to send to the WebSocket","type":[[["string"]]]}],"returns":[[["Promise","<"],["string",">"]]],"meta":{"line":92,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"sendPacket","description":"JSON.stringify's a packet and then sends it to the WebSocket Server.","params":[{"name":"packet","description":"the packet to send","type":[[["Object"]]]}],"returns":[[["Promise","<"],["string",">"]]],"meta":{"line":108,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"onOpen","description":"Called whenever the WebSocket opens","meta":{"line":120,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"onMessage","description":"Called whenever a message is received from the WebSocket","params":[{"name":"event","description":"the message event that was received","type":[[["MessageEvent"]]]}],"returns":[[["void"]]],"meta":{"line":139,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"onClose","description":"Called whenever the connection to the WebSocket Server is lost","meta":{"line":150,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"onError","description":"Called whenever an error occurs with the WebSocket.","params":[{"name":"error","description":"the error that occurred","type":[[["Error"]]]}],"meta":{"line":158,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"onPacket","description":"Called whenever a valid packet is received from the WebSocket","params":[{"name":"packet","description":"the received packet","type":[[["Object"]]]}],"meta":{"line":166,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"setHeartbeat","description":"Sets an interval at which to send a heartbeat packet to the WebSocket","params":[{"name":"interval","description":"the interval at which to send a heartbeat packet","type":[[["number"]]]}],"meta":{"line":209,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"clearHeartbeat","description":"Clears a heartbeat interval, if one exists","meta":{"line":229,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"sendHeartbeat","description":"Sends a heartbeat packet","meta":{"line":241,"file":"VoiceWebSocket.js","path":"src/client/voice"}}],"events":[{"name":"ready","description":"Emitted once the voice websocket receives the ready packet","params":[{"name":"packet","description":"the received packet","type":[[["Object"]]]}],"meta":{"line":170,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"sessionDescription","description":"Emitted once the Voice Websocket receives a description of this voice session","params":[{"name":"encryptionMode","description":"the type of encryption being used","type":[[["string"]]]},{"name":"secretKey","description":"the secret key used for encryption","type":[[["SecretKey"]]]}],"meta":{"line":178,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"speaking","description":"Emitted whenever a speaking packet is received","params":[{"name":"data","type":[[["Object"]]]}],"meta":{"line":187,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"unknownPacket","description":"Emitted when an unhandled packet is received","params":[{"name":"packet","type":[[["Object"]]]}],"meta":{"line":195,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"warn","description":"Emitted whenver the voice websocket encounters a non-fatal error","params":[{"name":"warn","description":"the warning","type":[[["string"]]]}],"meta":{"line":215,"file":"VoiceWebSocket.js","path":"src/client/voice"}}],"meta":{"line":17,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"WebhookClient","description":"The Webhook Client","extends":["Webhook"],"construct":{"name":"WebhookClient","params":[{"name":"id","description":"The id of the webhook.","type":[[["string"]]]},{"name":"token","description":"the token of the webhook.","type":[[["string"]]]},{"name":"options","description":"Options for the client","optional":true,"type":[[["ClientOptions"]]]}]},"props":[{"name":"options","description":"The options the client was instantiated with","type":[[["ClientOptions"]]],"meta":{"line":28,"file":"WebhookClient.js","path":"src/client"}},{"name":"rest","description":"The REST manager of the client","access":"private","type":[[["RESTManager"]]],"meta":{"line":35,"file":"WebhookClient.js","path":"src/client"}},{"name":"resolver","description":"The Data Resolver of the Client","access":"private","type":[[["ClientDataResolver"]]],"meta":{"line":42,"file":"WebhookClient.js","path":"src/client"}},{"name":"client","description":"The Client that instantiated the Webhook","readonly":true,"type":[[["Client"]]],"meta":{"line":10,"file":"Webhook.js","path":"src/structures"}},{"name":"name","description":"The name of the webhook","type":[[["string"]]],"meta":{"line":30,"file":"Webhook.js","path":"src/structures"}},{"name":"token","description":"The token for the webhook","type":[[["string"]]],"meta":{"line":36,"file":"Webhook.js","path":"src/structures"}},{"name":"avatar","description":"The avatar for the webhook","type":[[["string"]]],"meta":{"line":42,"file":"Webhook.js","path":"src/structures"}},{"name":"id","description":"The ID of the webhook","type":[[["string"]]],"meta":{"line":48,"file":"Webhook.js","path":"src/structures"}},{"name":"guildID","description":"The guild the webhook belongs to","type":[[["string"]]],"meta":{"line":54,"file":"Webhook.js","path":"src/structures"}},{"name":"channelID","description":"The channel the webhook belongs to","type":[[["string"]]],"meta":{"line":60,"file":"Webhook.js","path":"src/structures"}}],"methods":[{"name":"sendMessage","description":"Send a message with this webhook","inherits":"Webhook#sendMessage","inherited":true,"examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"The content to send.","type":[[["StringResolvable"]]]},{"name":"options","description":"The options to provide.","optional":true,"default":"{}","type":[[["WebhookMessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":88,"file":"Webhook.js","path":"src/structures"}},{"name":"sendSlackMessage","description":"Send a raw slack message with this webhook","inherits":"Webhook#sendSlackMessage","inherited":true,"examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': Date.now() / 1000\n }]\n}).catch(console.error);"],"params":[{"name":"body","description":"The raw body to send.","type":[[["Object"]]]}],"returns":[[["Promise"]]],"meta":{"line":109,"file":"Webhook.js","path":"src/structures"}},{"name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","inherits":"Webhook#sendTTSMessage","inherited":true,"examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"The content to send","type":[[["StringResolvable"]]]},{"name":"options","description":"The options to provide","optional":true,"default":"{}","type":[[["WebhookMessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":124,"file":"Webhook.js","path":"src/structures"}},{"name":"sendFile","description":"Send a file with this webhook","inherits":"Webhook#sendFile","inherited":true,"params":[{"name":"attachment","description":"The file to send","type":[[["BufferResolvable"]]]},{"name":"fileName","description":"The name and extension of the file","optional":true,"default":"\"file.jpg\"","type":[[["string"]]]},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"The options to provide","optional":true,"type":[[["WebhookMessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":137,"file":"Webhook.js","path":"src/structures"}},{"name":"sendCode","description":"Send a code block with this webhook","inherits":"Webhook#sendCode","inherited":true,"params":[{"name":"lang","description":"Language for the code block","type":[[["string"]]]},{"name":"content","description":"Content of the code block","type":[[["StringResolvable"]]]},{"name":"options","description":"The options to provide","type":[[["WebhookMessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":162,"file":"Webhook.js","path":"src/structures"}},{"name":"edit","description":"Edit the webhook.","inherits":"Webhook#edit","inherited":true,"params":[{"name":"name","description":"The new name for the Webhook","type":[[["string"]]]},{"name":"avatar","description":"The new avatar for the Webhook.","type":[[["BufferResolvable"]]]}],"returns":[[["Promise","<"],["Webhook",">"]]],"meta":{"line":178,"file":"Webhook.js","path":"src/structures"}},{"name":"delete","description":"Delete the webhook","inherits":"Webhook#delete","inherited":true,"returns":[[["Promise"]]],"meta":{"line":195,"file":"Webhook.js","path":"src/structures"}}],"meta":{"line":11,"file":"WebhookClient.js","path":"src/client"}},{"name":"WebSocketManager","description":"The WebSocket Manager of the Client","access":"private","props":[{"name":"client","description":"The Client that instantiated this WebSocketManager","type":[[["Client"]]],"meta":{"line":39,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"packetManager","description":"A WebSocket Packet manager, it handles all the messages","type":[[["PacketManager"]]],"meta":{"line":45,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"status","description":"The status of the WebSocketManager, a type of Constants.Status. It defaults to IDLE.","type":[[["number"]]],"meta":{"line":51,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"sessionID","description":"The session ID of the connection, null if not yet available.","nullable":true,"type":[[["string"]]],"meta":{"line":57,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"sequence","description":"The packet count of the client, null if not yet available.","nullable":true,"type":[[["number"]]],"meta":{"line":63,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"gateway","description":"The gateway address for this WebSocket connection, null if not yet available.","nullable":true,"type":[[["string"]]],"meta":{"line":69,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"normalReady","description":"Whether READY was emitted normally (all packets received) or not","type":[[["boolean"]]],"meta":{"line":75,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"ws","description":"The WebSocket connection to the gateway","nullable":true,"type":[[["WebSocket"]]],"meta":{"line":81,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"disabledEvents","description":"An object with keys that are websocket event names that should be ignored","type":[[["Object"]]],"meta":{"line":87,"file":"WebSocketManager.js","path":"src/client/websocket"}}],"methods":[{"name":"_connect","description":"Connects the client to a given gateway","params":[{"name":"gateway","description":"The gateway to connect to","type":[[["string"]]]}],"meta":{"line":99,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"send","description":"Sends a packet to the gateway","params":[{"name":"data","description":"An object that can be JSON stringified","type":[[["Object"]]]},{"name":"force","description":"Whether or not to send the packet immediately","default":false,"type":[[["boolean"]]]}],"meta":{"line":148,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"eventOpen","description":"Run whenever the gateway connections opens up","meta":{"line":186,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"_sendResume","description":"Sends a gateway resume packet, in cases of unexpected disconnections.","meta":{"line":196,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"_sendNewIdentify","description":"Sends a new identification packet, in cases of new connections or failed reconnections.","meta":{"line":217,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"eventClose","description":"Run whenever the connection to the gateway is closed, it will try to reconnect the client.","params":[{"name":"event","description":"The WebSocket close event","type":[[["CloseEvent"]]]}],"meta":{"line":241,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"eventMessage","description":"Run whenever a message is received from the WebSocket. Returns `true` if the message\nwas handled properly.","params":[{"name":"event","description":"The received websocket data","type":[[["Object"]]]}],"returns":[[["boolean"]]],"meta":{"line":263,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"parseEventData","description":"Parses the raw data from a websocket event, inflating it if necessary","params":[{"name":"data","description":"Event data","type":[["*"]]}],"returns":[[["Object"]]],"meta":{"line":281,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"tryParseEventData","description":"Tries to call `parseEventData()` and return its result, or returns `null` upon thrown errors.","params":[{"name":"data","description":"Event data","type":[["*"]]}],"returns":{"types":[[["Object"]]],"nullable":true},"meta":{"line":297,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"eventError","description":"Run whenever an error occurs with the WebSocket connection. Tries to reconnect","params":[{"name":"err","description":"The encountered error","type":[[["Error"]]]}],"meta":{"line":309,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"checkIfReady","description":"Runs on new packets before `READY` to see if the Client is ready yet, if it is prepares\nthe `READY` event.","meta":{"line":334,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"tryReconnect","description":"Tries to reconnect the client, changing the status to Constants.Status.RECONNECTING.","meta":{"line":359,"file":"WebSocketManager.js","path":"src/client/websocket"}}],"meta":{"line":32,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"Shard","description":"Represents a Shard spawned by the ShardingManager.","construct":{"name":"Shard","params":[{"name":"manager","description":"The sharding manager","type":[[["ShardingManager"]]]},{"name":"id","description":"The ID of this shard","type":[[["number"]]]},{"name":"args","description":"Command line arguments to pass to the script","optional":true,"default":"[]","type":[[["Array"]]]}]},"props":[{"name":"manager","description":"Manager that created the shard","type":[[["ShardingManager"]]],"meta":{"line":20,"file":"Shard.js","path":"src/sharding"}},{"name":"id","description":"ID of the shard","type":[[["number"]]],"meta":{"line":26,"file":"Shard.js","path":"src/sharding"}},{"name":"env","description":"The environment variables for the shard","type":[[["Object"]]],"meta":{"line":32,"file":"Shard.js","path":"src/sharding"}},{"name":"process","description":"Process of the shard","type":[[["ChildProcess"]]],"meta":{"line":42,"file":"Shard.js","path":"src/sharding"}}],"methods":[{"name":"send","description":"Sends a message to the shard's process.","params":[{"name":"message","description":"Message to send to the shard","type":[["*"]]}],"returns":[[["Promise","<"],["Shard",">"]]],"meta":{"line":59,"file":"Shard.js","path":"src/sharding"}},{"name":"fetchClientValue","description":"Fetches a Client property value of the shard.","examples":["shard.fetchClientValue('guilds.size').then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n}).catch(console.error);"],"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":[[["string"]]]}],"returns":[[["Promise","<"],["*",">"]]],"meta":{"line":77,"file":"Shard.js","path":"src/sharding"}},{"name":"eval","description":"Evaluates a script on the shard, in the context of the Client.","params":[{"name":"script","description":"JavaScript to run on the shard","type":[[["string"]]]}],"returns":{"types":[[["Promise","<"],["*",">"]]],"description":"Result of the script execution"},"meta":{"line":105,"file":"Shard.js","path":"src/sharding"}},{"name":"_handleMessage","description":"Handles an IPC message","access":"private","params":[{"name":"message","description":"Message received","type":[["*"]]}],"meta":{"line":133,"file":"Shard.js","path":"src/sharding"}}],"meta":{"line":9,"file":"Shard.js","path":"src/sharding"}},{"name":"ShardClientUtil","description":"Helper class for sharded clients spawned as a child process, such as from a ShardingManager","construct":{"name":"ShardClientUtil","params":[{"name":"client","description":"Client of the current shard","type":[[["Client"]]]}]},"props":[{"name":"id","description":"ID of this shard","readonly":true,"type":[[["number"]]],"meta":{"line":21,"file":"ShardClientUtil.js","path":"src/sharding"}},{"name":"count","description":"Total number of shards","readonly":true,"type":[[["number"]]],"meta":{"line":30,"file":"ShardClientUtil.js","path":"src/sharding"}}],"methods":[{"name":"send","description":"Sends a message to the master process","params":[{"name":"message","description":"Message to send","type":[["*"]]}],"returns":[[["Promise","<"],["void",">"]]],"meta":{"line":39,"file":"ShardClientUtil.js","path":"src/sharding"}},{"name":"fetchClientValues","description":"Fetches a Client property value of each shard.","examples":["client.shard.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":[[["string"]]]}],"returns":[[["Promise","<"],["Array",">"]]],"meta":{"line":57,"file":"ShardClientUtil.js","path":"src/sharding"}},{"name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","params":[{"name":"script","description":"JavaScript to run on each shard","type":[[["string"]]]}],"returns":{"types":[[["Promise","<"],["Array",">"]]],"description":"Results of the script execution"},"meta":{"line":78,"file":"ShardClientUtil.js","path":"src/sharding"}},{"name":"_handleMessage","description":"Handles an IPC message","access":"private","params":[{"name":"message","description":"Message received","type":[["*"]]}],"meta":{"line":99,"file":"ShardClientUtil.js","path":"src/sharding"}},{"name":"_respond","description":"Sends a message to the master process, emitting an error from the client upon failure","access":"private","params":[{"name":"type","description":"Type of response to send","type":[[["string"]]]},{"name":"message","description":"Message to send","type":[["*"]]}],"meta":{"line":121,"file":"ShardClientUtil.js","path":"src/sharding"}},{"name":"singleton","description":"Creates/gets the singleton of this class","scope":"static","params":[{"name":"client","description":"Client to use","type":[[["Client"]]]}],"returns":[[["ShardClientUtil"]]],"meta":{"line":133,"file":"ShardClientUtil.js","path":"src/sharding"}}],"meta":{"line":7,"file":"ShardClientUtil.js","path":"src/sharding"}},{"name":"ShardingManager","description":"This is a utility class that can be used to help you spawn shards of your Client. Each shard is completely separate\nfrom the other. The Shard Manager takes a path to a file and spawns it under the specified amount of shards safely.\nIf you do not select an amount of shards, the manager will automatically decide the best amount.","extends":["EventEmitter"],"construct":{"name":"ShardingManager","params":[{"name":"file","description":"Path to your shard script file","type":[[["string"]]]},{"name":"options","description":"Options for the sharding manager","optional":true,"type":[[["Object"]]]},{"name":"options.totalShards","description":"Number of shards to spawn, or \"auto\"","optional":true,"default":"'auto'","type":[[["number"]],[["string"]]]},{"name":"options.respawn","description":"Whether shards should automatically respawn upon exiting","optional":true,"default":true,"type":[[["boolean"]]]},{"name":"options.shardArgs","description":"Arguments to pass to the shard script when spawning","optional":true,"default":"[]","type":[[["Array","<"],["string",">"]]]},{"name":"options.token","description":"Token to use for automatic shard count and passing to shards","optional":true,"type":[[["string"]]]}]},"props":[{"name":"file","description":"Path to the shard script file","type":[[["string"]]],"meta":{"line":37,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"totalShards","description":"Amount of shards that this manager is going to spawn","type":[[["number"]],[["string"]]],"meta":{"line":47,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"respawn","description":"Whether shards should automatically respawn upon exiting","type":[[["boolean"]]],"meta":{"line":62,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"shardArgs","description":"An array of arguments to pass to shards.","type":[[["Array","<"],["string",">"]]],"meta":{"line":68,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"token","description":"Token to use for obtaining the automatic shard count, and passing to shards","nullable":true,"type":[[["string"]]],"meta":{"line":74,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"shards","description":"A collection of shards that this manager has spawned","type":[[["Collection","<"],["number",", "],["Shard",">"]]],"meta":{"line":80,"file":"ShardingManager.js","path":"src/sharding"}}],"methods":[{"name":"createShard","description":"Spawns a single shard.","params":[{"name":"id","description":"The ID of the shard to spawn. **This is usually not necessary.**","type":[[["number"]]]}],"returns":[[["Promise","<"],["Shard",">"]]],"meta":{"line":88,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"spawn","description":"Spawns multiple shards.","params":[{"name":"amount","description":"Number of shards to spawn","optional":true,"default":"this.totalShards","type":[[["number"]]]},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","optional":true,"default":5500,"type":[[["number"]]]}],"returns":[[["Promise","<"],["Collection","<"],["number",", "],["Shard",">>"]]],"meta":{"line":106,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"_spawn","description":"Actually spawns shards, unlike that poser above >:(","access":"private","params":[{"name":"amount","description":"Number of shards to spawn","type":[[["number"]]]},{"name":"delay","description":"How long to wait in between spawning each shard (in milliseconds)","type":[[["number"]]]}],"returns":[[["Promise","<"],["Collection","<"],["number",", "],["Shard",">>"]]],"meta":{"line":127,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"broadcast","description":"Send a message to all shards.","params":[{"name":"message","description":"Message to be sent to the shards","type":[["*"]]}],"returns":[[["Promise","<"],["Array","<"],["Shard",">>"]]],"meta":{"line":158,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"broadcastEval","description":"Evaluates a script on all shards, in the context of the Clients.","params":[{"name":"script","description":"JavaScript to run on each shard","type":[[["string"]]]}],"returns":{"types":[[["Promise","<"],["Array",">"]]],"description":"Results of the script execution"},"meta":{"line":169,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"fetchClientValues","description":"Fetches a Client property value of each shard.","examples":["manager.fetchClientValues('guilds.size').then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n}).catch(console.error);"],"params":[{"name":"prop","description":"Name of the Client property to get, using periods for nesting","type":[[["string"]]]}],"returns":[[["Promise","<"],["Array",">"]]],"meta":{"line":184,"file":"ShardingManager.js","path":"src/sharding"}}],"events":[{"name":"message","description":"Emitted upon recieving a message from a shard","params":[{"name":"shard","description":"Shard that sent the message","type":[[["Shard"]]]},{"name":"message","description":"Message that was received","type":[["*"]]}],"meta":{"line":154,"file":"Shard.js","path":"src/sharding"}},{"name":"launch","description":"Emitted upon launching a shard","params":[{"name":"shard","description":"Shard that was launched","type":[[["Shard"]]]}],"meta":{"line":91,"file":"ShardingManager.js","path":"src/sharding"}}],"meta":{"line":15,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"Channel","description":"Represents any channel on Discord","props":[{"name":"client","description":"The client that instantiated the Channel","readonly":true,"type":[[["Client"]]],"meta":{"line":6,"file":"Channel.js","path":"src/structures"}},{"name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","type":[[["string"]]],"meta":{"line":22,"file":"Channel.js","path":"src/structures"}},{"name":"id","description":"The unique ID of the channel","type":[[["string"]]],"meta":{"line":32,"file":"Channel.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the channel was created at","readonly":true,"type":[[["number"]]],"meta":{"line":40,"file":"Channel.js","path":"src/structures"}},{"name":"createdAt","description":"The time the channel was created","readonly":true,"type":[[["Date"]]],"meta":{"line":49,"file":"Channel.js","path":"src/structures"}}],"methods":[{"name":"delete","description":"Deletes the channel","examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"returns":[[["Promise","<"],["Channel",">"]]],"meta":{"line":62,"file":"Channel.js","path":"src/structures"}}],"meta":{"line":4,"file":"Channel.js","path":"src/structures"}},{"name":"ClientOAuth2Application","description":"Represents the client's OAuth2 Application","extends":["OAuth2Application"],"props":[{"name":"flags","description":"The app's flags","type":[[["number"]]],"meta":{"line":16,"file":"ClientOAuth2Application.js","path":"src/structures"}},{"name":"owner","description":"The app's owner","type":[[["User"]]],"meta":{"line":22,"file":"ClientOAuth2Application.js","path":"src/structures"}},{"name":"client","description":"The client that instantiated the application","readonly":true,"type":[[["Client"]]],"meta":{"line":6,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"id","description":"The ID of the app","type":[[["string"]]],"meta":{"line":22,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"name","description":"The name of the app","type":[[["string"]]],"meta":{"line":28,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"description","description":"The app's description","type":[[["string"]]],"meta":{"line":34,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"icon","description":"The app's icon hash","type":[[["string"]]],"meta":{"line":40,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"iconURL","description":"The app's icon URL","type":[[["string"]]],"meta":{"line":46,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"rpcOrigins","description":"The app's RPC origins","type":[[["Array","<"],["string",">"]]],"meta":{"line":52,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the app was created at","readonly":true,"type":[[["number"]]],"meta":{"line":60,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"createdAt","description":"The time the app was created","readonly":true,"type":[[["Date"]]],"meta":{"line":69,"file":"OAuth2Application.js","path":"src/structures"}}],"methods":[{"name":"toString","description":"When concatenated with a string, this automatically concatenates the app name rather than the app object.","inherits":"OAuth2Application#toString","inherited":true,"returns":[[["string"]]],"meta":{"line":77,"file":"OAuth2Application.js","path":"src/structures"}}],"meta":{"line":8,"file":"ClientOAuth2Application.js","path":"src/structures"}},{"name":"ClientUser","description":"Represents the logged in client's Discord user","extends":["User"],"props":[{"name":"verified","description":"Whether or not this account has been verified","type":[[["boolean"]]],"meta":{"line":16,"file":"ClientUser.js","path":"src/structures"}},{"name":"email","description":"The email of this account","type":[[["string"]]],"meta":{"line":22,"file":"ClientUser.js","path":"src/structures"}},{"name":"friends","description":"A Collection of friends for the logged in user.\n<warn>This is only filled when using a user account.</warn>","type":[[["Collection","<"],["string",", "],["User",">"]]],"meta":{"line":31,"file":"ClientUser.js","path":"src/structures"}},{"name":"blocked","description":"A Collection of blocked users for the logged in user.\n<warn>This is only filled when using a user account.</warn>","type":[[["Collection","<"],["string",", "],["User",">"]]],"meta":{"line":38,"file":"ClientUser.js","path":"src/structures"}},{"name":"notes","description":"A Collection of notes for the logged in user.\n<warn>This is only filled when using a user account.</warn>","type":[[["Collection","<"],["string",", "],["string",">"]]],"meta":{"line":45,"file":"ClientUser.js","path":"src/structures"}},{"name":"client","description":"The Client that created the instance of the the User.","readonly":true,"type":[[["Client"]]],"meta":{"line":11,"file":"User.js","path":"src/structures"}},{"name":"id","description":"The ID of the user","type":[[["string"]]],"meta":{"line":27,"file":"User.js","path":"src/structures"}},{"name":"username","description":"The username of the user","type":[[["string"]]],"meta":{"line":33,"file":"User.js","path":"src/structures"}},{"name":"discriminator","description":"A discriminator based on username for the user","type":[[["string"]]],"meta":{"line":39,"file":"User.js","path":"src/structures"}},{"name":"avatar","description":"The ID of the user's avatar","type":[[["string"]]],"meta":{"line":45,"file":"User.js","path":"src/structures"}},{"name":"bot","description":"Whether or not the user is a bot.","type":[[["boolean"]]],"meta":{"line":51,"file":"User.js","path":"src/structures"}},{"name":"lastMessageID","description":"The ID of the last message sent by the user, if one was sent.","nullable":true,"type":[[["string"]]],"meta":{"line":57,"file":"User.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the user was created at","readonly":true,"type":[[["number"]]],"meta":{"line":72,"file":"User.js","path":"src/structures"}},{"name":"createdAt","description":"The time the user was created","readonly":true,"type":[[["Date"]]],"meta":{"line":81,"file":"User.js","path":"src/structures"}},{"name":"presence","description":"The presence of this user","readonly":true,"type":[[["Presence"]]],"meta":{"line":90,"file":"User.js","path":"src/structures"}},{"name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","readonly":true,"nullable":true,"type":[[["string"]]],"meta":{"line":103,"file":"User.js","path":"src/structures"}},{"name":"defaultAvatarURL","description":"A link to the user's default avatar","readonly":true,"type":[[["string"]]],"meta":{"line":113,"file":"User.js","path":"src/structures"}},{"name":"displayAvatarURL","description":"A link to the user's avatar if they have one. Otherwise a link to their default avatar will be returned","readonly":true,"type":[[["string"]]],"meta":{"line":124,"file":"User.js","path":"src/structures"}},{"name":"note","description":"The note that is set for the user\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["string"]]],"meta":{"line":134,"file":"User.js","path":"src/structures"}},{"name":"dmChannel","description":"The DM between the client's user and this user","nullable":true,"type":[[["DMChannel"]]],"meta":{"line":172,"file":"User.js","path":"src/structures"}}],"methods":[{"name":"setUsername","description":"Set the username of the logged in Client.\n<info>Changing usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!</info>","examples":["// set username\nclient.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.error);"],"params":[{"name":"username","description":"The new username","type":[[["string"]]]},{"name":"password","description":"Current password (only for user accounts)","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["ClientUser",">"]]],"meta":{"line":65,"file":"ClientUser.js","path":"src/structures"}},{"name":"setEmail","description":"Changes the email for the client user's account.\n<warn>This is only available when using a user account.</warn>","examples":["// set email\nclient.user.setEmail('bob@gmail.com', 'some amazing password 123')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.error);"],"params":[{"name":"email","description":"New email to change to","type":[[["string"]]]},{"name":"password","description":"Current password","type":[[["string"]]]}],"returns":[[["Promise","<"],["ClientUser",">"]]],"meta":{"line":81,"file":"ClientUser.js","path":"src/structures"}},{"name":"setPassword","description":"Changes the password for the client user's account.\n<warn>This is only available when using a user account.</warn>","examples":["// set password\nclient.user.setPassword('some new amazing password 456', 'some amazing password 123')\n .then(user => console.log('New password set!'))\n .catch(console.error);"],"params":[{"name":"newPassword","description":"New password to change to","type":[[["string"]]]},{"name":"oldPassword","description":"Current password","type":[[["string"]]]}],"returns":[[["Promise","<"],["ClientUser",">"]]],"meta":{"line":97,"file":"ClientUser.js","path":"src/structures"}},{"name":"setAvatar","description":"Set the avatar of the logged in Client.","examples":["// set avatar\nclient.user.setAvatar('./avatar.png')\n .then(user => console.log(`New avatar set!`))\n .catch(console.error);"],"params":[{"name":"avatar","description":"The new avatar","type":[[["BufferResolvable"]],[["Base64Resolvable"]]]}],"returns":[[["Promise","<"],["ClientUser",">"]]],"meta":{"line":111,"file":"ClientUser.js","path":"src/structures"}},{"name":"setPresence","description":"Sets the full presence of the client user.","params":[{"name":"data","description":"Data for the presence","type":[[["PresenceData"]]]}],"returns":[[["Promise","<"],["ClientUser",">"]]],"meta":{"line":136,"file":"ClientUser.js","path":"src/structures"}},{"name":"setStatus","description":"Sets the status of the client user.","params":[{"name":"status","description":"Status to change to","type":[[["PresenceStatus"]]]}],"returns":[[["Promise","<"],["ClientUser",">"]]],"meta":{"line":193,"file":"ClientUser.js","path":"src/structures"}},{"name":"setGame","description":"Sets the game the client user is playing.","params":[{"name":"game","description":"Game being played","type":[[["string"]]]},{"name":"streamingURL","description":"Twitch stream URL","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["ClientUser",">"]]],"meta":{"line":203,"file":"ClientUser.js","path":"src/structures"}},{"name":"setAFK","description":"Sets/removes the AFK flag for the client user.","params":[{"name":"afk","description":"Whether or not the user is AFK","type":[[["boolean"]]]}],"returns":[[["Promise","<"],["ClientUser",">"]]],"meta":{"line":215,"file":"ClientUser.js","path":"src/structures"}},{"name":"fetchMentions","description":"Fetches messages that mentioned the client's user","params":[{"name":"options","description":"Options for the fetch","optional":true,"type":[[["Object"]]]},{"name":"options.limit","description":"Maximum number of mentions to retrieve","optional":true,"default":25,"type":[[["number"]]]},{"name":"options.roles","description":"Whether to include role mentions","optional":true,"default":true,"type":[[["boolean"]]]},{"name":"options.everyone","description":"Whether to include everyone/here mentions","optional":true,"default":true,"type":[[["boolean"]]]},{"name":"options.guild","description":"Limit the search to a specific guild","optional":true,"type":[[["Guild"]],[["string"]]]}],"returns":[[["Promise","<"],["Array","<"],["Message",">>"]]],"meta":{"line":228,"file":"ClientUser.js","path":"src/structures"}},{"name":"addFriend","description":"Send a friend request\n<warn>This is only available when using a user account.</warn>","params":[{"name":"user","description":"The user to send the friend request to.","type":[[["UserResolvable"]]]}],"returns":{"types":[[["Promise","<"],["User",">"]]],"description":"The user the friend request was sent to."},"meta":{"line":238,"file":"ClientUser.js","path":"src/structures"}},{"name":"removeFriend","description":"Remove a friend\n<warn>This is only available when using a user account.</warn>","params":[{"name":"user","description":"The user to remove from your friends","type":[[["UserResolvable"]]]}],"returns":{"types":[[["Promise","<"],["User",">"]]],"description":"The user that was removed"},"meta":{"line":249,"file":"ClientUser.js","path":"src/structures"}},{"name":"createGuild","description":"Creates a guild\n<warn>This is only available when using a user account.</warn>","params":[{"name":"name","description":"The name of the guild","type":[[["string"]]]},{"name":"region","description":"The region for the server","type":[[["string"]]]},{"name":"icon","description":"The icon for the guild","optional":true,"default":null,"type":[[["BufferResolvable"]],[["Base64Resolvable"]]]}],"returns":{"types":[[["Promise","<"],["Guild",">"]]],"description":"The guild that was created"},"meta":{"line":262,"file":"ClientUser.js","path":"src/structures"}},{"name":"typingIn","description":"Check whether the user is typing in a channel.","inherits":"User#typingIn","inherited":true,"params":[{"name":"channel","description":"The channel to check in","type":[[["ChannelResolvable"]]]}],"returns":[[["boolean"]]],"meta":{"line":143,"file":"User.js","path":"src/structures"}},{"name":"typingSinceIn","description":"Get the time that the user started typing.","inherits":"User#typingSinceIn","inherited":true,"params":[{"name":"channel","description":"The channel to get the time in","type":[[["ChannelResolvable"]]]}],"returns":{"types":[[["Date"]]],"nullable":true},"meta":{"line":153,"file":"User.js","path":"src/structures"}},{"name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","inherits":"User#typingDurationIn","inherited":true,"params":[{"name":"channel","description":"The channel to get the time in","type":[[["ChannelResolvable"]]]}],"returns":[[["number"]]],"meta":{"line":163,"file":"User.js","path":"src/structures"}},{"name":"deleteDM","description":"Deletes a DM channel (if one exists) between the client and the user. Resolves with the channel if successful.","inherits":"User#deleteDM","inherited":true,"returns":[[["Promise","<"],["DMChannel",">"]]],"meta":{"line":180,"file":"User.js","path":"src/structures"}},{"name":"block","description":"Blocks the user\n<warn>This is only available when using a user account.</warn>","inherits":"User#block","inherited":true,"returns":[[["Promise","<"],["User",">"]]],"meta":{"line":207,"file":"User.js","path":"src/structures"}},{"name":"unblock","description":"Unblocks the user\n<warn>This is only available when using a user account.</warn>","inherits":"User#unblock","inherited":true,"returns":[[["Promise","<"],["User",">"]]],"meta":{"line":216,"file":"User.js","path":"src/structures"}},{"name":"fetchProfile","description":"Get the profile of the user\n<warn>This is only available when using a user account.</warn>","inherits":"User#fetchProfile","inherited":true,"returns":[[["Promise","<"],["UserProfile",">"]]],"meta":{"line":225,"file":"User.js","path":"src/structures"}},{"name":"setNote","description":"Sets a note for the user\n<warn>This is only available when using a user account.</warn>","inherits":"User#setNote","inherited":true,"params":[{"name":"note","description":"The note to set for the user","type":[[["string"]]]}],"returns":[[["Promise","<"],["User",">"]]],"meta":{"line":235,"file":"User.js","path":"src/structures"}},{"name":"equals","description":"Checks if the user is equal to another. It compares ID, username, discriminator, avatar, and bot flags.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","inherits":"User#equals","inherited":true,"params":[{"name":"user","description":"User to compare with","type":[[["User"]]]}],"returns":[[["boolean"]]],"meta":{"line":245,"file":"User.js","path":"src/structures"}},{"name":"toString","description":"When concatenated with a string, this automatically concatenates the user's mention instead of the User object.","inherits":"User#toString","inherited":true,"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[["string"]]],"meta":{"line":263,"file":"User.js","path":"src/structures"}},{"name":"send","description":"Send a message to this channel","inherits":"User#send","inherited":true,"implements":["TextBasedChannel#send"],"examples":["// send a message\nchannel.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":67,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendMessage","description":"Send a message to this channel","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":106,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendEmbed","description":"Send an embed to this channel","inherits":"User#sendEmbed","inherited":true,"implements":["TextBasedChannel#sendEmbed"],"params":[{"name":"embed","description":"Embed for the message","type":[[["RichEmbed"]],[["Object"]]]},{"name":"content","description":"Text for the message","optional":true,"type":[[["string"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":117,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendFile","description":"Send a file to this channel","inherits":"User#sendFile","inherited":true,"implements":["TextBasedChannel#sendFile"],"params":[{"name":"attachment","description":"File to send","type":[[["BufferResolvable"]]]},{"name":"name","description":"Name and extension of the file","optional":true,"default":"'file.jpg'","type":[[["string"]]]},{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":135,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendCode","description":"Send a code block to this channel","inherits":"User#sendCode","inherited":true,"implements":["TextBasedChannel#sendCode"],"params":[{"name":"lang","description":"Language for the code block","type":[[["string"]]]},{"name":"content","description":"Content of the code block","type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":146,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"meta":{"line":8,"file":"ClientUser.js","path":"src/structures"}},{"name":"DMChannel","description":"Represents a direct message channel between two users.","extends":["Channel"],"implements":["TextBasedChannel"],"props":[{"name":"recipient","description":"The recipient on the other end of the DM","type":[[["User"]]],"meta":{"line":25,"file":"DMChannel.js","path":"src/structures"}},{"name":"messages","description":"A collection containing the messages sent to this channel.","type":[[["Collection","<"],["string",", "],["Message",">"]]],"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","nullable":true,"type":[[["string"]]],"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","readonly":true,"type":[[["boolean"]]],"meta":{"line":268,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"typingCount","description":"Number of times `startTyping` has been called.","readonly":true,"type":[[["number"]]],"meta":{"line":277,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"client","description":"The client that instantiated the Channel","readonly":true,"type":[[["Client"]]],"meta":{"line":6,"file":"Channel.js","path":"src/structures"}},{"name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","type":[[["string"]]],"meta":{"line":22,"file":"Channel.js","path":"src/structures"}},{"name":"id","description":"The unique ID of the channel","type":[[["string"]]],"meta":{"line":32,"file":"Channel.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the channel was created at","readonly":true,"type":[[["number"]]],"meta":{"line":40,"file":"Channel.js","path":"src/structures"}},{"name":"createdAt","description":"The time the channel was created","readonly":true,"type":[[["Date"]]],"meta":{"line":49,"file":"Channel.js","path":"src/structures"}}],"methods":[{"name":"toString","description":"When concatenated with a string, this automatically concatenates the recipient's mention instead of the\nDM channel object.","returns":[[["string"]]],"meta":{"line":35,"file":"DMChannel.js","path":"src/structures"}},{"name":"send","description":"Send a message to this channel","implements":["TextBasedChannel#send"],"examples":["// send a message\nchannel.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":67,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendMessage","description":"Send a message to this channel","implements":["TextBasedChannel#sendMessage"],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":106,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendEmbed","description":"Send an embed to this channel","implements":["TextBasedChannel#sendEmbed"],"params":[{"name":"embed","description":"Embed for the message","type":[[["RichEmbed"]],[["Object"]]]},{"name":"content","description":"Text for the message","optional":true,"type":[[["string"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":117,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendFile","description":"Send a file to this channel","implements":["TextBasedChannel#sendFile"],"params":[{"name":"attachment","description":"File to send","type":[[["BufferResolvable"]]]},{"name":"name","description":"Name and extension of the file","optional":true,"default":"'file.jpg'","type":[[["string"]]]},{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":135,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendCode","description":"Send a code block to this channel","implements":["TextBasedChannel#sendCode"],"params":[{"name":"lang","description":"Language for the code block","type":[[["string"]]]},{"name":"content","description":"Content of the code block","type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":146,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\n<warn>This is only available when using a bot account.</warn>","implements":["TextBasedChannel#fetchMessage"],"examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"params":[{"name":"messageID","description":"ID of the message to get","type":[[["string"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":161,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a collection mapping message ID's to Message objects.","implements":["TextBasedChannel#fetchMessages"],"examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"params":[{"name":"options","description":"Query parameters to pass in","optional":true,"default":"{}","type":[[["ChannelLogsQueryOptions"]]]}],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"meta":{"line":189,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"fetchPinnedMessages","description":"Fetches the pinned messages of this channel and returns a collection of them.","implements":["TextBasedChannel#fetchPinnedMessages"],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"meta":{"line":205,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"startTyping","description":"Starts a typing indicator in the channel.","implements":["TextBasedChannel#startTyping"],"examples":["// start typing in a channel\nchannel.startTyping();"],"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":[[["number"]]]}],"meta":{"line":224,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\n<info>It can take a few seconds for the client user to stop typing.</info>","implements":["TextBasedChannel#stopTyping"],"examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"default":false,"type":[[["boolean"]]]}],"meta":{"line":252,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"createCollector","description":"Creates a Message Collector","implements":["TextBasedChannel#createCollector"],"examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"params":[{"name":"filter","description":"The filter to create the collector with","type":[[["CollectorFilterFunction"]]]},{"name":"options","description":"The options to pass to the collector","optional":true,"default":"{}","type":[[["CollectorOptions"]]]}],"returns":[[["MessageCollector"]]],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"awaitMessages","description":"Similar to createCollector but in promise form. Resolves with a collection of messages that pass the specified\nfilter.","implements":["TextBasedChannel#awaitMessages"],"examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"params":[{"name":"filter","description":"The filter function to use","type":[[["CollectorFilterFunction"]]]},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"default":"{}","type":[[["AwaitMessagesOptions"]]]}],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"meta":{"line":320,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"bulkDelete","description":"Bulk delete given messages.\n<warn>This is only available when using a bot account.</warn>","implements":["TextBasedChannel#bulkDelete"],"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":[[["Collection","<"],["string",", "],["Message",">"]],[["Array","<"],["Message",">"]],[["number"]]]}],"returns":{"types":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"description":"Deleted messages"},"meta":{"line":339,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"delete","description":"Deletes the channel","inherits":"Channel#delete","inherited":true,"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"returns":[[["Promise","<"],["Channel",">"]]],"meta":{"line":62,"file":"Channel.js","path":"src/structures"}}],"meta":{"line":10,"file":"DMChannel.js","path":"src/structures"}},{"name":"Emoji","description":"Represents a custom emoji","props":[{"name":"client","description":"The Client that instantiated this object","readonly":true,"type":[[["Client"]]],"meta":{"line":9,"file":"Emoji.js","path":"src/structures"}},{"name":"guild","description":"The guild this emoji is part of","type":[[["Guild"]]],"meta":{"line":21,"file":"Emoji.js","path":"src/structures"}},{"name":"id","description":"The ID of the emoji","type":[[["string"]]],"meta":{"line":31,"file":"Emoji.js","path":"src/structures"}},{"name":"name","description":"The name of the emoji","type":[[["string"]]],"meta":{"line":37,"file":"Emoji.js","path":"src/structures"}},{"name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","type":[[["boolean"]]],"meta":{"line":43,"file":"Emoji.js","path":"src/structures"}},{"name":"managed","description":"Whether this emoji is managed by an external service","type":[[["boolean"]]],"meta":{"line":49,"file":"Emoji.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the emoji was created at","readonly":true,"type":[[["number"]]],"meta":{"line":59,"file":"Emoji.js","path":"src/structures"}},{"name":"createdAt","description":"The time the emoji was created","readonly":true,"type":[[["Date"]]],"meta":{"line":68,"file":"Emoji.js","path":"src/structures"}},{"name":"roles","description":"A collection of roles this emoji is active for (empty if all), mapped by role ID.","readonly":true,"type":[[["Collection","<"],["string",", "],["Role",">"]]],"meta":{"line":77,"file":"Emoji.js","path":"src/structures"}},{"name":"url","description":"The URL to the emoji file","readonly":true,"type":[[["string"]]],"meta":{"line":90,"file":"Emoji.js","path":"src/structures"}},{"name":"identifier","description":"The identifier of this emoji, used for message reactions","readonly":true,"type":[[["string"]]],"meta":{"line":132,"file":"Emoji.js","path":"src/structures"}}],"methods":[{"name":"toString","description":"When concatenated with a string, this automatically returns the emoji mention rather than the object.","examples":["// send an emoji:\nconst emoji = guild.emojis.first();\nmsg.reply(`Hello! ${emoji}`);"],"returns":[[["string"]]],"meta":{"line":102,"file":"Emoji.js","path":"src/structures"}},{"name":"equals","description":"Whether this emoji is the same as another one","params":[{"name":"other","description":"the emoji to compare it to","type":[[["Emoji"]],[["Object"]]]}],"returns":{"types":[[["boolean"]]],"description":"whether the emoji is equal to the given emoji or not"},"meta":{"line":111,"file":"Emoji.js","path":"src/structures"}}],"meta":{"line":7,"file":"Emoji.js","path":"src/structures"}},{"name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","props":[{"name":"member","description":"The member this permissions refer to","type":[[["GuildMember"]]],"meta":{"line":12,"file":"EvaluatedPermissions.js","path":"src/structures"}},{"name":"raw","description":"A number representing the packed permissions","type":[[["number"]]],"meta":{"line":18,"file":"EvaluatedPermissions.js","path":"src/structures"}}],"methods":[{"name":"serialize","description":"Get an object mapping permission name, e.g. `READ_MESSAGES` to a boolean - whether the user\ncan perform this or not.","returns":[[["Object","<"],["string",", "],["boolean",">"]]],"meta":{"line":26,"file":"EvaluatedPermissions.js","path":"src/structures"}},{"name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","params":[{"name":"permission","description":"The permission to check for","type":[[["PermissionResolvable"]]]},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permission","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["boolean"]]],"meta":{"line":40,"file":"EvaluatedPermissions.js","path":"src/structures"}},{"name":"hasPermissions","description":"Checks whether the user has all specified permissions.","params":[{"name":"permissions","description":"The permissions to check for","type":[[["Array","<"],["PermissionResolvable",">"]]]},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["boolean"]]],"meta":{"line":52,"file":"EvaluatedPermissions.js","path":"src/structures"}},{"name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","params":[{"name":"permissions","description":"The permissions to check for","type":[[["Array","<"],["PermissionResolvable",">"]]]},{"name":"explicit","description":"Whether to require the user to explicitly have the exact permissions","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["Array","<"],["PermissionResolvable",">"]]],"meta":{"line":62,"file":"EvaluatedPermissions.js","path":"src/structures"}}],"meta":{"line":6,"file":"EvaluatedPermissions.js","path":"src/structures"}},{"name":"GroupDMChannel","description":"Represents a Group DM on Discord","extends":["Channel"],"implements":["TextBasedChannel"],"props":[{"name":"name","description":"The name of this Group DM, can be null if one isn't set.","type":[[["string"]]],"meta":{"line":47,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"icon","description":"A hash of the Group DM icon.","type":[[["string"]]],"meta":{"line":53,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"ownerID","description":"The user ID of this Group DM's owner.","type":[[["string"]]],"meta":{"line":59,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID.","type":[[["Collection","<"],["string",", "],["User",">"]]],"meta":{"line":66,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"owner","description":"The owner of this Group DM.","readonly":true,"type":[[["User"]]],"meta":{"line":84,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"messages","description":"A collection containing the messages sent to this channel.","type":[[["Collection","<"],["string",", "],["Message",">"]]],"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","nullable":true,"type":[[["string"]]],"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","readonly":true,"type":[[["boolean"]]],"meta":{"line":268,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"typingCount","description":"Number of times `startTyping` has been called.","readonly":true,"type":[[["number"]]],"meta":{"line":277,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"client","description":"The client that instantiated the Channel","readonly":true,"type":[[["Client"]]],"meta":{"line":6,"file":"Channel.js","path":"src/structures"}},{"name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","type":[[["string"]]],"meta":{"line":22,"file":"Channel.js","path":"src/structures"}},{"name":"id","description":"The unique ID of the channel","type":[[["string"]]],"meta":{"line":32,"file":"Channel.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the channel was created at","readonly":true,"type":[[["number"]]],"meta":{"line":40,"file":"Channel.js","path":"src/structures"}},{"name":"createdAt","description":"The time the channel was created","readonly":true,"type":[[["Date"]]],"meta":{"line":49,"file":"Channel.js","path":"src/structures"}}],"methods":[{"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.","params":[{"name":"channel","description":"Channel to compare with","type":[[["GroupDMChannel"]]]}],"returns":[[["boolean"]]],"meta":{"line":95,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"toString","description":"When concatenated with a string, this automatically concatenates the channel's name instead of the Channel object.","examples":["// logs: Hello from My Group DM!\nconsole.log(`Hello from ${channel}!`);","// logs: Hello from My Group DM!\nconsole.log(`Hello from ' + channel + '!');"],"returns":[[["string"]]],"meta":{"line":119,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"send","description":"Send a message to this channel","implements":["TextBasedChannel#send"],"examples":["// send a message\nchannel.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":67,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendMessage","description":"Send a message to this channel","implements":["TextBasedChannel#sendMessage"],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":106,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendEmbed","description":"Send an embed to this channel","implements":["TextBasedChannel#sendEmbed"],"params":[{"name":"embed","description":"Embed for the message","type":[[["RichEmbed"]],[["Object"]]]},{"name":"content","description":"Text for the message","optional":true,"type":[[["string"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":117,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendFile","description":"Send a file to this channel","implements":["TextBasedChannel#sendFile"],"params":[{"name":"attachment","description":"File to send","type":[[["BufferResolvable"]]]},{"name":"name","description":"Name and extension of the file","optional":true,"default":"'file.jpg'","type":[[["string"]]]},{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":135,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendCode","description":"Send a code block to this channel","implements":["TextBasedChannel#sendCode"],"params":[{"name":"lang","description":"Language for the code block","type":[[["string"]]]},{"name":"content","description":"Content of the code block","type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":146,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\n<warn>This is only available when using a bot account.</warn>","implements":["TextBasedChannel#fetchMessage"],"examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"params":[{"name":"messageID","description":"ID of the message to get","type":[[["string"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":161,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a collection mapping message ID's to Message objects.","implements":["TextBasedChannel#fetchMessages"],"examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"params":[{"name":"options","description":"Query parameters to pass in","optional":true,"default":"{}","type":[[["ChannelLogsQueryOptions"]]]}],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"meta":{"line":189,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"fetchPinnedMessages","description":"Fetches the pinned messages of this channel and returns a collection of them.","implements":["TextBasedChannel#fetchPinnedMessages"],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"meta":{"line":205,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"startTyping","description":"Starts a typing indicator in the channel.","implements":["TextBasedChannel#startTyping"],"examples":["// start typing in a channel\nchannel.startTyping();"],"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":[[["number"]]]}],"meta":{"line":224,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\n<info>It can take a few seconds for the client user to stop typing.</info>","implements":["TextBasedChannel#stopTyping"],"examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"default":false,"type":[[["boolean"]]]}],"meta":{"line":252,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"createCollector","description":"Creates a Message Collector","implements":["TextBasedChannel#createCollector"],"examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"params":[{"name":"filter","description":"The filter to create the collector with","type":[[["CollectorFilterFunction"]]]},{"name":"options","description":"The options to pass to the collector","optional":true,"default":"{}","type":[[["CollectorOptions"]]]}],"returns":[[["MessageCollector"]]],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"awaitMessages","description":"Similar to createCollector but in promise form. Resolves with a collection of messages that pass the specified\nfilter.","implements":["TextBasedChannel#awaitMessages"],"examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"params":[{"name":"filter","description":"The filter function to use","type":[[["CollectorFilterFunction"]]]},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"default":"{}","type":[[["AwaitMessagesOptions"]]]}],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"meta":{"line":320,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"bulkDelete","description":"Bulk delete given messages.\n<warn>This is only available when using a bot account.</warn>","implements":["TextBasedChannel#bulkDelete"],"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":[[["Collection","<"],["string",", "],["Message",">"]],[["Array","<"],["Message",">"]],[["number"]]]}],"returns":{"types":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"description":"Deleted messages"},"meta":{"line":339,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"delete","description":"Deletes the channel","inherits":"Channel#delete","inherited":true,"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"returns":[[["Promise","<"],["Channel",">"]]],"meta":{"line":62,"file":"Channel.js","path":"src/structures"}}],"meta":{"line":32,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"Guild","description":"Represents a guild (or a server) on Discord.\n<info>It's recommended to see if a guild is available before performing operations or reading data from it. You can\ncheck this with `guild.available`.</info>","props":[{"name":"client","description":"The Client that created the instance of the the Guild.","readonly":true,"type":[[["Client"]]],"meta":{"line":18,"file":"Guild.js","path":"src/structures"}},{"name":"members","description":"A collection of members that are in this guild. The key is the member's ID, the value is the member.","type":[[["Collection","<"],["string",", "],["GuildMember",">"]]],"meta":{"line":30,"file":"Guild.js","path":"src/structures"}},{"name":"channels","description":"A collection of channels that are in this guild. The key is the channel's ID, the value is the channel.","type":[[["Collection","<"],["string",", "],["GuildChannel",">"]]],"meta":{"line":36,"file":"Guild.js","path":"src/structures"}},{"name":"roles","description":"A collection of roles that are in this guild. The key is the role's ID, the value is the role.","type":[[["Collection","<"],["string",", "],["Role",">"]]],"meta":{"line":42,"file":"Guild.js","path":"src/structures"}},{"name":"presences","description":"A collection of presences in this guild","type":[[["Collection","<"],["string",", "],["Presence",">"]]],"meta":{"line":48,"file":"Guild.js","path":"src/structures"}},{"name":"available","description":"Whether the guild is available to access. If it is not available, it indicates a server outage.","type":[[["boolean"]]],"meta":{"line":56,"file":"Guild.js","path":"src/structures"}},{"name":"id","description":"The Unique ID of the Guild, useful for comparisons.","type":[[["string"]]],"meta":{"line":62,"file":"Guild.js","path":"src/structures"}},{"name":"name","description":"The name of the guild","type":[[["string"]]],"meta":{"line":79,"file":"Guild.js","path":"src/structures"}},{"name":"icon","description":"The hash of the guild icon, or null if there is no icon.","nullable":true,"type":[[["string"]]],"meta":{"line":85,"file":"Guild.js","path":"src/structures"}},{"name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","nullable":true,"type":[[["string"]]],"meta":{"line":91,"file":"Guild.js","path":"src/structures"}},{"name":"region","description":"The region the guild is located in","type":[[["string"]]],"meta":{"line":97,"file":"Guild.js","path":"src/structures"}},{"name":"memberCount","description":"The full amount of members in this guild as of `READY`","type":[[["number"]]],"meta":{"line":103,"file":"Guild.js","path":"src/structures"}},{"name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","type":[[["boolean"]]],"meta":{"line":109,"file":"Guild.js","path":"src/structures"}},{"name":"features","description":"An array of guild features.","type":[[["Array","<"],["Object",">"]]],"meta":{"line":115,"file":"Guild.js","path":"src/structures"}},{"name":"applicationID","description":"The ID of the application that created this guild (if applicable)","nullable":true,"type":[[["string"]]],"meta":{"line":121,"file":"Guild.js","path":"src/structures"}},{"name":"emojis","description":"A collection of emojis that are in this guild. The key is the emoji's ID, the value is the emoji.","type":[[["Collection","<"],["string",", "],["Emoji",">"]]],"meta":{"line":127,"file":"Guild.js","path":"src/structures"}},{"name":"afkTimeout","description":"The time in seconds before a user is counted as \"away from keyboard\".","nullable":true,"type":[[["number"]]],"meta":{"line":134,"file":"Guild.js","path":"src/structures"}},{"name":"afkChannelID","description":"The ID of the voice channel where AFK members are moved.","nullable":true,"type":[[["string"]]],"meta":{"line":140,"file":"Guild.js","path":"src/structures"}},{"name":"embedEnabled","description":"Whether embedded images are enabled on this guild.","type":[[["boolean"]]],"meta":{"line":146,"file":"Guild.js","path":"src/structures"}},{"name":"verificationLevel","description":"The verification level of the guild.","type":[[["number"]]],"meta":{"line":152,"file":"Guild.js","path":"src/structures"}},{"name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","type":[[["number"]]],"meta":{"line":158,"file":"Guild.js","path":"src/structures"}},{"name":"ownerID","description":"The user ID of this guild's owner.","type":[[["string"]]],"meta":{"line":174,"file":"Guild.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the guild was created at","readonly":true,"type":[[["number"]]],"meta":{"line":219,"file":"Guild.js","path":"src/structures"}},{"name":"createdAt","description":"The time the guild was created","readonly":true,"type":[[["Date"]]],"meta":{"line":228,"file":"Guild.js","path":"src/structures"}},{"name":"joinedAt","description":"The time the client user joined the guild","readonly":true,"type":[[["Date"]]],"meta":{"line":237,"file":"Guild.js","path":"src/structures"}},{"name":"iconURL","description":"Gets the URL to this guild's icon (if it has one, otherwise it returns null)","readonly":true,"nullable":true,"type":[[["string"]]],"meta":{"line":246,"file":"Guild.js","path":"src/structures"}},{"name":"splashURL","description":"Gets the URL to this guild's splash (if it has one, otherwise it returns null)","readonly":true,"nullable":true,"type":[[["string"]]],"meta":{"line":256,"file":"Guild.js","path":"src/structures"}},{"name":"owner","description":"The owner of the guild","readonly":true,"type":[[["GuildMember"]]],"meta":{"line":266,"file":"Guild.js","path":"src/structures"}},{"name":"voiceConnection","description":"If the client is connected to any voice channel in this guild, this will be the relevant VoiceConnection.","readonly":true,"nullable":true,"type":[[["VoiceConnection"]]],"meta":{"line":275,"file":"Guild.js","path":"src/structures"}},{"name":"defaultChannel","description":"The `#general` GuildChannel of the server.","readonly":true,"type":[[["GuildChannel"]]],"meta":{"line":285,"file":"Guild.js","path":"src/structures"}}],"methods":[{"name":"setup","description":"Sets up the Guild","access":"private","params":[{"name":"data","description":"The raw data of the guild","type":[["*"]]}],"meta":{"line":74,"file":"Guild.js","path":"src/structures"}},{"name":"member","description":"Returns the GuildMember form of a User object, if the user is present in the guild.","examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"params":[{"name":"user","description":"The user that you want to obtain the GuildMember of","type":[[["UserResolvable"]]]}],"returns":{"types":[[["GuildMember"]]],"nullable":true},"meta":{"line":297,"file":"Guild.js","path":"src/structures"}},{"name":"fetchBans","description":"Fetch a collection of banned users in this guild.","returns":[[["Promise","<"],["Collection","<"],["string",", "],["User",">>"]]],"meta":{"line":305,"file":"Guild.js","path":"src/structures"}},{"name":"fetchInvites","description":"Fetch a collection of invites to this guild. Resolves with a collection mapping invites by their codes.","returns":[[["Promise","<"],["Collection","<"],["string",", "],["Invite",">>"]]],"meta":{"line":313,"file":"Guild.js","path":"src/structures"}},{"name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","returns":[[["Collection","<"],["Webhook",">"]]],"meta":{"line":321,"file":"Guild.js","path":"src/structures"}},{"name":"fetchMember","description":"Fetch a single guild member from a user.","params":[{"name":"user","description":"The user to fetch the member for","type":[[["UserResolvable"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":330,"file":"Guild.js","path":"src/structures"}},{"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.","params":[{"name":"query","description":"An optional query to provide when fetching members","optional":true,"default":"''","type":[[["string"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":344,"file":"Guild.js","path":"src/structures"}},{"name":"edit","description":"Updates the Guild with new information - e.g. a new name.","examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.error);"],"params":[{"name":"data","description":"The data to update the guild with","type":[[["GuildEditData"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":391,"file":"Guild.js","path":"src/structures"}},{"name":"setName","description":"Edit the name of the guild.","examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.error);"],"params":[{"name":"name","description":"The new name of the guild","type":[[["string"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":405,"file":"Guild.js","path":"src/structures"}},{"name":"setRegion","description":"Edit the region of the guild.","examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.error);"],"params":[{"name":"region","description":"The new region of the guild.","type":[[["string"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":419,"file":"Guild.js","path":"src/structures"}},{"name":"setVerificationLevel","description":"Edit the verification level of the guild.","examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.error);"],"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":[[["number"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":433,"file":"Guild.js","path":"src/structures"}},{"name":"setAFKChannel","description":"Edit the AFK channel of the guild.","examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.error);"],"params":[{"name":"afkChannel","description":"The new AFK channel","type":[[["ChannelResolvable"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":447,"file":"Guild.js","path":"src/structures"}},{"name":"setAFKTimeout","description":"Edit the AFK timeout of the guild.","examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.error);"],"params":[{"name":"afkTimeout","description":"The time in seconds that a user must be idle to be considered AFK","type":[[["number"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":461,"file":"Guild.js","path":"src/structures"}},{"name":"setIcon","description":"Set a new guild icon.","examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.error);"],"params":[{"name":"icon","description":"The new icon of the guild","type":[[["Base64Resolvable"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":475,"file":"Guild.js","path":"src/structures"}},{"name":"setOwner","description":"Sets a new owner of the guild.","examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.error);"],"params":[{"name":"owner","description":"The new owner of the guild","type":[[["GuildMemberResolvable"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":489,"file":"Guild.js","path":"src/structures"}},{"name":"setSplash","description":"Set a new guild splash screen.","examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.error);"],"params":[{"name":"splash","description":"The new splash screen of the guild","type":[[["Base64Resolvable"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":503,"file":"Guild.js","path":"src/structures"}},{"name":"ban","description":"Bans a user from the guild.","examples":["// ban a user\nguild.ban('123123123123');"],"params":[{"name":"user","description":"The user to ban","type":[[["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,"default":0,"type":[[["number"]]]}],"returns":{"types":[[["Promise","<("],["GuildMember","|"],["User","|"],["string",")>"]]],"description":"Result object will be resolved as specifically as possible.\nIf the GuildMember cannot be resolved, the User will instead be attempted to be resolved. If that also cannot\nbe resolved, the user ID will be the result."},"meta":{"line":519,"file":"Guild.js","path":"src/structures"}},{"name":"unban","description":"Unbans a user from the guild.","examples":["// unban a user\nguild.unban('123123123123')\n .then(user => console.log(`Unbanned ${user.username} from ${guild.name}`))\n .catch(reject);"],"params":[{"name":"user","description":"The user to unban","type":[[["UserResolvable"]]]}],"returns":[[["Promise","<"],["User",">"]]],"meta":{"line":533,"file":"Guild.js","path":"src/structures"}},{"name":"pruneMembers","description":"Prunes members from the guild based on how long they have been inactive.","examples":["// see how many members will be pruned\nguild.pruneMembers(12, true)\n .then(pruned => console.log(`This will prune ${pruned} people!`);\n .catch(console.error);","// actually prune the members\nguild.pruneMembers(12)\n .then(pruned => console.log(`I just pruned ${pruned} people!`);\n .catch(console.error);"],"params":[{"name":"days","description":"Number of days of inactivity required to kick","type":[[["number"]]]},{"name":"dry","description":"If true, will return number of users that will be kicked, without actually doing it","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":{"types":[[["Promise","<"],["number",">"]]],"description":"The number of members that were/will be kicked"},"meta":{"line":553,"file":"Guild.js","path":"src/structures"}},{"name":"sync","description":"Syncs this guild (already done automatically every 30 seconds).\n<warn>This is only available when using a user account.</warn>","meta":{"line":562,"file":"Guild.js","path":"src/structures"}},{"name":"createChannel","description":"Creates a new channel in the guild.","examples":["// create a new text channel\nguild.createChannel('new-general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.error);"],"params":[{"name":"name","description":"The name of the new channel","type":[[["string"]]]},{"name":"type","description":"The type of the new channel, either `text` or `voice`","type":[[["string"]]]},{"name":"overwrites","description":"Permission overwrites to apply to the new channel","type":[[["Array","<("],["PermissionOverwrites","|"],["Object",")>"]]]}],"returns":[[["Promise","<("],["TextChannel","|"],["VoiceChannel",")>"]]],"meta":{"line":578,"file":"Guild.js","path":"src/structures"}},{"name":"createRole","description":"Creates a new role in the guild, and optionally updates it with the given information.","examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error);","// create a new role with data\nguild.createRole({ name: 'Super Cool People' })\n .then(role => console.log(`Created role ${role}`))\n .catch(console.error)"],"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":[[["RoleData"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":597,"file":"Guild.js","path":"src/structures"}},{"name":"createEmoji","description":"Creates a new custom emoji in the guild.","examples":["// create a new emoji from a url\nguild.createEmoji('https://i.imgur.com/w3duR07.png', 'rip')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);","// create a new emoji from a file on your computer\nguild.createEmoji('./memes/banana.png', 'banana')\n .then(emoji => console.log(`Created new emoji with name ${emoji.name}!`))\n .catch(console.error);"],"params":[{"name":"attachment","description":"The image for the emoji.","type":[[["BufferResolvable"]]]},{"name":"name","description":"The name for the emoji.","type":[[["string"]]]}],"returns":{"types":[[["Promise","<"],["Emoji",">"]]],"description":"The created emoji."},"meta":{"line":619,"file":"Guild.js","path":"src/structures"}},{"name":"deleteEmoji","description":"Delete an emoji.","params":[{"name":"emoji","description":"The emoji to delete.","type":[[["Emoji"]],[["string"]]]}],"returns":[[["Promise"]]],"meta":{"line":636,"file":"Guild.js","path":"src/structures"}},{"name":"leave","description":"Causes the Client to leave the guild.","examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.error);"],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":650,"file":"Guild.js","path":"src/structures"}},{"name":"delete","description":"Causes the Client to delete the guild.","examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.error);"],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":663,"file":"Guild.js","path":"src/structures"}},{"name":"setRolePosition","description":"Set the position of a role in this guild","params":[{"name":"role","description":"the role to edit, can be a role object or a role ID.","type":[[["string"]],[["Role"]]]},{"name":"position","description":"the new position of the role","type":[[["number"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":673,"file":"Guild.js","path":"src/structures"}},{"name":"equals","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","params":[{"name":"guild","description":"Guild to compare with","type":[[["Guild"]]]}],"returns":[[["boolean"]]],"meta":{"line":713,"file":"Guild.js","path":"src/structures"}},{"name":"toString","description":"When concatenated with a string, this automatically concatenates the guild's name instead of the Guild object.","examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[[["string"]]],"meta":{"line":750,"file":"Guild.js","path":"src/structures"}}],"meta":{"line":16,"file":"Guild.js","path":"src/structures"}},{"name":"GuildChannel","description":"Represents a guild channel (i.e. text channels and voice channels)","extends":["Channel"],"props":[{"name":"guild","description":"The guild the channel is in","type":[[["Guild"]]],"meta":{"line":20,"file":"GuildChannel.js","path":"src/structures"}},{"name":"name","description":"The name of the guild channel","type":[[["string"]]],"meta":{"line":30,"file":"GuildChannel.js","path":"src/structures"}},{"name":"position","description":"The position of the channel in the list.","type":[[["number"]]],"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","type":[[["Collection","<"],["string",", "],["PermissionOverwrites",">"]]],"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"name":"client","description":"The client that instantiated the Channel","readonly":true,"type":[[["Client"]]],"meta":{"line":6,"file":"Channel.js","path":"src/structures"}},{"name":"type","description":"The type of the channel, either:\n* `dm` - a DM channel\n* `group` - a Group DM channel\n* `text` - a guild text channel\n* `voice` - a guild voice channel","type":[[["string"]]],"meta":{"line":22,"file":"Channel.js","path":"src/structures"}},{"name":"id","description":"The unique ID of the channel","type":[[["string"]]],"meta":{"line":32,"file":"Channel.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the channel was created at","readonly":true,"type":[[["number"]]],"meta":{"line":40,"file":"Channel.js","path":"src/structures"}},{"name":"createdAt","description":"The time the channel was created","readonly":true,"type":[[["Date"]]],"meta":{"line":49,"file":"Channel.js","path":"src/structures"}}],"methods":[{"name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":[[["GuildMemberResolvable"]]]}],"returns":{"types":[[["EvaluatedPermissions"]]],"nullable":true},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"params":[{"name":"userOrRole","description":"The user or role to update","type":[[["RoleResolvable"]],[["UserResolvable"]]]},{"name":"options","description":"The configuration for the update","type":[[["PermissionOverwriteOptions"]]]}],"returns":[[["Promise"]]],"meta":{"line":124,"file":"GuildChannel.js","path":"src/structures"}},{"name":"edit","description":"Edits the channel","examples":["// edit a channel\nchannel.edit({name: 'new-channel'})\n .then(c => console.log(`Edited channel ${c}`))\n .catch(console.error);"],"params":[{"name":"data","description":"The new data for the channel","type":[[["ChannelData"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":186,"file":"GuildChannel.js","path":"src/structures"}},{"name":"setName","description":"Set a new name for the guild channel","examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"params":[{"name":"name","description":"The new name for the guild channel","type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":200,"file":"GuildChannel.js","path":"src/structures"}},{"name":"setPosition","description":"Set a new position for the guild channel","examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"params":[{"name":"position","description":"The new position for the guild channel","type":[[["number"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":214,"file":"GuildChannel.js","path":"src/structures"}},{"name":"setTopic","description":"Set a new topic for the guild channel","examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"params":[{"name":"topic","description":"The new topic for the guild channel","type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":228,"file":"GuildChannel.js","path":"src/structures"}},{"name":"createInvite","description":"Create an invite to this guild channel","params":[{"name":"options","description":"The options for the invite","optional":true,"default":"{}","type":[[["InviteOptions"]]]}],"returns":[[["Promise","<"],["Invite",">"]]],"meta":{"line":245,"file":"GuildChannel.js","path":"src/structures"}},{"name":"clone","description":"Clone this channel","params":[{"name":"name","description":"Optional name for the new channel, otherwise it has the name of this channel","optional":true,"default":"this.name","type":[[["string"]]]},{"name":"withPermissions","description":"Whether to clone the channel with this channel's permission overwrites","optional":true,"default":true,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":255,"file":"GuildChannel.js","path":"src/structures"}},{"name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","params":[{"name":"channel","description":"Channel to compare with","type":[[["GuildChannel"]]]}],"returns":[[["boolean"]]],"meta":{"line":265,"file":"GuildChannel.js","path":"src/structures"}},{"name":"toString","description":"When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.","examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"returns":[[["string"]]],"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"}},{"name":"delete","description":"Deletes the channel","inherits":"Channel#delete","inherited":true,"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.error); // log error"],"returns":[[["Promise","<"],["Channel",">"]]],"meta":{"line":62,"file":"Channel.js","path":"src/structures"}}],"meta":{"line":12,"file":"GuildChannel.js","path":"src/structures"}},{"name":"GuildMember","description":"Represents a member of a guild on Discord","implements":["TextBasedChannel"],"props":[{"name":"client","description":"The Client that instantiated this GuildMember","readonly":true,"type":[[["Client"]]],"meta":{"line":14,"file":"GuildMember.js","path":"src/structures"}},{"name":"guild","description":"The guild that this member is part of","type":[[["Guild"]]],"meta":{"line":26,"file":"GuildMember.js","path":"src/structures"}},{"name":"user","description":"The user that this guild member instance Represents","type":[[["User"]]],"meta":{"line":32,"file":"GuildMember.js","path":"src/structures"}},{"name":"lastMessageID","description":"The ID of the last message sent by the member in their guild, if one was sent.","nullable":true,"type":[[["string"]]],"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"name":"serverDeaf","description":"Whether this member is deafened server-wide","type":[[["boolean"]]],"meta":{"line":49,"file":"GuildMember.js","path":"src/structures"}},{"name":"serverMute","description":"Whether this member is muted server-wide","type":[[["boolean"]]],"meta":{"line":55,"file":"GuildMember.js","path":"src/structures"}},{"name":"selfMute","description":"Whether this member is self-muted","type":[[["boolean"]]],"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"name":"selfDeaf","description":"Whether this member is self-deafened","type":[[["boolean"]]],"meta":{"line":67,"file":"GuildMember.js","path":"src/structures"}},{"name":"voiceSessionID","description":"The voice session ID of this member, if any","nullable":true,"type":[[["string"]]],"meta":{"line":73,"file":"GuildMember.js","path":"src/structures"}},{"name":"voiceChannelID","description":"The voice channel ID of this member, if any","nullable":true,"type":[[["string"]]],"meta":{"line":79,"file":"GuildMember.js","path":"src/structures"}},{"name":"speaking","description":"Whether this member is speaking","type":[[["boolean"]]],"meta":{"line":85,"file":"GuildMember.js","path":"src/structures"}},{"name":"nickname","description":"The nickname of this guild member, if they have one","nullable":true,"type":[[["string"]]],"meta":{"line":91,"file":"GuildMember.js","path":"src/structures"}},{"name":"joinedTimestamp","description":"The timestamp the member joined the guild at","type":[[["number"]]],"meta":{"line":97,"file":"GuildMember.js","path":"src/structures"}},{"name":"joinedAt","description":"The time the member joined the guild","readonly":true,"type":[[["Date"]]],"meta":{"line":108,"file":"GuildMember.js","path":"src/structures"}},{"name":"presence","description":"The presence of this guild member","readonly":true,"type":[[["Presence"]]],"meta":{"line":117,"file":"GuildMember.js","path":"src/structures"}},{"name":"roles","description":"A list of roles that are applied to this GuildMember, mapped by the role ID.","readonly":true,"type":[[["Collection","<"],["string",", "],["Role",">"]]],"meta":{"line":126,"file":"GuildMember.js","path":"src/structures"}},{"name":"highestRole","description":"The role of the member with the highest position.","readonly":true,"type":[[["Role"]]],"meta":{"line":145,"file":"GuildMember.js","path":"src/structures"}},{"name":"mute","description":"Whether this member is muted in any way","readonly":true,"type":[[["boolean"]]],"meta":{"line":154,"file":"GuildMember.js","path":"src/structures"}},{"name":"deaf","description":"Whether this member is deafened in any way","readonly":true,"type":[[["boolean"]]],"meta":{"line":163,"file":"GuildMember.js","path":"src/structures"}},{"name":"voiceChannel","description":"The voice channel this member is in, if any","readonly":true,"nullable":true,"type":[[["VoiceChannel"]]],"meta":{"line":172,"file":"GuildMember.js","path":"src/structures"}},{"name":"id","description":"The ID of this user","readonly":true,"type":[[["string"]]],"meta":{"line":181,"file":"GuildMember.js","path":"src/structures"}},{"name":"displayName","description":"The nickname of the member, or their username if they don't have one","readonly":true,"type":[[["string"]]],"meta":{"line":190,"file":"GuildMember.js","path":"src/structures"}},{"name":"permissions","description":"The overall set of permissions for the guild member, taking only roles into account","readonly":true,"type":[[["EvaluatedPermissions"]]],"meta":{"line":199,"file":"GuildMember.js","path":"src/structures"}},{"name":"kickable","description":"Whether the member is kickable by the client user.","readonly":true,"type":[[["boolean"]]],"meta":{"line":217,"file":"GuildMember.js","path":"src/structures"}},{"name":"bannable","description":"Whether the member is bannable by the client user.","readonly":true,"type":[[["boolean"]]],"meta":{"line":230,"file":"GuildMember.js","path":"src/structures"}}],"methods":[{"name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns evaluated permissions for a member in a guild channel.","params":[{"name":"channel","description":"Guild channel to use as context","type":[[["ChannelResolvable"]]]}],"returns":{"types":[[["EvaluatedPermissions"]]],"nullable":true},"meta":{"line":243,"file":"GuildMember.js","path":"src/structures"}},{"name":"hasPermission","description":"Checks if any of the member's roles have a permission.","params":[{"name":"permission","description":"The permission to check for","type":[[["PermissionResolvable"]]]},{"name":"explicit","description":"Whether to require the roles to explicitly have the exact permission","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["boolean"]]],"meta":{"line":255,"file":"GuildMember.js","path":"src/structures"}},{"name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","params":[{"name":"permissions","description":"The permissions to check for","type":[[["Array","<"],["PermissionResolvable",">"]]]},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["boolean"]]],"meta":{"line":266,"file":"GuildMember.js","path":"src/structures"}},{"name":"missingPermissions","description":"Checks whether the roles of the member allows them to perform specific actions, and lists any missing permissions.","params":[{"name":"permissions","description":"The permissions to check for","type":[[["Array","<"],["PermissionResolvable",">"]]]},{"name":"explicit","description":"Whether to require the member to explicitly have the exact permissions","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["Array","<"],["PermissionResolvable",">"]]],"meta":{"line":277,"file":"GuildMember.js","path":"src/structures"}},{"name":"edit","description":"Edit a guild member","params":[{"name":"data","description":"The data to edit the member with","type":[[["GuildmemberEditData"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":286,"file":"GuildMember.js","path":"src/structures"}},{"name":"setMute","description":"Mute/unmute a user","params":[{"name":"mute","description":"Whether or not the member should be muted","type":[[["boolean"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":295,"file":"GuildMember.js","path":"src/structures"}},{"name":"setDeaf","description":"Deafen/undeafen a user","params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":[[["boolean"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":304,"file":"GuildMember.js","path":"src/structures"}},{"name":"setVoiceChannel","description":"Moves the guild member to the given channel.","params":[{"name":"channel","description":"The channel to move the member to","type":[[["ChannelResolvable"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":313,"file":"GuildMember.js","path":"src/structures"}},{"name":"setRoles","description":"Sets the roles applied to the member.","params":[{"name":"roles","description":"The roles or role IDs to apply","type":[[["Collection","<"],["string",", "],["Role",">"]],[["Array","<"],["Role",">"]],[["Array","<"],["string",">"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":322,"file":"GuildMember.js","path":"src/structures"}},{"name":"addRole","description":"Adds a single role to the member.","params":[{"name":"role","description":"The role or ID of the role to add","type":[[["Role"]],[["string"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":331,"file":"GuildMember.js","path":"src/structures"}},{"name":"addRoles","description":"Adds multiple roles to the member.","params":[{"name":"roles","description":"The roles or role IDs to add","type":[[["Collection","<"],["string",", "],["Role",">"]],[["Array","<"],["Role",">"]],[["Array","<"],["string",">"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":341,"file":"GuildMember.js","path":"src/structures"}},{"name":"removeRole","description":"Removes a single role from the member.","params":[{"name":"role","description":"The role or ID of the role to remove","type":[[["Role"]],[["string"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":357,"file":"GuildMember.js","path":"src/structures"}},{"name":"removeRoles","description":"Removes multiple roles from the member.","params":[{"name":"roles","description":"The roles or role IDs to remove","type":[[["Collection","<"],["string",", "],["Role",">"]],[["Array","<"],["Role",">"]],[["Array","<"],["string",">"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":367,"file":"GuildMember.js","path":"src/structures"}},{"name":"setNickname","description":"Set the nickname for the guild member","params":[{"name":"nick","description":"The nickname for the guild member","type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":388,"file":"GuildMember.js","path":"src/structures"}},{"name":"deleteDM","description":"Deletes any DMs with this guild member","returns":[[["Promise","<"],["DMChannel",">"]]],"meta":{"line":396,"file":"GuildMember.js","path":"src/structures"}},{"name":"kick","description":"Kick this member from the guild","returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":404,"file":"GuildMember.js","path":"src/structures"}},{"name":"ban","description":"Ban this guild member","examples":["// ban a guild member\nguildMember.ban(7);"],"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,"default":0,"type":[[["number"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":417,"file":"GuildMember.js","path":"src/structures"}},{"name":"toString","description":"When concatenated with a string, this automatically concatenates the user's mention instead of the Member object.","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${member}!`);"],"returns":[[["string"]]],"meta":{"line":428,"file":"GuildMember.js","path":"src/structures"}},{"name":"send","description":"Send a message to this channel","implements":["TextBasedChannel#send"],"examples":["// send a message\nchannel.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":67,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendMessage","description":"Send a message to this channel","implements":["TextBasedChannel#sendMessage"],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":106,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendEmbed","description":"Send an embed to this channel","implements":["TextBasedChannel#sendEmbed"],"params":[{"name":"embed","description":"Embed for the message","type":[[["RichEmbed"]],[["Object"]]]},{"name":"content","description":"Text for the message","optional":true,"type":[[["string"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":117,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendFile","description":"Send a file to this channel","implements":["TextBasedChannel#sendFile"],"params":[{"name":"attachment","description":"File to send","type":[[["BufferResolvable"]]]},{"name":"name","description":"Name and extension of the file","optional":true,"default":"'file.jpg'","type":[[["string"]]]},{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":135,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendCode","description":"Send a code block to this channel","implements":["TextBasedChannel#sendCode"],"params":[{"name":"lang","description":"Language for the code block","type":[[["string"]]]},{"name":"content","description":"Content of the code block","type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":146,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"meta":{"line":12,"file":"GuildMember.js","path":"src/structures"}},{"name":"Invite","description":"Represents an invitation to a guild channel.\n<warn>The only guaranteed properties are `code`, `guild` and `channel`. Other properties can be missing.</warn>","props":[{"name":"client","description":"The client that instantiated the invite","readonly":true,"type":[[["Client"]]],"meta":{"line":32,"file":"Invite.js","path":"src/structures"}},{"name":"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 PartialGuild object.","type":[[["Guild"]],[["PartialGuild"]]],"meta":{"line":49,"file":"Invite.js","path":"src/structures"}},{"name":"code","description":"The code for this invite","type":[[["string"]]],"meta":{"line":55,"file":"Invite.js","path":"src/structures"}},{"name":"temporary","description":"Whether or not this invite is temporary","type":[[["boolean"]]],"meta":{"line":61,"file":"Invite.js","path":"src/structures"}},{"name":"maxAge","description":"The maximum age of the invite, in seconds","nullable":true,"type":[[["number"]]],"meta":{"line":67,"file":"Invite.js","path":"src/structures"}},{"name":"uses","description":"How many times this invite has been used","type":[[["number"]]],"meta":{"line":73,"file":"Invite.js","path":"src/structures"}},{"name":"maxUses","description":"The maximum uses of this invite","type":[[["number"]]],"meta":{"line":79,"file":"Invite.js","path":"src/structures"}},{"name":"inviter","description":"The user who created this invite","type":[[["User"]]],"meta":{"line":86,"file":"Invite.js","path":"src/structures"}},{"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 PartialGuildChannel object.","type":[[["GuildChannel"]],[["PartialGuildChannel"]]],"meta":{"line":94,"file":"Invite.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the invite was created at","type":[[["number"]]],"meta":{"line":100,"file":"Invite.js","path":"src/structures"}},{"name":"createdAt","description":"The time the invite was created","readonly":true,"type":[[["Date"]]],"meta":{"line":108,"file":"Invite.js","path":"src/structures"}},{"name":"expiresTimestamp","description":"The timestamp the invite will expire at","readonly":true,"type":[[["number"]]],"meta":{"line":117,"file":"Invite.js","path":"src/structures"}},{"name":"expiresAt","description":"The time the invite will expire","readonly":true,"type":[[["Date"]]],"meta":{"line":126,"file":"Invite.js","path":"src/structures"}},{"name":"url","description":"The URL to the invite","readonly":true,"type":[[["string"]]],"meta":{"line":135,"file":"Invite.js","path":"src/structures"}}],"methods":[{"name":"delete","description":"Deletes this invite","returns":[[["Promise","<"],["Invite",">"]]],"meta":{"line":143,"file":"Invite.js","path":"src/structures"}},{"name":"toString","description":"When concatenated with a string, this automatically concatenates the invite's URL instead of the object.","examples":["// logs: Invite: https://discord.gg/A1b2C3\nconsole.log(`Invite: ${invite}`);"],"returns":[[["string"]]],"meta":{"line":154,"file":"Invite.js","path":"src/structures"}}],"meta":{"line":30,"file":"Invite.js","path":"src/structures"}},{"name":"Message","description":"Represents a message on Discord","props":[{"name":"client","description":"The Client that instantiated the Message","readonly":true,"type":[[["Client"]]],"meta":{"line":16,"file":"Message.js","path":"src/structures"}},{"name":"channel","description":"The channel that the message was sent in","type":[[["TextChannel"]],[["DMChannel"]],[["GroupDMChannel"]]],"meta":{"line":28,"file":"Message.js","path":"src/structures"}},{"name":"id","description":"The ID of the message (unique in the channel it was sent)","type":[[["string"]]],"meta":{"line":38,"file":"Message.js","path":"src/structures"}},{"name":"type","description":"The type of the message","type":[[["string"]]],"meta":{"line":44,"file":"Message.js","path":"src/structures"}},{"name":"content","description":"The content of the message","type":[[["string"]]],"meta":{"line":50,"file":"Message.js","path":"src/structures"}},{"name":"author","description":"The author of the message","type":[[["User"]]],"meta":{"line":56,"file":"Message.js","path":"src/structures"}},{"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.","type":[[["GuildMember"]]],"meta":{"line":63,"file":"Message.js","path":"src/structures"}},{"name":"pinned","description":"Whether or not this message is pinned","type":[[["boolean"]]],"meta":{"line":69,"file":"Message.js","path":"src/structures"}},{"name":"tts","description":"Whether or not the message was Text-To-Speech","type":[[["boolean"]]],"meta":{"line":75,"file":"Message.js","path":"src/structures"}},{"name":"nonce","description":"A random number used for checking message delivery","type":[[["string"]]],"meta":{"line":81,"file":"Message.js","path":"src/structures"}},{"name":"system","description":"Whether or not this message was sent by Discord, not actually a user (e.g. pin notifications)","type":[[["boolean"]]],"meta":{"line":87,"file":"Message.js","path":"src/structures"}},{"name":"embeds","description":"A list of embeds in the message - e.g. YouTube Player","type":[[["Array","<"],["MessageEmbed",">"]]],"meta":{"line":93,"file":"Message.js","path":"src/structures"}},{"name":"attachments","description":"A collection of attachments in the message - e.g. Pictures - mapped by their ID.","type":[[["Collection","<"],["string",", "],["MessageAttachment",">"]]],"meta":{"line":99,"file":"Message.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the message was sent at","type":[[["number"]]],"meta":{"line":106,"file":"Message.js","path":"src/structures"}},{"name":"editedTimestamp","description":"The timestamp the message was last edited at (if applicable)","nullable":true,"type":[[["number"]]],"meta":{"line":112,"file":"Message.js","path":"src/structures"}},{"name":"mentions","description":"An object containing a further users, roles or channels collections","type":[[["Object"]]],"props":[{"name":"mentions.users","description":"Mentioned users, maps their ID to the user object.","type":[[["Collection","<"],["string",", "],["User",">"]]]},{"name":"mentions.roles","description":"Mentioned roles, maps their ID to the role object.","type":[[["Collection","<"],["string",", "],["Role",">"]]]},{"name":"mentions.channels","description":"Mentioned channels,\nmaps their ID to the channel object.","type":[[["Collection","<"],["string",", "],["GuildChannel",">"]]]},{"name":"mentions.everyone","description":"Whether or not @everyone was mentioned.","type":[[["boolean"]]]}],"meta":{"line":123,"file":"Message.js","path":"src/structures"}},{"name":"reactions","description":"A collection of reactions to this message, mapped by the reaction \"id\".","type":[[["Collection","<"],["string",", "],["MessageReaction",">"]]],"meta":{"line":161,"file":"Message.js","path":"src/structures"}},{"name":"webhookID","description":"ID of the webhook that sent the message, if applicable","nullable":true,"type":[[["string"]]],"meta":{"line":174,"file":"Message.js","path":"src/structures"}},{"name":"createdAt","description":"The time the message was sent","readonly":true,"type":[[["Date"]]],"meta":{"line":242,"file":"Message.js","path":"src/structures"}},{"name":"editedAt","description":"The time the message was last edited at (if applicable)","readonly":true,"nullable":true,"type":[[["Date"]]],"meta":{"line":251,"file":"Message.js","path":"src/structures"}},{"name":"guild","description":"The guild the message was sent in (if in a guild channel)","readonly":true,"nullable":true,"type":[[["Guild"]]],"meta":{"line":260,"file":"Message.js","path":"src/structures"}},{"name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,\nthe relevant mention in the message content will not be converted.","readonly":true,"type":[[["string"]]],"meta":{"line":270,"file":"Message.js","path":"src/structures"}},{"name":"edits","description":"An array of cached versions of the message, including the current version.\nSorted from latest (first) to oldest (last).","readonly":true,"type":[[["Array","<"],["Message",">"]]],"meta":{"line":308,"file":"Message.js","path":"src/structures"}},{"name":"editable","description":"Whether the message is editable by the client user.","readonly":true,"type":[[["boolean"]]],"meta":{"line":319,"file":"Message.js","path":"src/structures"}},{"name":"deletable","description":"Whether the message is deletable by the client user.","readonly":true,"type":[[["boolean"]]],"meta":{"line":328,"file":"Message.js","path":"src/structures"}},{"name":"pinnable","description":"Whether the message is pinnable by the client user.","readonly":true,"type":[[["boolean"]]],"meta":{"line":339,"file":"Message.js","path":"src/structures"}}],"methods":[{"name":"isMentioned","description":"Whether or not a user, channel or role is mentioned in this message.","params":[{"name":"data","description":"either a guild channel, user or a role object, or a string representing\nthe ID of any of these.","type":[[["GuildChannel"]],[["User"]],[["Role"]],[["string"]]]}],"returns":[[["boolean"]]],"meta":{"line":350,"file":"Message.js","path":"src/structures"}},{"name":"isMemberMentioned","description":"Whether or not a guild member is mentioned in this message. Takes into account\nuser mentions, role mentions, and @everyone/@here mentions.","params":[{"name":"member","description":"Member/user to check for a mention of","type":[[["GuildMember"]],[["User"]]]}],"returns":[[["boolean"]]],"meta":{"line":361,"file":"Message.js","path":"src/structures"}},{"name":"edit","description":"Edit the content of the message","examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.error);"],"params":[{"name":"content","description":"The new content for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"The options to provide","optional":true,"type":[[["MessageEditOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":386,"file":"Message.js","path":"src/structures"}},{"name":"editCode","description":"Edit the content of the message, with a code block","params":[{"name":"lang","description":"Language for the code block","type":[[["string"]]]},{"name":"content","description":"The new content for the message","type":[[["StringResolvable"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":402,"file":"Message.js","path":"src/structures"}},{"name":"pin","description":"Pins this message to the channel's pinned messages","returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":411,"file":"Message.js","path":"src/structures"}},{"name":"unpin","description":"Unpins this message from the channel's pinned messages","returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":419,"file":"Message.js","path":"src/structures"}},{"name":"react","description":"Add a reaction to the message","params":[{"name":"emoji","description":"Emoji to react with","type":[[["string"]],[["Emoji"]],[["ReactionEmoji"]]]}],"returns":[[["Promise","<"],["MessageReaction",">"]]],"meta":{"line":428,"file":"Message.js","path":"src/structures"}},{"name":"clearReactions","description":"Remove all reactions from a message","returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":439,"file":"Message.js","path":"src/structures"}},{"name":"delete","description":"Deletes the message","examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.error);"],"params":[{"name":"timeout","description":"How long to wait to delete the message in milliseconds","optional":true,"default":0,"type":[[["number"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":453,"file":"Message.js","path":"src/structures"}},{"name":"reply","description":"Reply to the message","examples":["// reply to a message\nmessage.reply('Hey, I\\'m a reply!')\n .then(msg => console.log(`Sent a reply to ${msg.author}`))\n .catch(console.error);"],"params":[{"name":"content","description":"The content for the message","type":[[["StringResolvable"]]]},{"name":"options","description":"The options to provide","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":476,"file":"Message.js","path":"src/structures"}},{"name":"fetchWebhook","description":"Fetches the webhook used to create this message.","returns":[[["Promise","<?"],["Webhook",">"]]],"meta":{"line":485,"file":"Message.js","path":"src/structures"}},{"name":"equals","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","params":[{"name":"message","description":"The message to compare it to","type":[[["Message"]]]},{"name":"rawData","description":"Raw data passed through the WebSocket about this message","type":[[["Object"]]]}],"returns":[[["boolean"]]],"meta":{"line":498,"file":"Message.js","path":"src/structures"}},{"name":"toString","description":"When concatenated with a string, this automatically concatenates the message's content instead of the object.","examples":["// logs: Message: This is a message!\nconsole.log(`Message: ${message}`);"],"returns":[[["string"]]],"meta":{"line":527,"file":"Message.js","path":"src/structures"}}],"meta":{"line":14,"file":"Message.js","path":"src/structures"}},{"name":"MessageAttachment","description":"Represents an attachment in a message","props":[{"name":"client","description":"The Client that instantiated this MessageAttachment.","readonly":true,"type":[[["Client"]]],"meta":{"line":6,"file":"MessageAttachment.js","path":"src/structures"}},{"name":"message","description":"The message this attachment is part of.","type":[[["Message"]]],"meta":{"line":18,"file":"MessageAttachment.js","path":"src/structures"}},{"name":"id","description":"The ID of this attachment","type":[[["string"]]],"meta":{"line":28,"file":"MessageAttachment.js","path":"src/structures"}},{"name":"filename","description":"The file name of this attachment","type":[[["string"]]],"meta":{"line":34,"file":"MessageAttachment.js","path":"src/structures"}},{"name":"filesize","description":"The size of this attachment in bytes","type":[[["number"]]],"meta":{"line":40,"file":"MessageAttachment.js","path":"src/structures"}},{"name":"url","description":"The URL to this attachment","type":[[["string"]]],"meta":{"line":46,"file":"MessageAttachment.js","path":"src/structures"}},{"name":"proxyURL","description":"The Proxy URL to this attachment","type":[[["string"]]],"meta":{"line":52,"file":"MessageAttachment.js","path":"src/structures"}},{"name":"height","description":"The height of this attachment (if an image)","nullable":true,"type":[[["number"]]],"meta":{"line":58,"file":"MessageAttachment.js","path":"src/structures"}},{"name":"width","description":"The width of this attachment (if an image)","nullable":true,"type":[[["number"]]],"meta":{"line":64,"file":"MessageAttachment.js","path":"src/structures"}}],"meta":{"line":4,"file":"MessageAttachment.js","path":"src/structures"}},{"name":"MessageCollector","description":"Collects messages based on a specified filter, then emits them.","extends":["EventEmitter"],"construct":{"name":"MessageCollector","params":[{"name":"channel","description":"The channel to collect messages in","type":[[["Channel"]]]},{"name":"filter","description":"The filter function","type":[[["CollectorFilterFunction"]]]},{"name":"options","description":"Options for the collector","optional":true,"type":[[["CollectorOptions"]]]}]},"props":[{"name":"channel","description":"The channel this collector is operating on","type":[[["Channel"]]],"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"}},{"name":"filter","description":"A function used to filter messages that the collector collects.","type":[[["CollectorFilterFunction"]]],"meta":{"line":48,"file":"MessageCollector.js","path":"src/structures"}},{"name":"options","description":"Options for the collecor.","type":[[["CollectorOptions"]]],"meta":{"line":54,"file":"MessageCollector.js","path":"src/structures"}},{"name":"ended","description":"Whether this collector has stopped collecting messages.","type":[[["boolean"]]],"meta":{"line":60,"file":"MessageCollector.js","path":"src/structures"}},{"name":"collected","description":"A collection of collected messages, mapped by message ID.","type":[[["Collection","<"],["string",", "],["Message",">"]]],"meta":{"line":66,"file":"MessageCollector.js","path":"src/structures"}},{"name":"next","description":"Returns a promise that resolves when a valid message is sent. Rejects\nwith collected messages if the Collector ends before receiving a message.","readonly":true,"type":[[["Promise","<"],["Message",">"]]],"meta":{"line":103,"file":"MessageCollector.js","path":"src/structures"}}],"methods":[{"name":"verify","description":"Verifies a message against the filter and options","access":"private","params":[{"name":"message","description":"The message","type":[[["Message"]]]}],"returns":[[["boolean"]]],"meta":{"line":79,"file":"MessageCollector.js","path":"src/structures"}},{"name":"stop","description":"Stops the collector and emits `end`.","params":[{"name":"reason","description":"An optional reason for stopping the collector","optional":true,"default":"'user'","type":[[["string"]]]}],"meta":{"line":134,"file":"MessageCollector.js","path":"src/structures"}}],"events":[{"name":"message","description":"Emitted whenever the collector receives a message that passes the filter test.","params":[{"name":"message","description":"The received message","type":[[["Message"]]]},{"name":"collector","description":"The collector the message passed through","type":[[["MessageCollector"]]]}],"meta":{"line":83,"file":"MessageCollector.js","path":"src/structures"}},{"name":"end","description":"Emitted when the Collector stops collecting.","params":[{"name":"collection","description":"A collection of messages collected\nduring the lifetime of the collector, mapped by the ID of the messages.","type":[[["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":[[["string"]]]}],"meta":{"line":138,"file":"MessageCollector.js","path":"src/structures"}}],"meta":{"line":8,"file":"MessageCollector.js","path":"src/structures"}},{"name":"MessageEmbed","description":"Represents an embed in a message (image/video preview, rich embed, etc.)","props":[{"name":"client","description":"The client that instantiated this embed","readonly":true,"type":[[["Client"]]],"meta":{"line":6,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"message","description":"The message this embed is part of","type":[[["Message"]]],"meta":{"line":18,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"type","description":"The type of this embed","type":[[["string"]]],"meta":{"line":28,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"title","description":"The title of this embed, if there is one","nullable":true,"type":[[["string"]]],"meta":{"line":34,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"description","description":"The description of this embed, if there is one","nullable":true,"type":[[["string"]]],"meta":{"line":40,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"url","description":"The URL of this embed","type":[[["string"]]],"meta":{"line":46,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"color","description":"The color of the embed","type":[[["number"]]],"meta":{"line":52,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"fields","description":"The fields of this embed","type":[[["Array","<"],["MessageEmbedField",">"]]],"meta":{"line":58,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp of this embed","type":[[["number"]]],"meta":{"line":65,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"thumbnail","description":"The thumbnail of this embed, if there is one","type":[[["MessageEmbedThumbnail"]]],"meta":{"line":71,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"author","description":"The author of this embed, if there is one","type":[[["MessageEmbedAuthor"]]],"meta":{"line":77,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"provider","description":"The provider of this embed, if there is one","type":[[["MessageEmbedProvider"]]],"meta":{"line":83,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"footer","description":"The footer of this embed","type":[[["MessageEmbedFooter"]]],"meta":{"line":89,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"createdAt","description":"The date this embed was created","type":[[["Date"]]],"meta":{"line":96,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"hexColor","description":"The hexadecimal version of the embed color, with a leading hash.","readonly":true,"type":[[["string"]]],"meta":{"line":105,"file":"MessageEmbed.js","path":"src/structures"}}],"meta":{"line":4,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"MessageEmbedThumbnail","description":"Represents a thumbnail for a message embed","props":[{"name":"embed","description":"The embed this thumbnail is part of","type":[[["MessageEmbed"]]],"meta":{"line":121,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"url","description":"The URL for this thumbnail","type":[[["string"]]],"meta":{"line":131,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"proxyURL","description":"The Proxy URL for this thumbnail","type":[[["string"]]],"meta":{"line":137,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"height","description":"The height of the thumbnail","type":[[["number"]]],"meta":{"line":143,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"width","description":"The width of the thumbnail","type":[[["number"]]],"meta":{"line":149,"file":"MessageEmbed.js","path":"src/structures"}}],"meta":{"line":115,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"MessageEmbedProvider","description":"Represents a provider for a message embed","props":[{"name":"embed","description":"The embed this provider is part of","type":[[["MessageEmbed"]]],"meta":{"line":162,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"name","description":"The name of this provider","type":[[["string"]]],"meta":{"line":172,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"url","description":"The URL of this provider","type":[[["string"]]],"meta":{"line":178,"file":"MessageEmbed.js","path":"src/structures"}}],"meta":{"line":156,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"MessageEmbedAuthor","description":"Represents an author for a message embed","props":[{"name":"embed","description":"The embed this author is part of","type":[[["MessageEmbed"]]],"meta":{"line":191,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"name","description":"The name of this author","type":[[["string"]]],"meta":{"line":201,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"url","description":"The URL of this author","type":[[["string"]]],"meta":{"line":207,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"iconURL","description":"The icon URL of this author","type":[[["string"]]],"meta":{"line":213,"file":"MessageEmbed.js","path":"src/structures"}}],"meta":{"line":185,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"MessageEmbedField","description":"Represents a field for a message embed","props":[{"name":"embed","description":"The embed this footer is part of","type":[[["MessageEmbed"]]],"meta":{"line":226,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"name","description":"The name of this field","type":[[["string"]]],"meta":{"line":236,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"value","description":"The value of this field","type":[[["string"]]],"meta":{"line":242,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"inline","description":"If this field is displayed inline","type":[[["boolean"]]],"meta":{"line":248,"file":"MessageEmbed.js","path":"src/structures"}}],"meta":{"line":220,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"MessageEmbedFooter","description":"Represents the footer of a message embed","props":[{"name":"embed","description":"The embed this footer is part of","type":[[["MessageEmbed"]]],"meta":{"line":261,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"text","description":"The text in this footer","type":[[["string"]]],"meta":{"line":271,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"iconURL","description":"The icon URL of this footer","type":[[["string"]]],"meta":{"line":277,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"proxyIconUrl","description":"The proxy icon URL of this footer","type":[[["string"]]],"meta":{"line":283,"file":"MessageEmbed.js","path":"src/structures"}}],"meta":{"line":255,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"MessageReaction","description":"Represents a reaction to a message","props":[{"name":"message","description":"The message that this reaction refers to","type":[[["Message"]]],"meta":{"line":14,"file":"MessageReaction.js","path":"src/structures"}},{"name":"me","description":"Whether the client has given this reaction","type":[[["boolean"]]],"meta":{"line":20,"file":"MessageReaction.js","path":"src/structures"}},{"name":"count","description":"The number of people that have given the same reaction.","type":[[["number"]]],"meta":{"line":26,"file":"MessageReaction.js","path":"src/structures"}},{"name":"users","description":"The users that have given this reaction, mapped by their ID.","type":[[["Collection","<"],["string",", "],["User",">"]]],"meta":{"line":32,"file":"MessageReaction.js","path":"src/structures"}},{"name":"emoji","description":"The emoji of this reaction, either an Emoji object for known custom emojis, or a ReactionEmoji\nobject which has fewer properties. Whatever the prototype of the emoji, it will still have\n`name`, `id`, `identifier` and `toString()`","type":[[["Emoji"]],[["ReactionEmoji"]]],"meta":{"line":43,"file":"MessageReaction.js","path":"src/structures"}}],"methods":[{"name":"remove","description":"Removes a user from this reaction.","params":[{"name":"user","description":"User to remove the reaction of","optional":true,"default":"this.message.client.user","type":[[["UserResolvable"]]]}],"returns":[[["Promise","<"],["MessageReaction",">"]]],"meta":{"line":62,"file":"MessageReaction.js","path":"src/structures"}},{"name":"fetchUsers","description":"Fetch all the users that gave this reaction. Resolves with a collection of users, mapped by their IDs.","params":[{"name":"limit","description":"the maximum amount of users to fetch, defaults to 100","optional":true,"default":100,"type":[[["number"]]]}],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["User",">>"]]],"meta":{"line":76,"file":"MessageReaction.js","path":"src/structures"}}],"meta":{"line":8,"file":"MessageReaction.js","path":"src/structures"}},{"name":"OAuth2Application","description":"Represents an OAuth2 Application","props":[{"name":"client","description":"The client that instantiated the application","readonly":true,"type":[[["Client"]]],"meta":{"line":6,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"id","description":"The ID of the app","type":[[["string"]]],"meta":{"line":22,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"name","description":"The name of the app","type":[[["string"]]],"meta":{"line":28,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"description","description":"The app's description","type":[[["string"]]],"meta":{"line":34,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"icon","description":"The app's icon hash","type":[[["string"]]],"meta":{"line":40,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"iconURL","description":"The app's icon URL","type":[[["string"]]],"meta":{"line":46,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"rpcOrigins","description":"The app's RPC origins","type":[[["Array","<"],["string",">"]]],"meta":{"line":52,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the app was created at","readonly":true,"type":[[["number"]]],"meta":{"line":60,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"createdAt","description":"The time the app was created","readonly":true,"type":[[["Date"]]],"meta":{"line":69,"file":"OAuth2Application.js","path":"src/structures"}}],"methods":[{"name":"toString","description":"When concatenated with a string, this automatically concatenates the app name rather than the app object.","returns":[[["string"]]],"meta":{"line":77,"file":"OAuth2Application.js","path":"src/structures"}}],"meta":{"line":4,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"PartialGuild","description":"Represents a guild that the client only has limited information for - e.g. from invites.","props":[{"name":"client","description":"The Client that instantiated this PartialGuild","readonly":true,"type":[[["Client"]]],"meta":{"line":13,"file":"PartialGuild.js","path":"src/structures"}},{"name":"id","description":"The ID of this guild","type":[[["string"]]],"meta":{"line":29,"file":"PartialGuild.js","path":"src/structures"}},{"name":"name","description":"The name of this guild","type":[[["string"]]],"meta":{"line":35,"file":"PartialGuild.js","path":"src/structures"}},{"name":"icon","description":"The hash of this guild's icon, or null if there is none.","nullable":true,"type":[[["string"]]],"meta":{"line":41,"file":"PartialGuild.js","path":"src/structures"}},{"name":"splash","description":"The hash of the guild splash image, or null if no splash (VIP only)","nullable":true,"type":[[["string"]]],"meta":{"line":47,"file":"PartialGuild.js","path":"src/structures"}}],"meta":{"line":11,"file":"PartialGuild.js","path":"src/structures"}},{"name":"PartialGuildChannel","description":"Represents a guild channel that the client only has limited information for - e.g. from invites.","props":[{"name":"client","description":"The Client that instantiated this PartialGuildChannel","readonly":true,"type":[[["Client"]]],"meta":{"line":12,"file":"PartialGuildChannel.js","path":"src/structures"}},{"name":"id","description":"The ID of this guild channel","type":[[["string"]]],"meta":{"line":28,"file":"PartialGuildChannel.js","path":"src/structures"}},{"name":"name","description":"The name of this guild channel","type":[[["string"]]],"meta":{"line":34,"file":"PartialGuildChannel.js","path":"src/structures"}},{"name":"type","description":"The type of this guild channel - `text` or `voice`","type":[[["string"]]],"meta":{"line":40,"file":"PartialGuildChannel.js","path":"src/structures"}}],"meta":{"line":10,"file":"PartialGuildChannel.js","path":"src/structures"}},{"name":"PermissionOverwrites","description":"Represents a permission overwrite for a role or member in a guild channel.","props":[{"name":"channel","description":"The GuildChannel this overwrite is for","readonly":true,"type":[[["GuildChannel"]]],"meta":{"line":6,"file":"PermissionOverwrites.js","path":"src/structures"}},{"name":"id","description":"The ID of this overwrite, either a user ID or a role ID","type":[[["string"]]],"meta":{"line":22,"file":"PermissionOverwrites.js","path":"src/structures"}},{"name":"type","description":"The type of this overwrite","type":[[["string"]]],"meta":{"line":28,"file":"PermissionOverwrites.js","path":"src/structures"}}],"methods":[{"name":"delete","description":"Delete this Permission Overwrite.","returns":[[["Promise","<"],["PermissionOverwrites",">"]]],"meta":{"line":38,"file":"PermissionOverwrites.js","path":"src/structures"}}],"meta":{"line":4,"file":"PermissionOverwrites.js","path":"src/structures"}},{"name":"Presence","description":"Represents a user's presence","props":[{"name":"status","description":"The status of the presence:\n\n* **`online`** - user is online\n* **`offline`** - user is offline or invisible\n* **`idle`** - user is AFK\n* **`dnd`** - user is in Do not Disturb","type":[[["string"]]],"meta":{"line":15,"file":"Presence.js","path":"src/structures"}},{"name":"game","description":"The game that the user is playing, `null` if they aren't playing a game.","nullable":true,"type":[[["Game"]]],"meta":{"line":21,"file":"Presence.js","path":"src/structures"}}],"methods":[{"name":"equals","description":"Whether this presence is equal to another","params":[{"name":"presence","description":"Presence to compare with","type":[[["Presence"]]]}],"returns":[[["boolean"]]],"meta":{"line":34,"file":"Presence.js","path":"src/structures"}}],"meta":{"line":4,"file":"Presence.js","path":"src/structures"}},{"name":"Game","description":"Represents a game that is part of a user's presence.","props":[{"name":"name","description":"The name of the game being played","type":[[["string"]]],"meta":{"line":52,"file":"Presence.js","path":"src/structures"}},{"name":"type","description":"The type of the game status","type":[[["number"]]],"meta":{"line":58,"file":"Presence.js","path":"src/structures"}},{"name":"url","description":"If the game is being streamed, a link to the stream","nullable":true,"type":[[["string"]]],"meta":{"line":64,"file":"Presence.js","path":"src/structures"}},{"name":"streaming","description":"Whether or not the game is being streamed","readonly":true,"type":[[["boolean"]]],"meta":{"line":72,"file":"Presence.js","path":"src/structures"}}],"methods":[{"name":"equals","description":"Whether this game is equal to another game","params":[{"name":"game","description":"Game to compare with","type":[[["Game"]]]}],"returns":[[["boolean"]]],"meta":{"line":81,"file":"Presence.js","path":"src/structures"}}],"meta":{"line":46,"file":"Presence.js","path":"src/structures"}},{"name":"ReactionEmoji","description":"Represents a limited emoji set used for both custom and unicode emojis. Custom emojis\nwill use this class opposed to the Emoji class when the client doesn't know enough\ninformation about them.","props":[{"name":"reaction","description":"The message reaction this emoji refers to","type":[[["MessageReaction"]]],"meta":{"line":12,"file":"ReactionEmoji.js","path":"src/structures"}},{"name":"name","description":"The name of this reaction emoji.","type":[[["string"]]],"meta":{"line":18,"file":"ReactionEmoji.js","path":"src/structures"}},{"name":"id","description":"The ID of this reaction emoji.","type":[[["string"]]],"meta":{"line":24,"file":"ReactionEmoji.js","path":"src/structures"}},{"name":"identifier","description":"The identifier of this emoji, used for message reactions","readonly":true,"type":[[["string"]]],"meta":{"line":32,"file":"ReactionEmoji.js","path":"src/structures"}}],"methods":[{"name":"toString","description":"Creates the text required to form a graphical emoji on Discord.","examples":["// send the emoji used in a reaction to the channel the reaction is part of\nreaction.message.channel.sendMessage(`The emoji used is ${reaction.emoji}`);"],"returns":[[["string"]]],"meta":{"line":44,"file":"ReactionEmoji.js","path":"src/structures"}}],"meta":{"line":6,"file":"ReactionEmoji.js","path":"src/structures"}},{"name":"RichEmbed","description":"A rich embed to be sent with a message","construct":{"name":"RichEmbed","params":[{"name":"data","description":"Data to set in the rich embed","optional":true,"type":[[["Object"]]]}]},"props":[{"name":"title","description":"Title for this Embed","type":[[["string"]]],"meta":{"line":11,"file":"RichEmbed.js","path":"src/structures"}},{"name":"description","description":"Description for this Embed","type":[[["string"]]],"meta":{"line":17,"file":"RichEmbed.js","path":"src/structures"}},{"name":"url","description":"URL for this Embed","type":[[["string"]]],"meta":{"line":23,"file":"RichEmbed.js","path":"src/structures"}},{"name":"color","description":"Color for this Embed","type":[[["number"]]],"meta":{"line":29,"file":"RichEmbed.js","path":"src/structures"}},{"name":"author","description":"Author for this Embed","type":[[["Object"]]],"meta":{"line":35,"file":"RichEmbed.js","path":"src/structures"}},{"name":"timestamp","description":"Timestamp for this Embed","type":[[["Date"]]],"meta":{"line":41,"file":"RichEmbed.js","path":"src/structures"}},{"name":"fields","description":"Fields for this Embed","type":[[["Array","<"],["Object",">"]]],"meta":{"line":47,"file":"RichEmbed.js","path":"src/structures"}},{"name":"thumbnail","description":"Thumbnail for this Embed","type":[[["Object"]]],"meta":{"line":53,"file":"RichEmbed.js","path":"src/structures"}},{"name":"image","description":"Image for this Embed","type":[[["Object"]]],"meta":{"line":59,"file":"RichEmbed.js","path":"src/structures"}},{"name":"footer","description":"Footer for this Embed","type":[[["Object"]]],"meta":{"line":65,"file":"RichEmbed.js","path":"src/structures"}}],"methods":[{"name":"setTitle","description":"Sets the title of this embed","params":[{"name":"title","description":"The title","type":[[["StringResolvable"]]]}],"returns":{"types":[[["RichEmbed"]]],"description":"This embed"},"meta":{"line":73,"file":"RichEmbed.js","path":"src/structures"}},{"name":"setDescription","description":"Sets the description of this embed","params":[{"name":"description","description":"The description","type":[[["StringResolvable"]]]}],"returns":{"types":[[["RichEmbed"]]],"description":"This embed"},"meta":{"line":85,"file":"RichEmbed.js","path":"src/structures"}},{"name":"setURL","description":"Sets the URL of this embed","params":[{"name":"url","description":"The URL","type":[[["string"]]]}],"returns":{"types":[[["RichEmbed"]]],"description":"This embed"},"meta":{"line":97,"file":"RichEmbed.js","path":"src/structures"}},{"name":"setColor","description":"Sets the color of this embed","params":[{"name":"color","description":"The color to set","type":[[["string"]],[["number"]],[["Array","<"],["number",">"]]]}],"returns":{"types":[[["RichEmbed"]]],"description":"This embed"},"meta":{"line":107,"file":"RichEmbed.js","path":"src/structures"}},{"name":"setAuthor","description":"Sets the author of this embed","params":[{"name":"name","description":"The name of the author","type":[[["StringResolvable"]]]},{"name":"icon","description":"The icon URL of the author","optional":true,"type":[[["string"]]]},{"name":"url","description":"The URL of the author","optional":true,"type":[[["string"]]]}],"returns":{"types":[[["RichEmbed"]]],"description":"This embed"},"meta":{"line":132,"file":"RichEmbed.js","path":"src/structures"}},{"name":"setTimestamp","description":"Sets the timestamp of this embed","params":[{"name":"timestamp","description":"The timestamp","optional":true,"default":"current date","type":[[["Date"]]]}],"returns":{"types":[[["RichEmbed"]]],"description":"This embed"},"meta":{"line":142,"file":"RichEmbed.js","path":"src/structures"}},{"name":"addField","description":"Adds a field to the embed (max 25)","params":[{"name":"name","description":"The name of the field","type":[[["StringResolvable"]]]},{"name":"value","description":"The value of the field","type":[[["StringResolvable"]]]},{"name":"inline","description":"Set the field to display inline","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":{"types":[[["RichEmbed"]]],"description":"This embed"},"meta":{"line":154,"file":"RichEmbed.js","path":"src/structures"}},{"name":"setThumbnail","description":"Set the thumbnail of this embed","params":[{"name":"url","description":"The URL of the thumbnail","type":[[["string"]]]}],"returns":{"types":[[["RichEmbed"]]],"description":"This embed"},"meta":{"line":169,"file":"RichEmbed.js","path":"src/structures"}},{"name":"setImage","description":"Set the image of this embed","params":[{"name":"url","description":"The URL of the thumbnail","type":[[["string"]]]}],"returns":{"types":[[["RichEmbed"]]],"description":"This embed"},"meta":{"line":179,"file":"RichEmbed.js","path":"src/structures"}},{"name":"setFooter","description":"Sets the footer of this embed","params":[{"name":"text","description":"The text of the footer","type":[[["StringResolvable"]]]},{"name":"icon","description":"The icon URL of the footer","optional":true,"type":[[["string"]]]}],"returns":{"types":[[["RichEmbed"]]],"description":"This embed"},"meta":{"line":190,"file":"RichEmbed.js","path":"src/structures"}}],"meta":{"line":5,"file":"RichEmbed.js","path":"src/structures"}},{"name":"Role","description":"Represents a role on Discord","props":[{"name":"client","description":"The client that instantiated the role","readonly":true,"type":[[["Client"]]],"meta":{"line":8,"file":"Role.js","path":"src/structures"}},{"name":"guild","description":"The guild that the role belongs to","type":[[["Guild"]]],"meta":{"line":20,"file":"Role.js","path":"src/structures"}},{"name":"id","description":"The ID of the role (unique to the guild it is part of)","type":[[["string"]]],"meta":{"line":30,"file":"Role.js","path":"src/structures"}},{"name":"name","description":"The name of the role","type":[[["string"]]],"meta":{"line":36,"file":"Role.js","path":"src/structures"}},{"name":"color","description":"The base 10 color of the role","type":[[["number"]]],"meta":{"line":42,"file":"Role.js","path":"src/structures"}},{"name":"hoist","description":"If true, users that are part of this role will appear in a separate category in the users list","type":[[["boolean"]]],"meta":{"line":48,"file":"Role.js","path":"src/structures"}},{"name":"position","description":"The position of the role in the role manager","type":[[["number"]]],"meta":{"line":54,"file":"Role.js","path":"src/structures"}},{"name":"permissions","description":"The evaluated permissions number","type":[[["number"]]],"meta":{"line":60,"file":"Role.js","path":"src/structures"}},{"name":"managed","description":"Whether or not the role is managed by an external service","type":[[["boolean"]]],"meta":{"line":66,"file":"Role.js","path":"src/structures"}},{"name":"mentionable","description":"Whether or not the role can be mentioned by anyone","type":[[["boolean"]]],"meta":{"line":72,"file":"Role.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the role was created at","readonly":true,"type":[[["number"]]],"meta":{"line":80,"file":"Role.js","path":"src/structures"}},{"name":"createdAt","description":"The time the role was created","readonly":true,"type":[[["Date"]]],"meta":{"line":89,"file":"Role.js","path":"src/structures"}},{"name":"hexColor","description":"The hexadecimal version of the role color, with a leading hashtag.","readonly":true,"type":[[["string"]]],"meta":{"line":98,"file":"Role.js","path":"src/structures"}},{"name":"members","description":"The cached guild members that have this role.","readonly":true,"type":[[["Collection","<"],["string",", "],["GuildMember",">"]]],"meta":{"line":109,"file":"Role.js","path":"src/structures"}},{"name":"editable","description":"Whether the role is editable by the client user.","readonly":true,"type":[[["boolean"]]],"meta":{"line":118,"file":"Role.js","path":"src/structures"}}],"methods":[{"name":"serialize","description":"Get an object mapping permission names to whether or not the role enables that permission","examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[[["Object","<"],["string",", "],["boolean",">"]]],"meta":{"line":132,"file":"Role.js","path":"src/structures"}},{"name":"hasPermission","description":"Checks if the role has a permission.","examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"params":[{"name":"permission","description":"The permission to check for","type":[[["PermissionResolvable"]]]},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["boolean"]]],"meta":{"line":153,"file":"Role.js","path":"src/structures"}},{"name":"hasPermissions","description":"Checks if the role has all specified permissions.","params":[{"name":"permissions","description":"The permissions to check for","type":[[["Array","<"],["PermissionResolvable",">"]]]},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permissions","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["boolean"]]],"meta":{"line":165,"file":"Role.js","path":"src/structures"}},{"name":"comparePositionTo","description":"Compares this role's position to another role's.","params":[{"name":"role","description":"Role to compare to this one","type":[[["Role"]]]}],"returns":{"types":[[["number"]]],"description":"Negative number if the this role's position is lower (other role's is higher),\npositive number if the this one is higher (other's is lower), 0 if equal"},"meta":{"line":175,"file":"Role.js","path":"src/structures"}},{"name":"edit","description":"Edits the role","examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.error);"],"params":[{"name":"data","description":"The new data for the role","type":[[["RoleData"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":200,"file":"Role.js","path":"src/structures"}},{"name":"setName","description":"Set a new name for the role","examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.error);"],"params":[{"name":"name","description":"The new name of the role","type":[[["string"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":214,"file":"Role.js","path":"src/structures"}},{"name":"setColor","description":"Set a new color for the role","examples":["// set the color of a role\nrole.setColor('#FF0000')\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.error);"],"params":[{"name":"color","description":"The new color for the role, either a hex string or a base 10 number","type":[[["number"]],[["string"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":228,"file":"Role.js","path":"src/structures"}},{"name":"setHoist","description":"Set whether or not the role should be hoisted","examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.error);"],"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":[[["boolean"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":242,"file":"Role.js","path":"src/structures"}},{"name":"setPosition","description":"Set the position of the role","examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.error);"],"params":[{"name":"position","description":"The position of the role","type":[[["number"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":256,"file":"Role.js","path":"src/structures"}},{"name":"setPermissions","description":"Set the permissions of the role","examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"params":[{"name":"permissions","description":"The permissions of the role","type":[[["Array","<"],["string",">"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":270,"file":"Role.js","path":"src/structures"}},{"name":"setMentionable","description":"Set whether this role is mentionable","examples":["// make the role mentionable\nrole.setMentionable(true)\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.error);"],"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":[[["boolean"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":284,"file":"Role.js","path":"src/structures"}},{"name":"delete","description":"Deletes the role","examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.error);"],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":297,"file":"Role.js","path":"src/structures"}},{"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.","params":[{"name":"role","description":"Role to compare with","type":[[["Role"]]]}],"returns":[[["boolean"]]],"meta":{"line":308,"file":"Role.js","path":"src/structures"}},{"name":"toString","description":"When concatenated with a string, this automatically concatenates the role mention rather than the Role object.","returns":[[["string"]]],"meta":{"line":323,"file":"Role.js","path":"src/structures"}},{"name":"comparePositions","description":"Compares the positions of two roles.","scope":"static","params":[{"name":"role1","description":"First role to compare","type":[[["Role"]]]},{"name":"role2","description":"Second role to compare","type":[[["Role"]]]}],"returns":{"types":[[["number"]]],"description":"Negative number if the first role's position is lower (second role's is higher),\npositive number if the first's is higher (second's is lower), 0 if equal"},"meta":{"line":335,"file":"Role.js","path":"src/structures"}}],"meta":{"line":6,"file":"Role.js","path":"src/structures"}},{"name":"TextChannel","description":"Represents a guild text channel on Discord.","extends":["GuildChannel"],"implements":["TextBasedChannel"],"props":[{"name":"topic","description":"The topic of the text channel, if there is one.","nullable":true,"type":[[["string"]]],"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"}},{"name":"members","description":"A collection of members that can see this channel, mapped by their ID.","readonly":true,"type":[[["Collection","<"],["string",", "],["GuildMember",">"]]],"meta":{"line":35,"file":"TextChannel.js","path":"src/structures"}},{"name":"messages","description":"A collection containing the messages sent to this channel.","type":[[["Collection","<"],["string",", "],["Message",">"]]],"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","nullable":true,"type":[[["string"]]],"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","readonly":true,"type":[[["boolean"]]],"meta":{"line":268,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"typingCount","description":"Number of times `startTyping` has been called.","readonly":true,"type":[[["number"]]],"meta":{"line":277,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"guild","description":"The guild the channel is in","type":[[["Guild"]]],"meta":{"line":20,"file":"GuildChannel.js","path":"src/structures"}},{"name":"name","description":"The name of the guild channel","type":[[["string"]]],"meta":{"line":30,"file":"GuildChannel.js","path":"src/structures"}},{"name":"position","description":"The position of the channel in the list.","type":[[["number"]]],"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","type":[[["Collection","<"],["string",", "],["PermissionOverwrites",">"]]],"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}}],"methods":[{"name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","returns":[[["Promise","<"],["Collection","<"],["string",", "],["Webhook",">>"]]],"meta":{"line":49,"file":"TextChannel.js","path":"src/structures"}},{"name":"createWebhook","description":"Create a webhook for the channel.","examples":["channel.createWebhook('Snek', 'http://snek.s3.amazonaws.com/topSnek.png')\n .then(webhook => console.log(`Created Webhook ${webhook}`))\n .catch(console.error)"],"params":[{"name":"name","description":"The name of the webhook.","type":[[["string"]]]},{"name":"avatar","description":"The avatar for the webhook.","type":[[["BufferResolvable"]]]}],"returns":{"types":[[["Promise","<"],["Webhook",">"]]],"description":"webhook The created webhook."},"meta":{"line":63,"file":"TextChannel.js","path":"src/structures"}},{"name":"send","description":"Send a message to this channel","implements":["TextBasedChannel#send"],"examples":["// send a message\nchannel.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":67,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendMessage","description":"Send a message to this channel","implements":["TextBasedChannel#sendMessage"],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":106,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendEmbed","description":"Send an embed to this channel","implements":["TextBasedChannel#sendEmbed"],"params":[{"name":"embed","description":"Embed for the message","type":[[["RichEmbed"]],[["Object"]]]},{"name":"content","description":"Text for the message","optional":true,"type":[[["string"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":117,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendFile","description":"Send a file to this channel","implements":["TextBasedChannel#sendFile"],"params":[{"name":"attachment","description":"File to send","type":[[["BufferResolvable"]]]},{"name":"name","description":"Name and extension of the file","optional":true,"default":"'file.jpg'","type":[[["string"]]]},{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":135,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendCode","description":"Send a code block to this channel","implements":["TextBasedChannel#sendCode"],"params":[{"name":"lang","description":"Language for the code block","type":[[["string"]]]},{"name":"content","description":"Content of the code block","type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":146,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\n<warn>This is only available when using a bot account.</warn>","implements":["TextBasedChannel#fetchMessage"],"examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"params":[{"name":"messageID","description":"ID of the message to get","type":[[["string"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":161,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a collection mapping message ID's to Message objects.","implements":["TextBasedChannel#fetchMessages"],"examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"params":[{"name":"options","description":"Query parameters to pass in","optional":true,"default":"{}","type":[[["ChannelLogsQueryOptions"]]]}],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"meta":{"line":189,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"fetchPinnedMessages","description":"Fetches the pinned messages of this channel and returns a collection of them.","implements":["TextBasedChannel#fetchPinnedMessages"],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"meta":{"line":205,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"startTyping","description":"Starts a typing indicator in the channel.","implements":["TextBasedChannel#startTyping"],"examples":["// start typing in a channel\nchannel.startTyping();"],"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":[[["number"]]]}],"meta":{"line":224,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\n<info>It can take a few seconds for the client user to stop typing.</info>","implements":["TextBasedChannel#stopTyping"],"examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"default":false,"type":[[["boolean"]]]}],"meta":{"line":252,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"createCollector","description":"Creates a Message Collector","implements":["TextBasedChannel#createCollector"],"examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"params":[{"name":"filter","description":"The filter to create the collector with","type":[[["CollectorFilterFunction"]]]},{"name":"options","description":"The options to pass to the collector","optional":true,"default":"{}","type":[[["CollectorOptions"]]]}],"returns":[[["MessageCollector"]]],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"awaitMessages","description":"Similar to createCollector but in promise form. Resolves with a collection of messages that pass the specified\nfilter.","implements":["TextBasedChannel#awaitMessages"],"examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"params":[{"name":"filter","description":"The filter function to use","type":[[["CollectorFilterFunction"]]]},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"default":"{}","type":[[["AwaitMessagesOptions"]]]}],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"meta":{"line":320,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"bulkDelete","description":"Bulk delete given messages.\n<warn>This is only available when using a bot account.</warn>","implements":["TextBasedChannel#bulkDelete"],"params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":[[["Collection","<"],["string",", "],["Message",">"]],[["Array","<"],["Message",">"]],[["number"]]]}],"returns":{"types":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"description":"Deleted messages"},"meta":{"line":339,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","inherits":"GuildChannel#permissionsFor","inherited":true,"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":[[["GuildMemberResolvable"]]]}],"returns":{"types":[[["EvaluatedPermissions"]]],"nullable":true},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","inherits":"GuildChannel#overwritePermissions","inherited":true,"examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"params":[{"name":"userOrRole","description":"The user or role to update","type":[[["RoleResolvable"]],[["UserResolvable"]]]},{"name":"options","description":"The configuration for the update","type":[[["PermissionOverwriteOptions"]]]}],"returns":[[["Promise"]]],"meta":{"line":124,"file":"GuildChannel.js","path":"src/structures"}},{"name":"edit","description":"Edits the channel","inherits":"GuildChannel#edit","inherited":true,"examples":["// edit a channel\nchannel.edit({name: 'new-channel'})\n .then(c => console.log(`Edited channel ${c}`))\n .catch(console.error);"],"params":[{"name":"data","description":"The new data for the channel","type":[[["ChannelData"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":186,"file":"GuildChannel.js","path":"src/structures"}},{"name":"setName","description":"Set a new name for the guild channel","inherits":"GuildChannel#setName","inherited":true,"examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"params":[{"name":"name","description":"The new name for the guild channel","type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":200,"file":"GuildChannel.js","path":"src/structures"}},{"name":"setPosition","description":"Set a new position for the guild channel","inherits":"GuildChannel#setPosition","inherited":true,"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"params":[{"name":"position","description":"The new position for the guild channel","type":[[["number"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":214,"file":"GuildChannel.js","path":"src/structures"}},{"name":"setTopic","description":"Set a new topic for the guild channel","inherits":"GuildChannel#setTopic","inherited":true,"examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"params":[{"name":"topic","description":"The new topic for the guild channel","type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":228,"file":"GuildChannel.js","path":"src/structures"}},{"name":"createInvite","description":"Create an invite to this guild channel","inherits":"GuildChannel#createInvite","inherited":true,"params":[{"name":"options","description":"The options for the invite","optional":true,"default":"{}","type":[[["InviteOptions"]]]}],"returns":[[["Promise","<"],["Invite",">"]]],"meta":{"line":245,"file":"GuildChannel.js","path":"src/structures"}},{"name":"clone","description":"Clone this channel","inherits":"GuildChannel#clone","inherited":true,"params":[{"name":"name","description":"Optional name for the new channel, otherwise it has the name of this channel","optional":true,"default":"this.name","type":[[["string"]]]},{"name":"withPermissions","description":"Whether to clone the channel with this channel's permission overwrites","optional":true,"default":true,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":255,"file":"GuildChannel.js","path":"src/structures"}},{"name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","inherits":"GuildChannel#equals","inherited":true,"params":[{"name":"channel","description":"Channel to compare with","type":[[["GuildChannel"]]]}],"returns":[[["boolean"]]],"meta":{"line":265,"file":"GuildChannel.js","path":"src/structures"}},{"name":"toString","description":"When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.","inherits":"GuildChannel#toString","inherited":true,"examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"returns":[[["string"]]],"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"}}],"meta":{"line":10,"file":"TextChannel.js","path":"src/structures"}},{"name":"User","description":"Represents a user on Discord.","implements":["TextBasedChannel"],"props":[{"name":"client","description":"The Client that created the instance of the the User.","readonly":true,"type":[[["Client"]]],"meta":{"line":11,"file":"User.js","path":"src/structures"}},{"name":"id","description":"The ID of the user","type":[[["string"]]],"meta":{"line":27,"file":"User.js","path":"src/structures"}},{"name":"username","description":"The username of the user","type":[[["string"]]],"meta":{"line":33,"file":"User.js","path":"src/structures"}},{"name":"discriminator","description":"A discriminator based on username for the user","type":[[["string"]]],"meta":{"line":39,"file":"User.js","path":"src/structures"}},{"name":"avatar","description":"The ID of the user's avatar","type":[[["string"]]],"meta":{"line":45,"file":"User.js","path":"src/structures"}},{"name":"bot","description":"Whether or not the user is a bot.","type":[[["boolean"]]],"meta":{"line":51,"file":"User.js","path":"src/structures"}},{"name":"lastMessageID","description":"The ID of the last message sent by the user, if one was sent.","nullable":true,"type":[[["string"]]],"meta":{"line":57,"file":"User.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the user was created at","readonly":true,"type":[[["number"]]],"meta":{"line":72,"file":"User.js","path":"src/structures"}},{"name":"createdAt","description":"The time the user was created","readonly":true,"type":[[["Date"]]],"meta":{"line":81,"file":"User.js","path":"src/structures"}},{"name":"presence","description":"The presence of this user","readonly":true,"type":[[["Presence"]]],"meta":{"line":90,"file":"User.js","path":"src/structures"}},{"name":"avatarURL","description":"A link to the user's avatar (if they have one, otherwise null)","readonly":true,"nullable":true,"type":[[["string"]]],"meta":{"line":103,"file":"User.js","path":"src/structures"}},{"name":"defaultAvatarURL","description":"A link to the user's default avatar","readonly":true,"type":[[["string"]]],"meta":{"line":113,"file":"User.js","path":"src/structures"}},{"name":"displayAvatarURL","description":"A link to the user's avatar if they have one. Otherwise a link to their default avatar will be returned","readonly":true,"type":[[["string"]]],"meta":{"line":124,"file":"User.js","path":"src/structures"}},{"name":"note","description":"The note that is set for the user\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["string"]]],"meta":{"line":134,"file":"User.js","path":"src/structures"}},{"name":"dmChannel","description":"The DM between the client's user and this user","nullable":true,"type":[[["DMChannel"]]],"meta":{"line":172,"file":"User.js","path":"src/structures"}}],"methods":[{"name":"typingIn","description":"Check whether the user is typing in a channel.","params":[{"name":"channel","description":"The channel to check in","type":[[["ChannelResolvable"]]]}],"returns":[[["boolean"]]],"meta":{"line":143,"file":"User.js","path":"src/structures"}},{"name":"typingSinceIn","description":"Get the time that the user started typing.","params":[{"name":"channel","description":"The channel to get the time in","type":[[["ChannelResolvable"]]]}],"returns":{"types":[[["Date"]]],"nullable":true},"meta":{"line":153,"file":"User.js","path":"src/structures"}},{"name":"typingDurationIn","description":"Get the amount of time the user has been typing in a channel for (in milliseconds), or -1 if they're not typing.","params":[{"name":"channel","description":"The channel to get the time in","type":[[["ChannelResolvable"]]]}],"returns":[[["number"]]],"meta":{"line":163,"file":"User.js","path":"src/structures"}},{"name":"deleteDM","description":"Deletes a DM channel (if one exists) between the client and the user. Resolves with the channel if successful.","returns":[[["Promise","<"],["DMChannel",">"]]],"meta":{"line":180,"file":"User.js","path":"src/structures"}},{"name":"addFriend","description":"Sends a friend request to the user\n<warn>This is only available when using a user account.</warn>","returns":[[["Promise","<"],["User",">"]]],"meta":{"line":189,"file":"User.js","path":"src/structures"}},{"name":"removeFriend","description":"Removes the user from your friends\n<warn>This is only available when using a user account.</warn>","returns":[[["Promise","<"],["User",">"]]],"meta":{"line":198,"file":"User.js","path":"src/structures"}},{"name":"block","description":"Blocks the user\n<warn>This is only available when using a user account.</warn>","returns":[[["Promise","<"],["User",">"]]],"meta":{"line":207,"file":"User.js","path":"src/structures"}},{"name":"unblock","description":"Unblocks the user\n<warn>This is only available when using a user account.</warn>","returns":[[["Promise","<"],["User",">"]]],"meta":{"line":216,"file":"User.js","path":"src/structures"}},{"name":"fetchProfile","description":"Get the profile of the user\n<warn>This is only available when using a user account.</warn>","returns":[[["Promise","<"],["UserProfile",">"]]],"meta":{"line":225,"file":"User.js","path":"src/structures"}},{"name":"setNote","description":"Sets a note for the user\n<warn>This is only available when using a user account.</warn>","params":[{"name":"note","description":"The note to set for the user","type":[[["string"]]]}],"returns":[[["Promise","<"],["User",">"]]],"meta":{"line":235,"file":"User.js","path":"src/structures"}},{"name":"equals","description":"Checks if the user is equal to another. It compares ID, username, discriminator, avatar, and bot flags.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","params":[{"name":"user","description":"User to compare with","type":[[["User"]]]}],"returns":[[["boolean"]]],"meta":{"line":245,"file":"User.js","path":"src/structures"}},{"name":"toString","description":"When concatenated with a string, this automatically concatenates the user's mention instead of the User object.","examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[[["string"]]],"meta":{"line":263,"file":"User.js","path":"src/structures"}},{"name":"send","description":"Send a message to this channel","implements":["TextBasedChannel#send"],"examples":["// send a message\nchannel.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":67,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendMessage","description":"Send a message to this channel","implements":["TextBasedChannel#sendMessage"],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":106,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendEmbed","description":"Send an embed to this channel","implements":["TextBasedChannel#sendEmbed"],"params":[{"name":"embed","description":"Embed for the message","type":[[["RichEmbed"]],[["Object"]]]},{"name":"content","description":"Text for the message","optional":true,"type":[[["string"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":117,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendFile","description":"Send a file to this channel","implements":["TextBasedChannel#sendFile"],"params":[{"name":"attachment","description":"File to send","type":[[["BufferResolvable"]]]},{"name":"name","description":"Name and extension of the file","optional":true,"default":"'file.jpg'","type":[[["string"]]]},{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":135,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendCode","description":"Send a code block to this channel","implements":["TextBasedChannel#sendCode"],"params":[{"name":"lang","description":"Language for the code block","type":[[["string"]]]},{"name":"content","description":"Content of the code block","type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":146,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"meta":{"line":9,"file":"User.js","path":"src/structures"}},{"name":"UserConnection","description":"Represents a user connection (or \"platform identity\")","props":[{"name":"user","description":"The user that owns the Connection","type":[[["User"]]],"meta":{"line":10,"file":"UserConnection.js","path":"src/structures"}},{"name":"type","description":"The type of the Connection","type":[[["string"]]],"meta":{"line":20,"file":"UserConnection.js","path":"src/structures"}},{"name":"name","description":"The username of the connection account","type":[[["string"]]],"meta":{"line":26,"file":"UserConnection.js","path":"src/structures"}},{"name":"id","description":"The id of the connection account","type":[[["string"]]],"meta":{"line":32,"file":"UserConnection.js","path":"src/structures"}},{"name":"revoked","description":"Whether the connection is revoked","type":[[["boolean"]]],"meta":{"line":38,"file":"UserConnection.js","path":"src/structures"}},{"name":"integrations","description":"an array of partial server integrations (not yet implemented in this lib)","type":[[["Array","<"],["Object",">"]]],"meta":{"line":44,"file":"UserConnection.js","path":"src/structures"}}],"meta":{"line":4,"file":"UserConnection.js","path":"src/structures"}},{"name":"UserProfile","description":"Represents a user's profile on Discord.","props":[{"name":"user","description":"The owner of the profile","type":[[["User"]]],"meta":{"line":13,"file":"UserProfile.js","path":"src/structures"}},{"name":"client","description":"The Client that created the instance of the the UserProfile.","readonly":true,"type":[[["Client"]]],"meta":{"line":15,"file":"UserProfile.js","path":"src/structures"}},{"name":"mutualGuilds","description":"Guilds that the client user and the user share","type":[[["Collection","<"],["Guild",">"]]],"meta":{"line":27,"file":"UserProfile.js","path":"src/structures"}},{"name":"connections","description":"The user's connections","type":[[["Collection","<"],["UserConnection",">"]]],"meta":{"line":33,"file":"UserProfile.js","path":"src/structures"}},{"name":"premium","description":"If the user has Discord Premium","type":[[["boolean"]]],"meta":{"line":43,"file":"UserProfile.js","path":"src/structures"}}],"meta":{"line":7,"file":"UserProfile.js","path":"src/structures"}},{"name":"VoiceChannel","description":"Represents a guild voice channel on Discord.","extends":["GuildChannel"],"props":[{"name":"members","description":"The members in this voice channel.","type":[[["Collection","<"],["string",", "],["GuildMember",">"]]],"meta":{"line":16,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"bitrate","description":"The bitrate of this voice channel","type":[[["number"]]],"meta":{"line":28,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"userLimit","description":"The maximum amount of users allowed in this channel - 0 means unlimited.","type":[[["number"]]],"meta":{"line":34,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"connection","description":"The voice connection for this voice channel, if the client is connected","readonly":true,"nullable":true,"type":[[["VoiceConnection"]]],"meta":{"line":42,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"joinable","description":"Checks if the client has permission join the voice channel","type":[[["boolean"]]],"meta":{"line":52,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","type":[[["boolean"]]],"meta":{"line":61,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"guild","description":"The guild the channel is in","type":[[["Guild"]]],"meta":{"line":20,"file":"GuildChannel.js","path":"src/structures"}},{"name":"name","description":"The name of the guild channel","type":[[["string"]]],"meta":{"line":30,"file":"GuildChannel.js","path":"src/structures"}},{"name":"position","description":"The position of the channel in the list.","type":[[["number"]]],"meta":{"line":36,"file":"GuildChannel.js","path":"src/structures"}},{"name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users.","type":[[["Collection","<"],["string",", "],["PermissionOverwrites",">"]]],"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}}],"methods":[{"name":"setBitrate","description":"Sets the bitrate of the channel","examples":["// set the bitrate of a voice channel\nvoiceChannel.setBitrate(48000)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate} for ${vc.name}`))\n .catch(console.error);"],"params":[{"name":"bitrate","description":"The new bitrate","type":[[["number"]]]}],"returns":[[["Promise","<"],["VoiceChannel",">"]]],"meta":{"line":75,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"setUserLimit","description":"Sets the user limit of the channel","examples":["// set the user limit of a voice channel\nvoiceChannel.setUserLimit(42)\n .then(vc => console.log(`Set user limit to ${vc.userLimit} for ${vc.name}`))\n .catch(console.error);"],"params":[{"name":"userLimit","description":"The new user limit","type":[[["number"]]]}],"returns":[[["Promise","<"],["VoiceChannel",">"]]],"meta":{"line":89,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"join","description":"Attempts to join this voice channel","examples":["// join a voice channel\nvoiceChannel.join()\n .then(connection => console.log('Connected!'))\n .catch(console.error);"],"returns":[[["Promise","<"],["VoiceConnection",">"]]],"meta":{"line":102,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"leave","description":"Leaves this voice channel","examples":["// leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":113,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"permissionsFor","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","inherits":"GuildChannel#permissionsFor","inherited":true,"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":[[["GuildMemberResolvable"]]]}],"returns":{"types":[[["EvaluatedPermissions"]]],"nullable":true},"meta":{"line":56,"file":"GuildChannel.js","path":"src/structures"}},{"name":"overwritePermissions","description":"Overwrites the permissions for a user or role in this channel.","inherits":"GuildChannel#overwritePermissions","inherited":true,"examples":["// overwrite permissions for a message author\nmessage.channel.overwritePermissions(message.author, {\n SEND_MESSAGES: false\n})\n.then(() => console.log('Done!'))\n.catch(console.error);"],"params":[{"name":"userOrRole","description":"The user or role to update","type":[[["RoleResolvable"]],[["UserResolvable"]]]},{"name":"options","description":"The configuration for the update","type":[[["PermissionOverwriteOptions"]]]}],"returns":[[["Promise"]]],"meta":{"line":124,"file":"GuildChannel.js","path":"src/structures"}},{"name":"edit","description":"Edits the channel","inherits":"GuildChannel#edit","inherited":true,"examples":["// edit a channel\nchannel.edit({name: 'new-channel'})\n .then(c => console.log(`Edited channel ${c}`))\n .catch(console.error);"],"params":[{"name":"data","description":"The new data for the channel","type":[[["ChannelData"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":186,"file":"GuildChannel.js","path":"src/structures"}},{"name":"setName","description":"Set a new name for the guild channel","inherits":"GuildChannel#setName","inherited":true,"examples":["// set a new channel name\nchannel.setName('not_general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.error);"],"params":[{"name":"name","description":"The new name for the guild channel","type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":200,"file":"GuildChannel.js","path":"src/structures"}},{"name":"setPosition","description":"Set a new position for the guild channel","inherits":"GuildChannel#setPosition","inherited":true,"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.error);"],"params":[{"name":"position","description":"The new position for the guild channel","type":[[["number"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":214,"file":"GuildChannel.js","path":"src/structures"}},{"name":"setTopic","description":"Set a new topic for the guild channel","inherits":"GuildChannel#setTopic","inherited":true,"examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.error);"],"params":[{"name":"topic","description":"The new topic for the guild channel","type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":228,"file":"GuildChannel.js","path":"src/structures"}},{"name":"createInvite","description":"Create an invite to this guild channel","inherits":"GuildChannel#createInvite","inherited":true,"params":[{"name":"options","description":"The options for the invite","optional":true,"default":"{}","type":[[["InviteOptions"]]]}],"returns":[[["Promise","<"],["Invite",">"]]],"meta":{"line":245,"file":"GuildChannel.js","path":"src/structures"}},{"name":"clone","description":"Clone this channel","inherits":"GuildChannel#clone","inherited":true,"params":[{"name":"name","description":"Optional name for the new channel, otherwise it has the name of this channel","optional":true,"default":"this.name","type":[[["string"]]]},{"name":"withPermissions","description":"Whether to clone the channel with this channel's permission overwrites","optional":true,"default":true,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":255,"file":"GuildChannel.js","path":"src/structures"}},{"name":"equals","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","inherits":"GuildChannel#equals","inherited":true,"params":[{"name":"channel","description":"Channel to compare with","type":[[["GuildChannel"]]]}],"returns":[[["boolean"]]],"meta":{"line":265,"file":"GuildChannel.js","path":"src/structures"}},{"name":"toString","description":"When concatenated with a string, this automatically returns the channel's mention instead of the Channel object.","inherits":"GuildChannel#toString","inherited":true,"examples":["// Outputs: Hello from #general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from #general\nconsole.log('Hello from ' + channel);"],"returns":[[["string"]]],"meta":{"line":294,"file":"GuildChannel.js","path":"src/structures"}}],"meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"Webhook","description":"Represents a webhook","props":[{"name":"client","description":"The Client that instantiated the Webhook","readonly":true,"type":[[["Client"]]],"meta":{"line":10,"file":"Webhook.js","path":"src/structures"}},{"name":"name","description":"The name of the webhook","type":[[["string"]]],"meta":{"line":30,"file":"Webhook.js","path":"src/structures"}},{"name":"token","description":"The token for the webhook","type":[[["string"]]],"meta":{"line":36,"file":"Webhook.js","path":"src/structures"}},{"name":"avatar","description":"The avatar for the webhook","type":[[["string"]]],"meta":{"line":42,"file":"Webhook.js","path":"src/structures"}},{"name":"id","description":"The ID of the webhook","type":[[["string"]]],"meta":{"line":48,"file":"Webhook.js","path":"src/structures"}},{"name":"guildID","description":"The guild the webhook belongs to","type":[[["string"]]],"meta":{"line":54,"file":"Webhook.js","path":"src/structures"}},{"name":"channelID","description":"The channel the webhook belongs to","type":[[["string"]]],"meta":{"line":60,"file":"Webhook.js","path":"src/structures"}}],"methods":[{"name":"sendMessage","description":"Send a message with this webhook","examples":["// send a message\nwebhook.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"The content to send.","type":[[["StringResolvable"]]]},{"name":"options","description":"The options to provide.","optional":true,"default":"{}","type":[[["WebhookMessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":88,"file":"Webhook.js","path":"src/structures"}},{"name":"sendSlackMessage","description":"Send a raw slack message with this webhook","examples":["// send a slack message\nwebhook.sendSlackMessage({\n 'username': 'Wumpus',\n 'attachments': [{\n 'pretext': 'this looks pretty cool',\n 'color': '#F0F',\n 'footer_icon': 'http://snek.s3.amazonaws.com/topSnek.png',\n 'footer': 'Powered by sneks',\n 'ts': Date.now() / 1000\n }]\n}).catch(console.error);"],"params":[{"name":"body","description":"The raw body to send.","type":[[["Object"]]]}],"returns":[[["Promise"]]],"meta":{"line":109,"file":"Webhook.js","path":"src/structures"}},{"name":"sendTTSMessage","description":"Send a text-to-speech message with this webhook","examples":["// send a TTS message\nwebhook.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"The content to send","type":[[["StringResolvable"]]]},{"name":"options","description":"The options to provide","optional":true,"default":"{}","type":[[["WebhookMessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":124,"file":"Webhook.js","path":"src/structures"}},{"name":"sendFile","description":"Send a file with this webhook","params":[{"name":"attachment","description":"The file to send","type":[[["BufferResolvable"]]]},{"name":"fileName","description":"The name and extension of the file","optional":true,"default":"\"file.jpg\"","type":[[["string"]]]},{"name":"content","description":"Text message to send with the attachment","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"The options to provide","optional":true,"type":[[["WebhookMessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":137,"file":"Webhook.js","path":"src/structures"}},{"name":"sendCode","description":"Send a code block with this webhook","params":[{"name":"lang","description":"Language for the code block","type":[[["string"]]]},{"name":"content","description":"Content of the code block","type":[[["StringResolvable"]]]},{"name":"options","description":"The options to provide","type":[[["WebhookMessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":162,"file":"Webhook.js","path":"src/structures"}},{"name":"edit","description":"Edit the webhook.","params":[{"name":"name","description":"The new name for the Webhook","type":[[["string"]]]},{"name":"avatar","description":"The new avatar for the Webhook.","type":[[["BufferResolvable"]]]}],"returns":[[["Promise","<"],["Webhook",">"]]],"meta":{"line":178,"file":"Webhook.js","path":"src/structures"}},{"name":"delete","description":"Delete the webhook","returns":[[["Promise"]]],"meta":{"line":195,"file":"Webhook.js","path":"src/structures"}}],"meta":{"line":7,"file":"Webhook.js","path":"src/structures"}},{"name":"Collection","description":"A Map with additional utility methods. This is used throughout discord.js rather than Arrays for anything that has\nan ID, for significantly improved performance and ease-of-use.","extends":["Map"],"props":[{"name":"_array","description":"Cached array for the `array()` method - will be reset to `null` whenever `set()` or `delete()` are called.","access":"private","nullable":true,"type":[[["Array"]]],"meta":{"line":15,"file":"Collection.js","path":"src/util"}},{"name":"_keyArray","description":"Cached array for the `keyArray()` method - will be reset to `null` whenever `set()` or `delete()` are called.","access":"private","nullable":true,"type":[[["Array"]]],"meta":{"line":22,"file":"Collection.js","path":"src/util"}}],"methods":[{"name":"array","description":"Creates an ordered array of the values of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you change the length of the array\nitself. If you don't want this caching behaviour, use `Array.from(collection.values())` instead.","returns":[[["Array"]]],"meta":{"line":43,"file":"Collection.js","path":"src/util"}},{"name":"keyArray","description":"Creates an ordered array of the keys of this collection, and caches it internally. The array will only be\nreconstructed if an item is added to or removed from the collection, or if you change the length of the array\nitself. If you don't want this caching behaviour, use `Array.from(collection.keys())` instead.","returns":[[["Array"]]],"meta":{"line":54,"file":"Collection.js","path":"src/util"}},{"name":"first","description":"Obtains the first item in this collection.","returns":[["*"]],"meta":{"line":63,"file":"Collection.js","path":"src/util"}},{"name":"firstKey","description":"Obtains the first key in this collection.","returns":[["*"]],"meta":{"line":71,"file":"Collection.js","path":"src/util"}},{"name":"last","description":"Obtains the last item in this collection. This relies on the `array()` method, and thus the caching mechanism\napplies here as well.","returns":[["*"]],"meta":{"line":80,"file":"Collection.js","path":"src/util"}},{"name":"lastKey","description":"Obtains the last key in this collection. This relies on the `keyArray()` method, and thus the caching mechanism\napplies here as well.","returns":[["*"]],"meta":{"line":90,"file":"Collection.js","path":"src/util"}},{"name":"random","description":"Obtains a random item from this collection. This relies on the `array()` method, and thus the caching mechanism\napplies here as well.","returns":[["*"]],"meta":{"line":100,"file":"Collection.js","path":"src/util"}},{"name":"randomKey","description":"Obtains a random key from this collection. This relies on the `keyArray()` method, and thus the caching mechanism\napplies here as well.","returns":[["*"]],"meta":{"line":110,"file":"Collection.js","path":"src/util"}},{"name":"findAll","description":"Searches for all items where their specified property's value is identical to the given value\n(`item[prop] === value`).","examples":["collection.findAll('username', 'Bob');"],"params":[{"name":"prop","description":"The property to test against","type":[[["string"]]]},{"name":"value","description":"The expected value","type":[["*"]]}],"returns":[[["Array"]]],"meta":{"line":124,"file":"Collection.js","path":"src/util"}},{"name":"find","description":"Searches for a single item where its specified property's value is identical to the given value\n(`item[prop] === value`), or the given function returns a truthy value. In the latter case, this is identical to\n[Array.find()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find).\n<warn>Do not use this to obtain an item by its ID. Instead, use `collection.get(id)`. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/get) for details.</warn>","examples":["collection.find('username', 'Bob');","collection.find(val => val.username === 'Bob');"],"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":[[["string"]],[["function"]]]},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":[["*"]]}],"returns":[["*"]],"meta":{"line":148,"file":"Collection.js","path":"src/util"}},{"name":"findKey","description":"Searches for the key of a single item where its specified property's value is identical to the given value\n(`item[prop] === value`), or the given function returns a truthy value. In the latter case, this is identical to\n[Array.findIndex()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex).","examples":["collection.findKey('username', 'Bob');","collection.findKey(val => val.username === 'Bob');"],"params":[{"name":"propOrFn","description":"The property to test against, or the function to test with","type":[[["string"]],[["function"]]]},{"name":"value","description":"The expected value - only applicable and required if using a property for the first argument","optional":true,"type":[["*"]]}],"returns":[["*"]],"meta":{"line":180,"file":"Collection.js","path":"src/util"}},{"name":"exists","description":"Searches for the existence of a single item where its specified property's value is identical to the given value\n(`item[prop] === value`).\n<warn>Do not use this to check for an item by its ID. Instead, use `collection.has(id)`. See\n[MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/has) for details.</warn>","examples":["if (collection.exists('username', 'Bob')) {\n console.log('user here!');\n}"],"params":[{"name":"prop","description":"The property to test against","type":[[["string"]]]},{"name":"value","description":"The expected value","type":[["*"]]}],"returns":[[["boolean"]]],"meta":{"line":210,"file":"Collection.js","path":"src/util"}},{"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.","params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":[[["function"]]]},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":[[["Object"]]]}],"returns":[[["Collection"]]],"meta":{"line":223,"file":"Collection.js","path":"src/util"}},{"name":"filterArray","description":"Identical to\n[Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter).","params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":[[["function"]]]},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":[[["Object"]]]}],"returns":[[["Array"]]],"meta":{"line":239,"file":"Collection.js","path":"src/util"}},{"name":"map","description":"Identical to\n[Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map).","params":[{"name":"fn","description":"Function that produces an element of the new array, taking three arguments","type":[[["function"]]]},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":[["*"]]}],"returns":[[["Array"]]],"meta":{"line":255,"file":"Collection.js","path":"src/util"}},{"name":"some","description":"Identical to\n[Array.some()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some).","params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":[[["function"]]]},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":[[["Object"]]]}],"returns":[[["boolean"]]],"meta":{"line":270,"file":"Collection.js","path":"src/util"}},{"name":"every","description":"Identical to\n[Array.every()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/every).","params":[{"name":"fn","description":"Function used to test (should return a boolean)","type":[[["function"]]]},{"name":"thisArg","description":"Value to use as `this` when executing function","optional":true,"type":[[["Object"]]]}],"returns":[[["boolean"]]],"meta":{"line":285,"file":"Collection.js","path":"src/util"}},{"name":"reduce","description":"Identical to\n[Array.reduce()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce).","params":[{"name":"fn","description":"Function used to reduce, taking four arguments; `accumulator`, `currentValue`, `currentKey`,\nand `collection`","type":[[["function"]]]},{"name":"initialValue","description":"Starting value for the accumulator","optional":true,"type":[["*"]]}],"returns":[["*"]],"meta":{"line":301,"file":"Collection.js","path":"src/util"}},{"name":"concat","description":"Combines this collection with others into a new collection. None of the source collections are modified.","examples":["const newColl = someColl.concat(someOtherColl, anotherColl, ohBoyAColl);"],"params":[{"name":"collections","description":"Collections to merge","variable":true,"type":[[["Collection"]]]}],"returns":[[["Collection"]]],"meta":{"line":326,"file":"Collection.js","path":"src/util"}},{"name":"deleteAll","description":"Calls the `delete()` method on all items that have it.","returns":[[["Array","<"],["Promise",">"]]],"meta":{"line":339,"file":"Collection.js","path":"src/util"}},{"name":"equals","description":"Checks if this collection shares identical key-value pairings with another.\nThis is different to checking for equality using equal-signs, because\nthe collections may be different objects, but contain the same data.","params":[{"name":"collection","description":"Collection to compare with","type":[[["Collection"]]]}],"returns":{"types":[[["boolean"]]],"description":"Whether the collections have identical contents"},"meta":{"line":354,"file":"Collection.js","path":"src/util"}}],"meta":{"line":6,"file":"Collection.js","path":"src/util"}}],"interfaces":[{"name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features","props":[{"name":"messages","description":"A collection containing the messages sent to this channel.","type":[[["Collection","<"],["string",", "],["Message",">"]]],"meta":{"line":17,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"lastMessageID","description":"The ID of the last message in the channel, if one was sent.","nullable":true,"type":[[["string"]]],"meta":{"line":23,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"typing","description":"Whether or not the typing indicator is being shown in the channel.","readonly":true,"type":[[["boolean"]]],"meta":{"line":268,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"typingCount","description":"Number of times `startTyping` has been called.","readonly":true,"type":[[["number"]]],"meta":{"line":277,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"methods":[{"name":"send","description":"Send a message to this channel","examples":["// send a message\nchannel.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":67,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendMessage","description":"Send a message to this channel","examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"default":"{}","type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":106,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendEmbed","description":"Send an embed to this channel","params":[{"name":"embed","description":"Embed for the message","type":[[["RichEmbed"]],[["Object"]]]},{"name":"content","description":"Text for the message","optional":true,"type":[[["string"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":117,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendFile","description":"Send a file to this channel","params":[{"name":"attachment","description":"File to send","type":[[["BufferResolvable"]]]},{"name":"name","description":"Name and extension of the file","optional":true,"default":"'file.jpg'","type":[[["string"]]]},{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":135,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"sendCode","description":"Send a code block to this channel","params":[{"name":"lang","description":"Language for the code block","type":[[["string"]]]},{"name":"content","description":"Content of the code block","type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":146,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not.\n<warn>This is only available when using a bot account.</warn>","examples":["// get message\nchannel.fetchMessage('99539446449315840')\n .then(message => console.log(message.content))\n .catch(console.error);"],"params":[{"name":"messageID","description":"ID of the message to get","type":[[["string"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":161,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"fetchMessages","description":"Gets the past messages sent in this channel. Resolves with a collection mapping message ID's to Message objects.","examples":["// get messages\nchannel.fetchMessages({limit: 10})\n .then(messages => console.log(`Received ${messages.size} messages`))\n .catch(console.error);"],"params":[{"name":"options","description":"Query parameters to pass in","optional":true,"default":"{}","type":[[["ChannelLogsQueryOptions"]]]}],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"meta":{"line":189,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"fetchPinnedMessages","description":"Fetches the pinned messages of this channel and returns a collection of them.","returns":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"meta":{"line":205,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"startTyping","description":"Starts a typing indicator in the channel.","examples":["// start typing in a channel\nchannel.startTyping();"],"params":[{"name":"count","description":"The number of times startTyping should be considered to have been called","optional":true,"type":[[["number"]]]}],"meta":{"line":224,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"stopTyping","description":"Stops the typing indicator in the channel.\nThe indicator will only stop if this is called as many times as startTyping().\n<info>It can take a few seconds for the client user to stop typing.</info>","examples":["// stop typing in a channel\nchannel.stopTyping();","// force typing to fully stop in a channel\nchannel.stopTyping(true);"],"params":[{"name":"force","description":"Whether or not to reset the call count and force the indicator to stop","optional":true,"default":false,"type":[[["boolean"]]]}],"meta":{"line":252,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"createCollector","description":"Creates a Message Collector","examples":["// create a message collector\nconst collector = channel.createCollector(\n m => m.content.includes('discord'),\n { time: 15000 }\n);\ncollector.on('message', m => console.log(`Collected ${m.content}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"params":[{"name":"filter","description":"The filter to create the collector with","type":[[["CollectorFilterFunction"]]]},{"name":"options","description":"The options to pass to the collector","optional":true,"default":"{}","type":[[["CollectorOptions"]]]}],"returns":[[["MessageCollector"]]],"meta":{"line":296,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"awaitMessages","description":"Similar to createCollector but in promise form. Resolves with a collection of messages that pass the specified\nfilter.","examples":["// await !vote messages\nconst filter = m => m.content.startsWith('!vote');\n// errors: ['time'] treats ending because of the time limit as an error\nchannel.awaitMessages(filter, { max: 4, time: 60000, errors: ['time'] })\n .then(collected => console.log(collected.size))\n .catch(collected => console.log(`After a minute, only ${collected.size} out of 4 voted.`));"],"params":[{"name":"filter","description":"The filter function to use","type":[[["CollectorFilterFunction"]]]},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"default":"{}","type":[[["AwaitMessagesOptions"]]]}],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"meta":{"line":320,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"bulkDelete","description":"Bulk delete given messages.\n<warn>This is only available when using a bot account.</warn>","params":[{"name":"messages","description":"Messages to delete, or number of messages to delete","type":[[["Collection","<"],["string",", "],["Message",">"]],[["Array","<"],["Message",">"]],[["number"]]]}],"returns":{"types":[[["Promise","<"],["Collection","<"],["string",", "],["Message",">>"]]],"description":"Deleted messages"},"meta":{"line":339,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"meta":{"line":11,"file":"TextBasedChannel.js","path":"src/structures/interface"}}],"typedefs":[{"name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A user ID\n* A Message object (resolves to the message author)\n* A Guild object (owner of the guild)\n* A GuildMember object","type":[[["User"]],[["string"]],[["Message"]],[["Guild"]],[["GuildMember"]]],"meta":{"line":28,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"GuildResolvable","description":"Data that resolves to give a Guild object. This can be:\n* A Guild object\n* A Guild ID","type":[[["Guild"]],[["string"]]],"meta":{"line":65,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"GuildMemberResolvable","description":"Data that resolves to give a GuildMember object. This can be:\n* A GuildMember object\n* A User object","type":[[["Guild"]]],"meta":{"line":83,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"ChannelResolvable","description":"Data that can be resolved to give a Channel. This can be:\n* A Channel object\n* A Message object (the channel the message was sent in)\n* A Guild object (the #general channel)\n* A channel ID","type":[[["Channel"]],[["Guild"]],[["Message"]],[["string"]]],"meta":{"line":104,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"InviteResolvable","description":"Data that can be resolved to give an invite code. This can be:\n* An invite code\n* An invite URL","type":[[["string"]]],"meta":{"line":126,"file":"ClientDataResolver.js","path":"src/client"}},{"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 \"ADD_REACTIONS\", // add reactions to messages\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 \"MANAGE_WEBHOOKS\",\n \"MANAGE_EMOJIS\"\n]\n```","type":[[["string"]],[["number"]]],"meta":{"line":145,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"StringResolvable","description":"Data that can be resolved to 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":[[["string"]],[["Array"]],["*"]],"meta":{"line":207,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"Base64Resolvable","description":"Data that resolves to give a Base64 string, typically for image uploading. This can be:\n* A Buffer\n* A base64 string","type":[[["Buffer"]],[["string"]]],"meta":{"line":226,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"BufferResolvable","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":[[["string"]],[["Buffer"]]],"meta":{"line":243,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"EmojiIdentifierResolvable","description":"Data that can be resolved to give an emoji identifier. This can be:\n* A string\n* An Emoji\n* A ReactionEmoji","type":[[["string"]],[["Emoji"]],[["ReactionEmoji"]]],"meta":{"line":287,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"StreamOptions","description":"Options that can be passed to stream-playing methods:","type":[[["Object"]]],"props":[{"name":"seek","description":"The time to seek to","optional":true,"default":0,"type":[[["number"]]]},{"name":"volume","description":"The volume to play at","optional":true,"default":1,"type":[[["number"]]]},{"name":"passes","description":"How many times to send the voice packet to reduce packet loss","optional":true,"default":1,"type":[[["number"]]]}],"meta":{"line":208,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"PresenceData","description":"Data resembling a raw Discord presence","type":[[["Object"]]],"props":[{"name":"status","description":"Status of the user","optional":true,"type":[[["PresenceStatus"]]]},{"name":"afk","description":"Whether the user is AFK","optional":true,"type":[[["boolean"]]]},{"name":"game","description":"Game the user is playing","optional":true,"type":[[["Object"]]]},{"name":"game.name","description":"Name of the game","optional":true,"type":[[["string"]]]},{"name":"game.url","description":"Twitch stream URL","optional":true,"type":[[["string"]]]}],"meta":{"line":121,"file":"ClientUser.js","path":"src/structures"}},{"name":"PresenceStatus","description":"A user's status. Must be one of:\n- `online`\n- `idle`\n- `invisible`\n- `dnd` (do not disturb)","type":[[["string"]]],"meta":{"line":179,"file":"ClientUser.js","path":"src/structures"}},{"name":"GuildEditData","description":"The data for editing a guild","type":[[["Object"]]],"props":[{"name":"name","description":"The name of the guild","optional":true,"type":[[["string"]]]},{"name":"region","description":"The region of the guild","optional":true,"type":[[["string"]]]},{"name":"verificationLevel","description":"The verification level of the guild","optional":true,"type":[[["number"]]]},{"name":"afkChannel","description":"The AFK channel of the guild","optional":true,"type":[[["ChannelResolvable"]]]},{"name":"afkTimeout","description":"The AFK timeout of the guild","optional":true,"type":[[["number"]]]},{"name":"icon","description":"The icon of the guild","optional":true,"type":[[["Base64Resolvable"]]]},{"name":"owner","description":"The owner of the guild","optional":true,"type":[[["GuildMemberResolvable"]]]},{"name":"splash","description":"The splash screen of the guild","optional":true,"type":[[["Base64Resolvable"]]]}],"meta":{"line":365,"file":"Guild.js","path":"src/structures"}},{"name":"PermissionOverwriteOptions","description":"An object mapping permission flags to `true` (enabled) or `false` (disabled)\n```js\n{\n 'SEND_MESSAGES': true,\n 'ATTACH_FILES': false,\n}\n```","type":[[["Object"]]],"meta":{"line":100,"file":"GuildChannel.js","path":"src/structures"}},{"name":"ChannelData","description":"The data for a guild channel","type":[[["Object"]]],"props":[{"name":"name","description":"The name of the channel","optional":true,"type":[[["string"]]]},{"name":"position","description":"The position of the channel","optional":true,"type":[[["number"]]]},{"name":"topic","description":"The topic of the text channel","optional":true,"type":[[["string"]]]},{"name":"bitrate","description":"The bitrate of the voice channel","optional":true,"type":[[["number"]]]},{"name":"userLimit","description":"The user limit of the channel","optional":true,"type":[[["number"]]]}],"meta":{"line":166,"file":"GuildChannel.js","path":"src/structures"}},{"name":"InviteOptions","description":"Options given when creating a guild channel invite","type":[[["Object"]]],"props":[{"name":"temporary","description":"Whether the invite should kick users after 24hrs if they are not given a role","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"maxAge","description":"Time in seconds the invite expires in","optional":true,"default":0,"type":[[["number"]]]},{"name":"maxUses","description":"Maximum amount of uses for this invite","optional":true,"default":0,"type":[[["number"]]]}],"meta":{"line":232,"file":"GuildChannel.js","path":"src/structures"}},{"name":"MessageOptions","description":"Options that can be passed into send, sendMessage, sendFile, sendEmbed, sendCode, and Message#reply","type":[[["Object"]]],"props":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"nonce","description":"The nonce for the message","optional":true,"default":"''","type":[[["string"]]]},{"name":"embed","description":"An embed for the message\n(see [here](https://discordapp.com/developers/docs/resources/channel#embed-object) for more details)","optional":true,"type":[[["Object"]]]},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"default":"this.client.options.disableEveryone","type":[[["boolean"]]]},{"name":"file","description":"A file to send with the message","optional":true,"type":[[["FileOptions"]],[["string"]]]},{"name":"code","description":"Language for optional codeblock formatting to apply","optional":true,"type":[[["string"]],[["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,"default":false,"type":[[["boolean"]],[["SplitOptions"]]]}],"meta":{"line":26,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"FileOptions","type":[[["Object"]]],"props":[{"name":"attachment","type":[[["BufferResolvable"]]]},{"name":"name","optional":true,"default":"'file.jpg'","type":[[["string"]]]}],"meta":{"line":41,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"SplitOptions","description":"Options for splitting a message","type":[[["Object"]]],"props":[{"name":"maxLength","description":"Maximum character length per message piece","optional":true,"default":1950,"type":[[["number"]]]},{"name":"char","description":"Character to split the message with","optional":true,"default":"'\\n'","type":[[["string"]]]},{"name":"prepend","description":"Text to prepend to every piece except the first","optional":true,"default":"''","type":[[["string"]]]},{"name":"append","description":"Text to append to every piece except the last","optional":true,"default":"''","type":[[["string"]]]}],"meta":{"line":47,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"ChannelLogsQueryOptions","description":"The 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":[[["Object"]]],"props":[{"name":"limit","description":"Number of messages to acquire","optional":true,"default":50,"type":[[["number"]]]},{"name":"before","description":"ID of a message to get the messages that were posted before it","optional":true,"type":[[["string"]]]},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":[[["string"]]]},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":[[["string"]]]}],"meta":{"line":169,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":[[["CollectorOptions"]]],"props":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":[[["Array","<"],["string",">"]]]}],"meta":{"line":300,"file":"TextBasedChannel.js","path":"src/structures/interface"}},{"name":"MessageEditOptions","description":"Options that can be passed into editMessage","type":[[["Object"]]],"props":[{"name":"embed","description":"An embed to be added/edited","optional":true,"type":[[["Object"]]]},{"name":"code","description":"Language for optional codeblock formatting to apply","optional":true,"type":[[["string"]],[["boolean"]]]}],"meta":{"line":368,"file":"Message.js","path":"src/structures"}},{"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":[[["function"]]],"meta":{"line":9,"file":"MessageCollector.js","path":"src/structures"}},{"name":"CollectorOptions","description":"An object containing options used to configure a MessageCollector. All properties are optional.","type":[[["Object"]]],"props":[{"name":"time","description":"Duration for the collector in milliseconds","optional":true,"type":[[["number"]]]},{"name":"max","description":"Maximum number of messages to handle","optional":true,"type":[[["number"]]]},{"name":"maxMatches","description":"Maximum number of successfully filtered messages to obtain","optional":true,"type":[[["number"]]]}],"meta":{"line":22,"file":"MessageCollector.js","path":"src/structures"}},{"name":"RoleData","description":"The data for a role","type":[[["Object"]]],"props":[{"name":"name","description":"The name of the role","optional":true,"type":[[["string"]]]},{"name":"color","description":"The color of the role, either a hex string or a base 10 number","optional":true,"type":[[["number"]],[["string"]]]},{"name":"hoist","description":"Whether or not the role should be hoisted","optional":true,"type":[[["boolean"]]]},{"name":"position","description":"The position of the role","optional":true,"type":[[["number"]]]},{"name":"permissions","description":"The permissions of the role","optional":true,"type":[[["Array","<"],["string",">"]]]},{"name":"mentionable","description":"Whether or not the role should be mentionable","optional":true,"type":[[["boolean"]]]}],"meta":{"line":179,"file":"Role.js","path":"src/structures"}},{"name":"WebhookMessageOptions","description":"Options that can be passed into sendMessage, sendTTSMessage, sendFile, sendCode","type":[[["Object"]]],"props":[{"name":"tts","description":"Whether or not the message should be spoken aloud","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"disableEveryone","description":"Whether or not @everyone and @here\nshould be replaced with plain-text","optional":true,"default":"this.options.disableEveryone","type":[[["boolean"]]]}],"meta":{"line":69,"file":"Webhook.js","path":"src/structures"}},{"name":"ClientOptions","description":"Options for a Client.","type":[[["Object"]]],"props":[{"name":"apiRequestMethod","description":"'sequential' or 'burst'. Sequential executes all requests in\nthe order they are triggered, whereas burst runs multiple at a time, and doesn't guarantee a particular order.","optional":true,"default":"'sequential'","type":[[["string"]]]},{"name":"shardId","description":"The ID of this shard","optional":true,"default":0,"type":[[["number"]]]},{"name":"shardCount","description":"The number of shards","optional":true,"default":0,"type":[[["number"]]]},{"name":"messageCacheMaxSize","description":"Maximum number of messages to cache per channel\n(-1 or Infinity for unlimited - don't do this without message sweeping, otherwise memory usage will climb\nindefinitely)","optional":true,"default":200,"type":[[["number"]]]},{"name":"messageCacheLifetime","description":"How long until a message should be uncached by the message sweeping\n(in seconds, 0 for forever)","optional":true,"default":0,"type":[[["number"]]]},{"name":"messageSweepInterval","description":"How frequently to remove messages from the cache that are older than\nthe message cache lifetime (in seconds, 0 for never)","optional":true,"default":0,"type":[[["number"]]]},{"name":"fetchAllMembers","description":"Whether to cache all guild members and users upon startup, as well as\nupon joining a guild","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"disableEveryone","description":"Default value for MessageOptions.disableEveryone","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"sync","description":"Whether to periodically sync guilds (for userbots)","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"restWsBridgeTimeout","description":"Maximum time permitted between REST responses and their\ncorresponding websocket events","optional":true,"default":5000,"type":[[["number"]]]},{"name":"restTimeOffset","description":"The extra time in millseconds to wait before continuing to make REST\nrequests (higher values will reduce rate-limiting errors on bad connections)","optional":true,"default":500,"type":[[["number"]]]},{"name":"disabledEvents","description":"An array of disabled websocket events. Events in this array will not be\nprocessed, potentially resulting in performance improvements for larger bots. Only disable events you are\n100% certain you don't need, as many are important, but not obviously so. The safest one to disable with the\nmost impact is typically `TYPING_START`.","optional":true,"type":[[["Array","<"],["WSEventType",">"]]]},{"name":"ws","description":"Options for the websocket","optional":true,"type":[[["WebsocketOptions"]]]}],"meta":{"line":3,"file":"Constants.js","path":"src/util"}},{"name":"WebsocketOptions","description":"Websocket options. These are left as snake_case to match the API.","type":[[["Object"]]],"props":[{"name":"large_threshold","description":"Number of members in a guild to be considered large","optional":true,"default":250,"type":[[["number"]]]},{"name":"compress","description":"Whether to compress data sent on the connection.\nDefaults to `false` for browsers.","optional":true,"default":true,"type":[[["boolean"]]]}],"meta":{"line":45,"file":"Constants.js","path":"src/util"}},{"name":"WSEventType","description":"The type of a websocket message event, e.g. `MESSAGE_CREATE`. Here are the available events:\n- READY\n- GUILD_SYNC\n- GUILD_CREATE\n- GUILD_DELETE\n- GUILD_UPDATE\n- GUILD_MEMBER_ADD\n- GUILD_MEMBER_REMOVE\n- GUILD_MEMBER_UPDATE\n- GUILD_MEMBERS_CHUNK\n- GUILD_ROLE_CREATE\n- GUILD_ROLE_DELETE\n- GUILD_ROLE_UPDATE\n- GUILD_BAN_ADD\n- GUILD_BAN_REMOVE\n- CHANNEL_CREATE\n- CHANNEL_DELETE\n- CHANNEL_UPDATE\n- CHANNEL_PINS_UPDATE\n- MESSAGE_CREATE\n- MESSAGE_DELETE\n- MESSAGE_UPDATE\n- MESSAGE_DELETE_BULK\n- MESSAGE_REACTION_ADD\n- MESSAGE_REACTION_REMOVE\n- MESSAGE_REACTION_REMOVE_ALL\n- USER_UPDATE\n- USER_NOTE_UPDATE\n- PRESENCE_UPDATE\n- VOICE_STATE_UPDATE\n- TYPING_START\n- VOICE_SERVER_UPDATE\n- RELATIONSHIP_ADD\n- RELATIONSHIP_REMOVE","type":[[["string"]]],"meta":{"line":243,"file":"Constants.js","path":"src/util"}}],"externals":[{"name":"CloseEvent","see":["{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}"],"meta":{"line":232,"file":"WebSocketManager.js","path":"src/client/websocket"}}]}