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

1 line
476 KiB
JSON

{"meta":{"generator":"0.8.0","format":19,"date":1520110581482},"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/discordjs/discord.js\"><img src=\"https://travis-ci.org/discordjs/discord.js.svg\" alt=\"Build status\" /></a>\n <a href=\"https://david-dm.org/discordjs/discord.js\"><img src=\"https://img.shields.io/david/discordjs/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 v11.3 documentation.\nThe v11.3 release contains backports of many features and bug fixes from the in-development v12, such as categories and animated emoji support.\n\nv12 is still very much a work-in-progress, as we're aiming to make it the best it can possibly be before releasing.\nIf you are fond of living life on the bleeding-edge, check out the master branch.\n\n## About\ndiscord.js is a powerful [node.js](https://nodejs.org) 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- 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, as they're all optional.\n\nWithout voice support: `npm install discord.js` \nWith voice support ([node-opus](https://www.npmjs.com/package/node-opus)): `npm install discord.js node-opus` \nWith voice support ([opusscript](https://www.npmjs.com/package/opusscript)): `npm install discord.js opusscript`\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- [bufferutil](https://www.npmjs.com/package/bufferutil) to greatly speed up the WebSocket when *not* using uws (`npm install bufferutil`)\n- [erlpack](https://github.com/hammerandchisel/erlpack) for significantly faster WebSocket data (de)serialisation (`npm install hammerandchisel/erlpack`)\n- One of the following packages can be installed for faster voice packet encryption and decryption:\n - [sodium](https://www.npmjs.com/package/sodium) (`npm install sodium`)\n - [libsodium.js](https://www.npmjs.com/package/libsodium-wrappers) (`npm install libsodium-wrappers`)\n- [uws](https://www.npmjs.com/package/uws) for a much faster WebSocket connection (`npm install uws`)\n\n## Example usage\n```js\nconst Discord = require('discord.js');\nconst client = new Discord.Client();\n\nclient.on('ready', () => {\n console.log(`Logged in as ${client.user.tag}!`);\n});\n\nclient.on('message', msg => {\n if (msg.content === 'ping') {\n msg.reply('pong');\n }\n});\n\nclient.login('token');\n```\n\n## Links\n* [Website](https://discord.js.org/) ([source](https://github.com/discordjs/website))\n* [Documentation](https://discord.js.org/#/docs)\n* [Guide](https://discordjs.guide/) ([source](https://github.com/discordjs/guide))\n* [Discord.js Discord server](https://discord.gg/bRCvFy9)\n* [Discord API Discord server](https://discord.gg/discord-api)\n* [GitHub](https://github.com/discordjs/discord.js)\n* [NPM](https://www.npmjs.com/package/discord.js)\n* [Related libraries](https://discordapi.com/unofficial/libs.html)\n\n### Extensions\n* [RPC](https://www.npmjs.com/package/discord-rpc) ([source](https://github.com/discordjs/RPC))\n\n## Contributing\nBefore creating an issue, please ensure that it hasn't already been reported/suggested, and double-check the\n[documentation](https://discord.js.org/#/docs). \nSee [the contribution guide](https://github.com/discordjs/discord.js/blob/master/.github/CONTRIBUTING.md) if you'd like to submit a PR.\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 11.3.0\nv11.3.0 backports many new features and bug fixes from the in-development v12.\nSee [the changelog](https://github.com/discordjs/discord.js/releases/tag/11.3.0) for a full list of changes, including information about deprecations.\n\n# Version 11.2.0\nv11.2.0 fixes a lot of bugs we encountered along the 11.1.0 release, as well as support for new features such as Message Attachments and UserGuildSettings.\nSee [the changelog](https://github.com/discordjs/discord.js/releases/tag/11.2.0) for a full list of changes, including information about deprecations.\n\n# Version 11.1.0\nv11.1.0 features improved voice and gateway stability, as well as support for new features such as audit logs and searching for messages.\nSee [the changelog](https://github.com/discordjs/discord.js/releases/tag/11.1.0) for a full list of changes, including\ninformation about deprecations.\n\n# Version 11\nVersion 11 contains loads of new and improved features, optimisations, and bug fixes.\nSee [the changelog](https://github.com/discordjs/discord.js/releases/tag/11.0.0) for a full list of changes.\n\n## Significant additions\n* Message Reactions and Embeds (rich text)\n* Support for uws and erlpack for better performance\n* OAuthApplication support\n* Web distributions\n\n## Breaking changes\n### Client.login() no longer supports logging in with email + password\nLogging in with an email and password has always been heavily discouraged since the advent of proper token support, but in v11 we have made the decision to completely remove the functionality, since Hammer & Chisel have [officially stated](https://github.com/hammerandchisel/discord-api-docs/issues/69#issuecomment-223886862) it simply shouldn't be done.\n\nUser accounts can still log in with tokens just like bot accounts. To obtain the token for a user account, you can log in to Discord with that account, and use Ctrl + Shift + I to open the developer tools. In the console tab, evaluating `localStorage.token` will give you the token for that account.\n\n### ClientUser.setEmail()/setPassword() now require the current password, as well as setUsername() on user accounts\nSince you can no longer log in with email and password, you must provide the current account password to the `setEmail()`, `setPassword()`, and `setUsername()` methods for user accounts (self-bots).\n\n### Removed TextBasedChannel.sendTTSMessage()\nThis method was deemed to be an entirely pointless shortcut that virtually nobody even used.\nThe same results can be achieved by passing options to `send()` or `sendMessage()`.\n\nExample:\n```js\nchannel.send('Hi there', { tts: true });\n```\n\n### Using Collection.find()/exists() with IDs will throw an error\nThis is simply to help prevent a common mistake that is made frequently.\nTo find something or check its existence using an ID, you should use `.get()` and `.has()` which are part of the [ES6 Map class](https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Map), which Collection is an extension of.\n\n# 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"}}},"topics":{"name":"Topics","files":{"voice":{"name":"Voice","type":"md","content":"# Introduction to Voice\nVoice in discord.js can be used for many things, such as music bots, recording or relaying audio.\n\nIn discord.js, you can use voice by connecting to a `VoiceChannel` to obtain a `VoiceConnection`, where you can start streaming and receiving audio.\n\nTo get started, make sure you have:\n* ffmpeg - `npm install ffmpeg-binaries`\n* an opus encoder, choose one from below:\n * `npm install opusscript`\n * `npm install node-opus`\n* a good network connection\n\n## Joining a voice channel\nThe example below reacts to a message and joins the sender's voice channel, catching any errors. This is important\nas it allows us to obtain a `VoiceConnection` that we can start to stream audio with.\n\n```js\nconst Discord = require('discord.js');\nconst client = new Discord.Client();\n\nclient.login('token here');\n\nclient.on('message', message => {\n // Voice only works in guilds, if the message does not come from a guild,\n // we ignore it\n if (!message.guild) return;\n\n if (message.content === '/join') {\n // Only try to join the sender's voice channel if they are in one themselves\n if (message.member.voiceChannel) {\n message.member.voiceChannel.join()\n .then(connection => { // Connection is an instance of VoiceConnection\n message.reply('I have successfully connected to the channel!');\n })\n .catch(console.log);\n } else {\n message.reply('You need to join a voice channel first!');\n }\n }\n});\n```\n\n## Streaming to a Voice Channel\nIn the previous example, we looked at how to join a voice channel in order to obtain a `VoiceConnection`. Now that we\nhave obtained a voice connection, we can start streaming audio to it. The following example shows how to stream an mp3\nfile:\n\n**Playing a file:**\n```js\n// To play a file, we need to give an absolute path to it\nconst dispatcher = connection.playFile('C:/Users/Discord/Desktop/myfile.mp3');\n```\n\nYour file doesn't have to be just an mp3; ffmpeg can convert videos and audios of many formats.\n\nThe `dispatcher` variable is an instance of a `StreamDispatcher`, which manages streaming a specific resource to a voice\nchannel. We can do many things with the dispatcher, such as finding out when the stream ends or changing the volume:\n\n```js\ndispatcher.on('end', () => {\n // The song has finished\n});\n\ndispatcher.on('error', e => {\n // Catch any errors that may arise\n console.log(e);\n});\n\ndispatcher.setVolume(0.5); // Set the volume to 50%\ndispatcher.setVolume(1); // Set the volume back to 100%\n\nconsole.log(dispatcher.time); // The time in milliseconds that the stream dispatcher has been playing for\n\ndispatcher.pause(); // Pause the stream\ndispatcher.resume(); // Carry on playing\n\ndispatcher.end(); // End the dispatcher, emits 'end' event\n```\n\nIf you have an existing [ReadableStream](https://nodejs.org/api/stream.html#stream_readable_streams),\nthis can also be used:\n\n**Playing a ReadableStream:**\n```js\nconnection.playStream(myReadableStream);\n\n// If you don't want to use absolute paths, you can use\n// fs.createReadStream to circumvent it\n\nconst fs = require('fs');\nconst stream = fs.createReadStream('./test.mp3');\nconnection.playStream(stream);\n```\n\nIt's important to note that creating a readable stream to a file is less efficient than simply using `connection.playFile()`.\n\n**Playing anything else:**\n\nFor anything else, such as a URL to a file, you can use `connection.playArbitraryInput()`. You should consult the [ffmpeg protocol documentation](https://ffmpeg.org/ffmpeg-protocols.html) to see what you can use this for.\n\n```js\n// Play an mp3 from a URL\nconnection.playArbitraryInput('http://mysite.com/sound.mp3');\n```\n\nAgain, playing a file from a URL like this is more performant than creating a ReadableStream to the file.\n\n## Advanced Topics\nsoon:tm:\n","path":"docs/topics/voice.md"},"web":{"name":"Web builds","type":"md","content":"# Web builds\nIn addition to your usual Node applications, discord.js has special distributions available that are capable of running in web browsers.\nThis is useful for client-side web apps that need to interact with the Discord API.\n[Webpack 3](https://webpack.js.org/) is used to build these.\n\n## Usage\nYou can obtain your desired version of discord.js' web build from the [webpack branch](https://github.com/discordjs/discord.js/tree/webpack) of the GitHub repository.\nThere is a file for each branch and version of the library, and the ones ending in `.min.js` are minified to substantially reduce the size of the source code.\n\nInclude the file on the page just as you would any other JS library, like so:\n```html\n<script type=\"text/javascript\" src=\"discord.VERSION.min.js\"></script>\n```\n\nRather than importing discord.js with `require('discord.js')`, the entire `Discord` object is available as a global (on the `window`) object.\nThe usage of the API isn't any different from using it in Node.js.\n\n## Restrictions\n- Any voice-related functionality is unavailable, as there is currently no audio encoding/decoding capabilities without external native libraries,\n which web browsers do not support.\n- The ShardingManager cannot be used, since it relies on being able to spawn child processes for shards.\n- None of the optional packages are usable, since they're native libraries.\n\n## Example\n```html\n<script type=\"text/javascript\" src=\"discord.11.3.1.min.js\"></script>\n<script type=\"text/javascript\">\n const client = new Discord.Client();\n\n client.on('message', msg => {\n const guildTag = msg.channel.type === 'text' ? `[${msg.guild.name}]` : '[DM]';\n const channelTag = msg.channel.type === 'text' ? `[#${msg.channel.name}]` : '';\n console.log(`${guildTag}${channelTag} ${msg.author.tag}: ${msg.content}`);\n });\n\n client.login('some crazy token');\n</script>\n```\n","path":"docs/topics/web.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\nconst client = new Discord.Client();\n\n// The token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// The ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted\nclient.on('ready', () => {\n console.log('I am ready!');\n});\n\n// Create an event listener for messages\nclient.on('message', message => {\n // If the message is \"ping\"\n if (message.content === 'ping') {\n // Send \"pong\" to the same channel\n message.channel.send('pong');\n }\n});\n\n// Log our bot in\nclient.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\nconst client = new Discord.Client();\n\n// The token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// The ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted\nclient.on('ready', () => {\n console.log('I am ready!');\n});\n\n// Create an event listener for messages\nclient.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\nclient.login(token);\n","path":"docs/examples/avatars.js"},"greeting":{"name":"Server greeting","type":"js","content":"/*\n A bot that welcomes new guild members when they join\n*/\n\n// Import the discord.js module\nconst Discord = require('discord.js');\n\n// Create an instance of a Discord client\nconst client = new Discord.Client();\n\n// The token of your bot - https://discordapp.com/developers/applications/me\nconst token = 'your bot token here';\n\n// The ready event is vital, it means that your bot will only start reacting to information\n// from Discord _after_ ready is emitted\nclient.on('ready', () => {\n console.log('I am ready!');\n});\n\n// Create an event listener for new guild members\nclient.on('guildMemberAdd', member => {\n // Send the message to a designated channel on a server:\n const channel = member.guild.channels.find('name', 'member-log');\n // Do nothing if the channel wasn't found on this server\n if (!channel) return;\n // Send the message, mentioning the member\n channel.send(`Welcome to the server, ${member}`);\n});\n\n// Log our bot in\nclient.login(token);\n","path":"docs/examples/greeting.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.send('I am now alive!');\n","path":"docs/examples/webhook.js"}}}},"classes":[{"name":"Client","description":"The main hub for interacting with the Discord API, and the starting point for any 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":36,"file":"Client.js","path":"src/client"}},{"name":"rest","description":"The REST manager of the client","access":"private","type":[[["RESTManager"]]],"meta":{"line":44,"file":"Client.js","path":"src/client"}},{"name":"dataManager","description":"The data manager of the client","access":"private","type":[[["ClientDataManager"]]],"meta":{"line":51,"file":"Client.js","path":"src/client"}},{"name":"manager","description":"The manager of the client","access":"private","type":[[["ClientManager"]]],"meta":{"line":58,"file":"Client.js","path":"src/client"}},{"name":"ws","description":"The WebSocket manager of the client","access":"private","type":[[["WebSocketManager"]]],"meta":{"line":65,"file":"Client.js","path":"src/client"}},{"name":"resolver","description":"The data resolver of the client","access":"private","type":[[["ClientDataResolver"]]],"meta":{"line":72,"file":"Client.js","path":"src/client"}},{"name":"actions","description":"The action manager of the client","access":"private","type":[[["ActionsManager"]]],"meta":{"line":79,"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":86,"file":"Client.js","path":"src/client"}},{"name":"shard","description":"The shard helpers for the client\n(only if the process was spawned as a child, such as from a {@link ShardingManager})","nullable":true,"type":[[["ShardClientUtil"]]],"meta":{"line":93,"file":"Client.js","path":"src/client"}},{"name":"users","description":"All of the {@link User} objects that have been cached at any point, mapped by their IDs","type":[[["Collection","<"],["Snowflake",", "],["User",">"]]],"meta":{"line":99,"file":"Client.js","path":"src/client"}},{"name":"guilds","description":"All of the guilds the client is currently handling, mapped by their IDs -\nas long as sharding isn't being used, this will be *every* guild the bot is a member of","type":[[["Collection","<"],["Snowflake",", "],["Guild",">"]]],"meta":{"line":106,"file":"Client.js","path":"src/client"}},{"name":"channels","description":"All of the {@link Channel}s that the client is currently handling, mapped by their IDs -\nas long as sharding isn't being used, this will be *every* channel in *every* guild, and all DM channels","type":[[["Collection","<"],["Snowflake",", "],["Channel",">"]]],"meta":{"line":113,"file":"Client.js","path":"src/client"}},{"name":"presences","description":"Presences that have been received for the client user's friends, mapped by user IDs\n<warn>This is only filled when using a user account.</warn>","type":[[["Collection","<"],["Snowflake",", "],["Presence",">"]]],"meta":{"line":120,"file":"Client.js","path":"src/client"}},{"name":"token","description":"Authorization token for the logged in user/bot\n<warn>This should be kept private at all times.</warn>","nullable":true,"type":[[["string"]]],"meta":{"line":129,"file":"Client.js","path":"src/client"}},{"name":"user","description":"User that the client is logged in as","nullable":true,"type":[[["ClientUser"]]],"meta":{"line":138,"file":"Client.js","path":"src/client"}},{"name":"readyAt","description":"Time at which the client was last regarded as being in the `READY` state\n(each time the client disconnects and successfully reconnects, this will be overwritten)","nullable":true,"type":[[["Date"]]],"meta":{"line":145,"file":"Client.js","path":"src/client"}},{"name":"broadcasts","description":"Active voice broadcasts that have been created","type":[[["Array","<"],["VoiceBroadcast",">"]]],"meta":{"line":151,"file":"Client.js","path":"src/client"}},{"name":"pings","description":"Previous heartbeat pings of the websocket (most recent first, limited to three elements)","type":[[["Array","<"],["number",">"]]],"meta":{"line":157,"file":"Client.js","path":"src/client"}},{"name":"_timeouts","description":"Timeouts set by {@link Client#setTimeout} that are still active","access":"private","type":[[["Set","<"],["Timeout",">"]]],"meta":{"line":164,"file":"Client.js","path":"src/client"}},{"name":"_intervals","description":"Intervals set by {@link Client#setInterval} that are still active","access":"private","type":[[["Set","<"],["Timeout",">"]]],"meta":{"line":171,"file":"Client.js","path":"src/client"}},{"name":"_pingTimestamp","description":"Timestamp of the latest ping's start time","access":"private","type":[[["number"]]],"meta":{"line":183,"file":"Client.js","path":"src/client"}},{"name":"status","description":"Current status of the client's connection to Discord","readonly":true,"nullable":true,"type":[[["number"]]],"meta":{"line":192,"file":"Client.js","path":"src/client"}},{"name":"uptime","description":"How long it has been since the client last entered the `READY` state in milliseconds","readonly":true,"nullable":true,"type":[[["number"]]],"meta":{"line":201,"file":"Client.js","path":"src/client"}},{"name":"ping","description":"Average heartbeat ping of the websocket, obtained by averaging the {@link Client#pings} property","readonly":true,"type":[[["number"]]],"meta":{"line":210,"file":"Client.js","path":"src/client"}},{"name":"voiceConnections","description":"All active voice connections that have been established, mapped by guild ID","readonly":true,"type":[[["Collection","<"],["Snowflake",", "],["VoiceConnection",">"]]],"meta":{"line":219,"file":"Client.js","path":"src/client"}},{"name":"emojis","description":"All custom emojis that the client has access to, mapped by their IDs","readonly":true,"type":[[["Collection","<"],["Snowflake",", "],["Emoji",">"]]],"meta":{"line":229,"file":"Client.js","path":"src/client"}},{"name":"readyTimestamp","description":"Timestamp of the time the client was last `READY` at","readonly":true,"nullable":true,"type":[[["number"]]],"meta":{"line":242,"file":"Client.js","path":"src/client"}},{"name":"browser","description":"Whether the client is in a browser environment","readonly":true,"type":[[["boolean"]]],"meta":{"line":251,"file":"Client.js","path":"src/client"}}],"methods":[{"name":"createVoiceBroadcast","description":"Creates a voice broadcast.","returns":[[["VoiceBroadcast"]]],"meta":{"line":259,"file":"Client.js","path":"src/client"}},{"name":"login","description":"Logs the client in, establishing a websocket connection to Discord.\n<info>Both bot and regular user accounts are supported, but it is highly recommended to use a bot account whenever\npossible. User accounts are subject to harsher ratelimits and other restrictions that don't apply to bot accounts.\nBot accounts also have access to many features that user accounts cannot utilise. User accounts that are found to\nbe abusing/overusing the API will be banned, locking you out of Discord entirely.</info>","examples":["client.login('my token');"],"params":[{"name":"token","description":"Token of the account to log in with","type":[[["string"]]]}],"returns":{"types":[[["Promise","<"],["string",">"]]],"description":"Token of the account used"},"meta":{"line":276,"file":"Client.js","path":"src/client"}},{"name":"destroy","description":"Logs out, terminates the connection to Discord, and destroys the client.","returns":[[["Promise"]]],"meta":{"line":284,"file":"Client.js","path":"src/client"}},{"name":"syncGuilds","description":"Requests a sync of guild data with Discord.\n<info>This can be done automatically every 30 seconds by enabling {@link ClientOptions#sync}.</info>\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","<"],["Snowflake",", "],["Guild",">"]]]}],"meta":{"line":298,"file":"Client.js","path":"src/client"}},{"name":"fetchUser","description":"Obtains a user from Discord, or the user cache if it's already available.\n<warn>This is only available when using a bot account.</warn>","params":[{"name":"id","description":"ID of the user","type":[[["Snowflake"]]]},{"name":"cache","description":"Whether to cache the new user object if it isn't already","optional":true,"default":true,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["User",">"]]],"meta":{"line":313,"file":"Client.js","path":"src/client"}},{"name":"fetchInvite","description":"Obtains an invite from Discord.","params":[{"name":"invite","description":"Invite code or URL","type":[[["InviteResolvable"]]]}],"returns":[[["Promise","<"],["Invite",">"]]],"meta":{"line":323,"file":"Client.js","path":"src/client"}},{"name":"fetchWebhook","description":"Obtains a webhook from Discord.","params":[{"name":"id","description":"ID of the webhook","type":[[["Snowflake"]]]},{"name":"token","description":"Token for the webhook","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Webhook",">"]]],"meta":{"line":334,"file":"Client.js","path":"src/client"}},{"name":"fetchVoiceRegions","description":"Obtains the available voice regions from Discord.","returns":[[["Collection","<"],["string",", "],["VoiceRegion",">"]]],"meta":{"line":342,"file":"Client.js","path":"src/client"}},{"name":"sweepMessages","description":"Sweeps all text-based 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 {@link ClientOptions#messageCacheLifetime}","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":354,"file":"Client.js","path":"src/client"}},{"name":"fetchApplication","description":"Obtains the OAuth Application of the bot from Discord.","params":[{"name":"id","description":"ID of application to fetch","optional":true,"default":"'@me'","type":[[["Snowflake"]]]}],"returns":[[["Promise","<"],["OAuth2Application",">"]]],"meta":{"line":387,"file":"Client.js","path":"src/client"}},{"name":"generateInvite","description":"Generates a link that can be used to invite the bot to a guild.\n<warn>This is only available when using a bot account.</warn>","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":"Permissions to request","optional":true,"type":[[["Array","<"],["PermissionResolvable",">"]],[["number"]]]}],"returns":[[["Promise","<"],["string",">"]]],"meta":{"line":402,"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":420,"file":"Client.js","path":"src/client"}},{"name":"clearTimeout","description":"Clears a timeout.","params":[{"name":"timeout","description":"Timeout to cancel","type":[[["Timeout"]]]}],"meta":{"line":433,"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":445,"file":"Client.js","path":"src/client"}},{"name":"clearInterval","description":"Clears an interval.","params":[{"name":"interval","description":"Interval to cancel","type":[[["Timeout"]]]}],"meta":{"line":455,"file":"Client.js","path":"src/client"}},{"name":"_pong","description":"Adds a ping to {@link Client#pings}.","access":"private","params":[{"name":"startTime","description":"Starting time of the ping","type":[[["number"]]]}],"meta":{"line":465,"file":"Client.js","path":"src/client"}},{"name":"_setPresence","description":"Adds/updates a friend's presence in {@link Client#presences}.","access":"private","params":[{"name":"id","description":"ID of the user","type":[[["Snowflake"]]]},{"name":"presence","description":"Raw presence object from Discord","type":[[["Object"]]]}],"meta":{"line":477,"file":"Client.js","path":"src/client"}},{"name":"_eval","description":"Calls {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval} on a script\nwith the client as `this`.","access":"private","params":[{"name":"script","description":"Script to eval","type":[[["string"]]]}],"returns":[["*"]],"meta":{"line":492,"file":"Client.js","path":"src/client"}},{"name":"_validateOptions","description":"Validates the client options.","access":"private","params":[{"name":"options","description":"Options to validate","optional":true,"default":"this.options","type":[[["ClientOptions"]]]}],"meta":{"line":501,"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":50,"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":11,"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":11,"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":10,"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":34,"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":20,"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":35,"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":30,"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":30,"file":"MessageReactionRemove.js","path":"src/client/actions"}},{"name":"messageReactionRemoveAll","description":"Emitted whenever all reactions are removed from a message.","params":[{"name":"message","description":"The message the reactions were removed from","type":[[["Message"]]]}],"meta":{"line":19,"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":33,"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":537,"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":543,"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":27,"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",">"]]]},{"name":"guild","description":"The guild related to the member chunk","type":[[["Guild"]]]}],"meta":{"line":26,"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","<"],["Snowflake",", "],["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":56,"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":63,"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":70,"file":"PresenceUpdate.js","path":"src/client/websocket/packets/handlers"}},{"name":"resume","description":"Emitted whenever a WebSocket resumes.","params":[{"name":"replayed","description":"The number of events that were replayed","type":[[["number"]]]}],"meta":{"line":22,"file":"Resumed.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":"clientUserGuildSettingsUpdate","description":"Emitted whenever the client user's settings update.","params":[{"name":"clientUserGuildSettings","description":"The new client user guild settings","type":[[["ClientUserGuildSettings"]]]}],"meta":{"line":15,"file":"UserGuildSettingsUpdate.js","path":"src/client/websocket/packets/handlers"}},{"name":"clientUserSettingsUpdate","description":"Emitted when the client user's settings update.","params":[{"name":"clientUserSettings","description":"The new client user settings","type":[[["ClientUserSettings"]]]}],"meta":{"line":12,"file":"UserSettingsUpdate.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":45,"file":"VoiceStateUpdate.js","path":"src/client/websocket/packets/handlers"}},{"name":"ready","description":"Emitted when the client becomes ready to start working.","meta":{"line":120,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"reconnecting","description":"Emitted whenever the client tries to reconnect to the WebSocket.","meta":{"line":351,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"error","description":"Emitted whenever the client's WebSocket encounters a connection error.","params":[{"name":"error","description":"The encountered error","type":[[["Error"]]]}],"meta":{"line":368,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"disconnect","description":"Emitted when the client's WebSocket disconnects and will no longer attempt to reconnect.","params":[{"name":"event","description":"The WebSocket close event","type":[[["CloseEvent"]]]}],"meta":{"line":394,"file":"WebSocketConnection.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":1136,"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":1157,"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":1180,"file":"Guild.js","path":"src/structures"}}],"meta":{"line":21,"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":44,"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":[[["Snowflake"]]],"nullable":true},"meta":{"line":58,"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":78,"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":97,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveRole","description":"Resolves a RoleResolvable to a Role object.","params":[{"name":"guild","description":"The guild that this role is part of","type":[[["GuildResolvable"]]]},{"name":"role","description":"The role resolvable to resolve","type":[[["RoleResolvable"]]]}],"returns":{"types":[[["Role"]]],"nullable":true},"meta":{"line":118,"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":140,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveChannelID","description":"Resolves a ChannelResolvable to a channel ID.","params":[{"name":"channel","description":"The channel resolvable to resolve","type":[[["ChannelResolvable"]]]}],"returns":{"types":[[["Snowflake"]]],"nullable":true},"meta":{"line":153,"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":173,"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":193,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveImage","description":"Resolves a Base64Resolvable, a string, or a BufferResolvable to a Base 64 image.","params":[{"name":"image","description":"The image to be resolved","type":[[["BufferResolvable"]],[["Base64Resolvable"]]]}],"returns":[[["Promise","<?"],["string",">"]]],"meta":{"line":205,"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":225,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveFile","description":"Resolves a BufferResolvable to a Buffer.","params":[{"name":"resource","description":"The buffer or stream resolvable to resolve","type":[[["BufferResolvable"]],[["Stream"]]]}],"returns":[[["Promise","<"],["Buffer",">"]]],"meta":{"line":249,"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":{"types":[[["string"]]],"nullable":true},"meta":{"line":300,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveColor","params":[{"name":"color","description":"Color to resolve","type":[[["ColorResolvable"]]]}],"returns":{"types":[[["number"]]],"description":"A color"},"meta":{"line":373,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"resolveColor","description":"Resolves a ColorResolvable into a color number.","scope":"static","params":[{"name":"color","description":"Color to resolve","type":[[["ColorResolvable"]]]}],"returns":{"types":[[["number"]]],"description":"A color"},"meta":{"line":351,"file":"ClientDataResolver.js","path":"src/client"}}],"meta":{"line":21,"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":14,"file":"ClientManager.js","path":"src/client"}},{"name":"heartbeatInterval","description":"The heartbeat interval","nullable":true,"type":[[["number"]]],"meta":{"line":20,"file":"ClientManager.js","path":"src/client"}},{"name":"status","description":"The status of the client","type":[[["number"]]],"meta":{"line":27,"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":37,"file":"ClientManager.js","path":"src/client"}}],"meta":{"line":8,"file":"ClientManager.js","path":"src/client"}},{"name":"DiscordAPIError","description":"Represents an error from the Discord API.","extends":["Error"],"props":[{"name":"path","description":"The path of the request relative to the HTTP endpoint","type":[[["string"]]],"meta":{"line":16,"file":"DiscordAPIError.js","path":"src/client/rest"}},{"name":"code","description":"HTTP error code returned by Discord","type":[[["number"]]],"meta":{"line":22,"file":"DiscordAPIError.js","path":"src/client/rest"}}],"methods":[{"name":"flattenErrors","description":"Flattens an errors object returned from the API into an array.","scope":"static","access":"private","params":[{"name":"obj","description":"Discord errors object","type":[[["Object"]]]},{"name":"key","description":"Used internally to determine key names of nested fields","optional":true,"type":[[["string"]]]}],"returns":[[["Array","<"],["string",">"]]],"meta":{"line":32,"file":"DiscordAPIError.js","path":"src/client/rest"}}],"meta":{"line":5,"file":"DiscordAPIError.js","path":"src/client/rest"}},{"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","readonly":true,"type":[[["boolean"]]],"meta":{"line":28,"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":40,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}},{"name":"handle","description":"Attempts to get this RequestHandler to process its current queue.","meta":{"line":47,"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":"endpoint","description":"The endpoint that this handler is handling","type":[[["string"]]],"meta":{"line":23,"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":30,"file":"Sequential.js","path":"src/client/rest/RequestHandlers"}},{"name":"busy","description":"Whether the queue is being processed or not","type":[[["boolean"]]],"meta":{"line":36,"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","readonly":true,"type":[[["boolean"]]],"meta":{"line":28,"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":49,"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":40,"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":47,"file":"RequestHandler.js","path":"src/client/rest/RequestHandlers"}}],"meta":{"line":11,"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":14,"file":"ClientVoiceManager.js","path":"src/client/voice"}},{"name":"connections","description":"A collection mapping connection IDs to the Connection objects","type":[[["Collection","<"],["Snowflake",", "],["VoiceConnection",">"]]],"meta":{"line":20,"file":"ClientVoiceManager.js","path":"src/client/voice"}}],"methods":[{"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":44,"file":"ClientVoiceManager.js","path":"src/client/voice"}}],"meta":{"line":8,"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```","implements":["VolumeInterface"],"props":[{"name":"player","description":"The Audio Player that controls this dispatcher","type":[[["AudioPlayer"]]],"meta":{"line":28,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"stream","description":"The stream that the dispatcher plays","type":[[["ReadableStream"]],[["VoiceBroadcast"]]],"meta":{"line":33,"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":"destroyed","description":"Whether this dispatcher has been destroyed","type":[[["boolean"]]],"meta":{"line":50,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"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","readonly":true,"type":[[["number"]]],"meta":{"line":61,"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":78,"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":87,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}}],"methods":[{"name":"pause","description":"Stops sending voice packets to the voice connection (stream may still progress however).","meta":{"line":94,"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":99,"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":106,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"setBitrate","description":"Set the bitrate of the current Opus encoder.","params":[{"name":"bitrate","description":"New bitrate, in kbps\nIf set to 'auto', the voice channel's bitrate will be used","type":[[["number"]]]}],"meta":{"line":128,"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":114,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"debug","description":"Emitted whenever the dispatcher has debug information.","params":[{"name":"info","description":"The debug info","type":[[["string"]]]}],"meta":{"line":140,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"start","description":"Emitted once the dispatcher starts streaming.","meta":{"line":274,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"end","description":"Emitted once the dispatcher ends.","params":[{"name":"reason","description":"The reason the dispatcher ended","optional":true,"type":[[["string"]]]}],"meta":{"line":295,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"error","description":"Emitted if the dispatcher encounters an error.","params":[{"name":"error","description":"The error message","type":[[["string"]]]}],"meta":{"line":305,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}}],"meta":{"line":21,"file":"StreamDispatcher.js","path":"src/client/voice/dispatcher"}},{"name":"BaseOpus","description":"The base opus encoding engine.","access":"private","construct":{"name":"BaseOpus","params":[{"name":"options","description":"The options to apply to the Opus engine","optional":true,"type":[[["Object"]]]},{"name":"options.bitrate","description":"The desired bitrate (kbps)","optional":true,"default":48,"type":[[["number"]]]},{"name":"options.fec","description":"Whether to enable forward error correction","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"options.plp","description":"The expected packet loss percentage","optional":true,"default":0,"type":[[["number"]]]}]},"props":[{"name":"bitrate","description":"The desired bitrate (kbps)","type":[[["number"]]],"meta":{"line":26,"file":"BaseOpusEngine.js","path":"src/client/voice/opus"}},{"name":"options","description":"Miscellaneous Opus options","type":[[["Object"]]],"meta":{"line":32,"file":"BaseOpusEngine.js","path":"src/client/voice/opus"}}],"meta":{"line":5,"file":"BaseOpusEngine.js","path":"src/client/voice/opus"}},{"name":"AudioPlayer","description":"An Audio Player for a Voice Connection.","extends":["EventEmitter"],"access":"private","props":[{"name":"voiceConnection","description":"The voice connection that the player serves","type":[[["VoiceConnection"]]],"meta":{"line":27,"file":"AudioPlayer.js","path":"src/client/voice/player"}},{"name":"prism","description":"The prism transcoder that the player uses","type":[[["Prism"]]],"meta":{"line":32,"file":"AudioPlayer.js","path":"src/client/voice/player"}},{"name":"transcoder","description":"The current transcoder","readonly":true,"nullable":true,"type":[[["Object"]]],"meta":{"line":50,"file":"AudioPlayer.js","path":"src/client/voice/player"}},{"name":"dispatcher","description":"The current dispatcher","readonly":true,"nullable":true,"type":[[["StreamDispatcher"]]],"meta":{"line":59,"file":"AudioPlayer.js","path":"src/client/voice/player"}}],"methods":[{"name":"setBitrate","description":"Set the bitrate of the current Opus encoder.","params":[{"name":"value","description":"New bitrate, in kbps\nIf set to 'auto', the voice channel's bitrate will be used","type":[[["number"]]]}],"meta":{"line":87,"file":"AudioPlayer.js","path":"src/client/voice/player"}}],"meta":{"line":20,"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()\n .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":36,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"}},{"name":"voiceConnection","description":"The VoiceConnection that instantiated this","type":[[["VoiceConnection"]]],"meta":{"line":42,"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":68,"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":77,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"}},{"name":"stoppedSpeaking","description":"Invoked when a user stops speaking.","access":"private","params":[{"name":"user","description":"The user that stopped speaking","type":[[["User"]]]}],"meta":{"line":99,"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":124,"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":139,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"}}],"events":[{"name":"warn","description":"Emitted whenever a voice packet experiences a problem.","params":[{"name":"reason","description":"The reason for the warning. If it happened because the voice packet could not be\ndecrypted, this would be `decrypt`. If it happened because the voice packet could not be decoded into\nPCM, this would be `decode`","type":[[["string"]]]},{"name":"message","description":"The warning message","type":[[["string"]]]}],"meta":{"line":152,"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":184,"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":199,"file":"VoiceReceiver.js","path":"src/client/voice/receiver"}}],"meta":{"line":20,"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":"VolumeInterface","description":"An interface class for volume transformation.","extends":["EventEmitter"],"props":[{"name":"volume","description":"The current volume of the broadcast","readonly":true,"type":[[["number"]]],"meta":{"line":18,"file":"VolumeInterface.js","path":"src/client/voice/util"}},{"name":"volumeDecibels","description":"The current volume of the broadcast in decibels","readonly":true,"type":[[["number"]]],"meta":{"line":27,"file":"VolumeInterface.js","path":"src/client/voice/util"}},{"name":"volumeLogarithmic","description":"The current volume of the broadcast from a logarithmic scale","readonly":true,"type":[[["number"]]],"meta":{"line":36,"file":"VolumeInterface.js","path":"src/client/voice/util"}}],"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":58,"file":"VolumeInterface.js","path":"src/client/voice/util"}},{"name":"setVolumeDecibels","description":"Set the volume in decibels.","params":[{"name":"db","description":"The decibels","type":[[["number"]]]}],"meta":{"line":73,"file":"VolumeInterface.js","path":"src/client/voice/util"}},{"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":81,"file":"VolumeInterface.js","path":"src/client/voice/util"}}],"events":[{"name":"volumeChange","description":"Emitted when the volume of this interface changes.","params":[{"name":"oldVolume","description":"The old volume of this interface","type":[[["number"]]]},{"name":"newVolume","description":"The new volume of this interface","type":[[["number"]]]}],"meta":{"line":59,"file":"VolumeInterface.js","path":"src/client/voice/util"}}],"meta":{"line":7,"file":"VolumeInterface.js","path":"src/client/voice/util"}},{"name":"VoiceBroadcast","description":"A voice broadcast can be played across multiple voice connections for improved shared-stream efficiency.\n\nExample usage:\n```js\nconst broadcast = client.createVoiceBroadcast();\nbroadcast.playFile('./music.mp3');\n// Play \"music.mp3\" in all voice connections that the client is in\nfor (const connection of client.voiceConnections.values()) {\n connection.playBroadcast(broadcast);\n}\n```","implements":["VolumeInterface"],"props":[{"name":"client","description":"The client that created the broadcast","type":[[["Client"]]],"meta":{"line":35,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"prism","description":"The audio transcoder that this broadcast uses","type":[[["Prism"]]],"meta":{"line":42,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"currentTranscoder","description":"The current audio transcoder that is being used","type":[[["Object"]]],"meta":{"line":47,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"dispatchers","description":"An array of subscribed dispatchers","readonly":true,"type":[[["Array","<"],["StreamDispatcher",">"]]],"meta":{"line":57,"file":"VoiceBroadcast.js","path":"src/client/voice"}}],"methods":[{"name":"playStream","description":"Plays any audio stream across the broadcast.","examples":["// Play streams using ytdl-core\nconst ytdl = require('ytdl-core');\nconst streamOptions = { seek: 0, volume: 1 };\nconst broadcast = client.createVoiceBroadcast();\n\nvoiceChannel.join()\n .then(connection => {\n const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', { filter : 'audioonly' });\n broadcast.playStream(stream);\n const dispatcher = connection.playBroadcast(broadcast);\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":[[["VoiceBroadcast"]]],"meta":{"line":146,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"playFile","description":"Play the given file in the voice connection.","examples":["// Play files natively\nconst broadcast = client.createVoiceBroadcast();\n\nvoiceChannel.join()\n .then(connection => {\n broadcast.playFile('C:/Users/Discord/Desktop/music.mp3');\n const dispatcher = connection.playBroadcast(broadcast);\n })\n .catch(console.error);"],"params":[{"name":"file","description":"The absolute path to the file","type":[[["string"]]]},{"name":"options","description":"Options for playing the stream","optional":true,"type":[[["StreamOptions"]]]}],"returns":[[["StreamDispatcher"]]],"meta":{"line":167,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM.","params":[{"name":"stream","description":"The audio stream to play","type":[[["ReadableStream"]]]},{"name":"options","description":"Options for playing the stream","optional":true,"type":[[["StreamOptions"]]]}],"returns":[[["VoiceBroadcast"]]],"meta":{"line":212,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"playOpusStream","description":"Plays an Opus encoded stream.\n<warn>Note that inline volume is not compatible with this method.</warn>","params":[{"name":"stream","description":"The Opus audio stream to play","type":[[["ReadableStream"]]]},{"name":"options","description":"Options for playing the stream","optional":true,"type":[[["StreamOptions"]]]}],"returns":[[["StreamDispatcher"]]],"meta":{"line":227,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"playArbitraryInput","description":"Play an arbitrary input that can be [handled by ffmpeg](https://ffmpeg.org/ffmpeg-protocols.html#Description)","params":[{"name":"input","description":"The arbitrary input","type":[[["string"]]]},{"name":"options","description":"Options for playing the stream","optional":true,"type":[[["StreamOptions"]]]}],"returns":[[["VoiceBroadcast"]]],"meta":{"line":239,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"pause","description":"Pauses the entire broadcast - all dispatchers also pause.","meta":{"line":248,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"resume","description":"Resumes the entire broadcast - all dispatchers also resume.","meta":{"line":260,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"end","description":"Stop the current stream from playing without unsubscribing dispatchers.","meta":{"line":349,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"destroy","description":"End the current broadcast, all subscribed dispatchers will also end.","meta":{"line":356,"file":"VoiceBroadcast.js","path":"src/client/voice"}}],"events":[{"name":"unsubscribe","description":"Emitted whenever a stream dispatcher unsubscribes from the broadcast.","params":[{"name":"dispatcher","description":"The unsubscribed dispatcher","type":[[["StreamDispatcher"]]]}],"meta":{"line":76,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"subscribe","description":"Emitted whenever a stream dispatcher subscribes to the broadcast.","params":[{"name":"dispatcher","description":"The subscribed dispatcher","type":[[["StreamDispatcher"]]]}],"meta":{"line":110,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"error","description":"Emitted whenever an error occurs.","params":[{"name":"error","description":"The error that occurred","type":[[["Error"]]]}],"meta":{"line":179,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"warn","description":"Emitted whenever the VoiceBroadcast has any warnings.","params":[{"name":"warning","description":"The warning that was raised","type":[[["string"]],[["Error"]]]}],"meta":{"line":186,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"end","description":"Emitted once the broadcast (the audio stream) ends.","meta":{"line":193,"file":"VoiceBroadcast.js","path":"src/client/voice"}}],"meta":{"line":28,"file":"VoiceBroadcast.js","path":"src/client/voice"}},{"name":"VoiceConnection","description":"Represents a connection to a guild's voice server.\n```js\n// Obtained using:\nvoiceChannel.join()\n .then(connection => {\n\n });\n```","extends":["EventEmitter"],"props":[{"name":"voiceManager","description":"The voice manager that instantiated this connection","type":[[["ClientVoiceManager"]]],"meta":{"line":29,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"client","description":"The client that instantiated this connection","type":[[["Client"]]],"meta":{"line":35,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"prism","description":"The audio transcoder for this connection","type":[[["Prism"]]],"meta":{"line":46,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"channel","description":"The voice channel this connection is currently serving","type":[[["VoiceChannel"]]],"meta":{"line":52,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"status","description":"The current status of the voice connection","type":[[["number"]]],"meta":{"line":58,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"speaking","description":"Whether we're currently transmitting audio","type":[[["boolean"]]],"meta":{"line":64,"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":70,"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":77,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"player","description":"The audio player for this voice connection","type":[[["AudioPlayer"]]],"meta":{"line":83,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"ssrcMap","description":"Map SSRC to speaking values","access":"private","type":[[["Map","<"],["number",", "],["boolean",">"]]],"meta":{"line":108,"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":115,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"dispatcher","description":"The current stream dispatcher (if any)","readonly":true,"nullable":true,"type":[[["StreamDispatcher"]]],"meta":{"line":125,"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":134,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"sendVoiceStateUpdate","description":"Sends a request to the main gateway to join a voice channel.","params":[{"name":"options","description":"The options to provide","optional":true,"type":[[["Object"]]]}],"meta":{"line":153,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"setTokenAndEndpoint","description":"Set the token and endpoint required to connect to the voice servers.","params":[{"name":"token","description":"The voice token","type":[[["string"]]]},{"name":"endpoint","description":"The voice endpoint","type":[[["string"]]]}],"returns":[[["void"]]],"meta":{"line":173,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"setSessionID","description":"Sets the Session ID for the connection.","params":[{"name":"sessionID","description":"The voice session ID","type":[[["string"]]]}],"meta":{"line":204,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"checkAuthenticated","description":"Checks whether the voice connection is authenticated.","access":"private","meta":{"line":228,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"authenticateFailed","description":"Invoked when we fail to initiate a voice connection.","access":"private","params":[{"name":"reason","description":"The reason for failure","type":[[["string"]]]}],"meta":{"line":248,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"updateChannel","description":"Move to a different voice channel in the same guild.","access":"private","params":[{"name":"channel","description":"The channel to move to","type":[[["VoiceChannel"]]]}],"meta":{"line":268,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"authenticate","description":"Attempts to authenticate to the voice server.","access":"private","meta":{"line":277,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"reconnect","description":"Attempts to reconnect to the voice server (typically after a region change).","access":"private","params":[{"name":"token","description":"The voice token","type":[[["string"]]]},{"name":"endpoint","description":"The voice endpoint","type":[[["string"]]]}],"meta":{"line":289,"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":305,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"cleanup","description":"Cleans up after disconnect.","access":"private","meta":{"line":324,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"connect","description":"Connect the voice connection.","access":"private","meta":{"line":344,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"onReady","description":"Invoked when the voice websocket is ready.","access":"private","params":[{"name":"data","description":"The received data","type":[[["Object"]]]}],"meta":{"line":370,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"onSessionDescription","description":"Invoked when a session description is received.","access":"private","params":[{"name":"mode","description":"The encryption mode","type":[[["string"]]]},{"name":"secret","description":"The secret key","type":[[["string"]]]}],"meta":{"line":392,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"onSpeaking","description":"Invoked when a speaking event is received.","access":"private","params":[{"name":"data","description":"The received data","type":[[["Object"]]]}],"meta":{"line":410,"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 absolute path to the file","type":[[["string"]]]},{"name":"options","description":"Options for playing the stream","optional":true,"type":[[["StreamOptions"]]]}],"returns":[[["StreamDispatcher"]]],"meta":{"line":452,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"playArbitraryInput","description":"Play an arbitrary input that can be [handled by ffmpeg](https://ffmpeg.org/ffmpeg-protocols.html#Description)","params":[{"name":"input","description":"the arbitrary input","type":[[["string"]]]},{"name":"options","description":"Options for playing the stream","optional":true,"type":[[["StreamOptions"]]]}],"returns":[[["StreamDispatcher"]]],"meta":{"line":462,"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":482,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"playConvertedStream","description":"Plays a stream of 16-bit signed stereo PCM.","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":492,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"playOpusStream","description":"Plays an Opus encoded stream.\n<warn>Note that inline volume is not compatible with this method.</warn>","params":[{"name":"stream","description":"The Opus audio stream to play","type":[[["ReadableStream"]]]},{"name":"options","description":"Options for playing the stream","optional":true,"type":[[["StreamOptions"]]]}],"returns":[[["StreamDispatcher"]]],"meta":{"line":503,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"playBroadcast","description":"Plays a voice broadcast.","examples":["// Play a broadcast\nconst broadcast = client\n .createVoiceBroadcast()\n .playFile('./test.mp3');\nconst dispatcher = voiceConnection.playBroadcast(broadcast);"],"params":[{"name":"broadcast","description":"The broadcast to play","type":[[["VoiceBroadcast"]]]},{"name":"options","description":"Options for playing the stream","optional":true,"type":[[["StreamOptions"]]]}],"returns":[[["StreamDispatcher"]]],"meta":{"line":519,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"createReceiver","description":"Creates a VoiceReceiver so you can start listening to voice data.\nIt's recommended to only create one of these.","returns":[[["VoiceReceiver"]]],"meta":{"line":528,"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":86,"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":95,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"newSession","description":"Emitted when a new session ID is received.","meta":{"line":215,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"authenticated","description":"Emitted when we successfully initiate a voice connection.","meta":{"line":234,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"failed","description":"Emitted when we fail to initiate a voice connection.","params":[{"name":"error","description":"The encountered error","type":[[["Error"]]]}],"meta":{"line":251,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"reconnecting","description":"Emitted when the voice connection is reconnecting (typically after a region change).","meta":{"line":294,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"disconnect","description":"Emitted when the voice connection disconnects.","meta":{"line":313,"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":375,"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":397,"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":419,"file":"VoiceConnection.js","path":"src/client/voice"}}],"meta":{"line":21,"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":"client","description":"The client of this voice WebSocket","type":[[["Client"]]],"meta":{"line":25,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"voiceConnection","description":"The Voice Connection that this WebSocket serves","type":[[["VoiceConnection"]]],"meta":{"line":31,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"attempts","description":"How many connection attempts have been made","type":[[["number"]]],"meta":{"line":37,"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":77,"file":"VoiceWebSocket.js","path":"src/client/voice"}}],"methods":[{"name":"reset","description":"Resets the current WebSocket.","meta":{"line":52,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"connect","description":"Starts connecting to the Voice WebSocket Server.","meta":{"line":63,"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":89,"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":105,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"onOpen","description":"Called whenever the WebSocket opens.","meta":{"line":117,"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":136,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"onClose","description":"Called whenever the connection to the WebSocket server is lost.","meta":{"line":147,"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":155,"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":163,"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":206,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"clearHeartbeat","description":"Clears a heartbeat interval, if one exists.","meta":{"line":226,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"sendHeartbeat","description":"Sends a heartbeat packet.","meta":{"line":238,"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":167,"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":175,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"speaking","description":"Emitted whenever a speaking packet is received.","params":[{"name":"data","type":[[["Object"]]]}],"meta":{"line":184,"file":"VoiceWebSocket.js","path":"src/client/voice"}},{"name":"unknownPacket","description":"Emitted when an unhandled packet is received.","params":[{"name":"packet","type":[[["Object"]]]}],"meta":{"line":192,"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":212,"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":"ID of the webhook","type":[[["Snowflake"]]]},{"name":"token","description":"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":"_timeouts","description":"Timeouts set by {@link WebhookClient#setTimeout} that are still active","access":"private","type":[[["Set","<"],["Timeout",">"]]],"meta":{"line":49,"file":"WebhookClient.js","path":"src/client"}},{"name":"_intervals","description":"Intervals set by {@link WebhookClient#setInterval} that are still active","access":"private","type":[[["Set","<"],["Timeout",">"]]],"meta":{"line":56,"file":"WebhookClient.js","path":"src/client"}},{"name":"client","description":"The client that instantiated the webhook","readonly":true,"type":[[["Client"]]],"meta":{"line":12,"file":"Webhook.js","path":"src/structures"}},{"name":"name","description":"The name of the webhook","type":[[["string"]]],"meta":{"line":32,"file":"Webhook.js","path":"src/structures"}},{"name":"token","description":"The token for the webhook","type":[[["string"]]],"meta":{"line":38,"file":"Webhook.js","path":"src/structures"}},{"name":"avatar","description":"The avatar for the webhook","nullable":true,"type":[[["string"]]],"meta":{"line":44,"file":"Webhook.js","path":"src/structures"}},{"name":"id","description":"The ID of the webhook","type":[[["Snowflake"]]],"meta":{"line":50,"file":"Webhook.js","path":"src/structures"}},{"name":"guildID","description":"The guild the webhook belongs to","type":[[["Snowflake"]]],"meta":{"line":56,"file":"Webhook.js","path":"src/structures"}},{"name":"channelID","description":"The channel the webhook belongs to","type":[[["Snowflake"]]],"meta":{"line":62,"file":"Webhook.js","path":"src/structures"}},{"name":"owner","description":"The owner of the webhook","type":[[["User"]],[["Object"]]],"meta":{"line":69,"file":"Webhook.js","path":"src/structures"}}],"methods":[{"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":66,"file":"WebhookClient.js","path":"src/client"}},{"name":"clearTimeout","description":"Clears a timeout.","params":[{"name":"timeout","description":"Timeout to cancel","type":[[["Timeout"]]]}],"meta":{"line":79,"file":"WebhookClient.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":91,"file":"WebhookClient.js","path":"src/client"}},{"name":"clearInterval","description":"Clears an interval.","params":[{"name":"interval","description":"Interval to cancel","type":[[["Timeout"]]]}],"meta":{"line":101,"file":"WebhookClient.js","path":"src/client"}},{"name":"destroy","description":"Destroys the client.","meta":{"line":110,"file":"WebhookClient.js","path":"src/client"}},{"name":"send","description":"Send a message with this webhook.","inherits":"Webhook#send","inherited":true,"examples":["// Send a basic message\nwebhook.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);","// Send a remote file\nwebhook.send({\n files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048']\n})\n .then(console.log)\n .catch(console.error);","// Send a local file\nwebhook.send({\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);","// Send an embed with a local image inside\nwebhook.send('This is an embed', {\n embeds: [{\n thumbnail: {\n url: 'attachment://file.jpg'\n }\n }],\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"content","description":"The content to send","type":[[["StringResolvable"]]]},{"name":"options","description":"The options to provide,\ncan also be just a RichEmbed or Attachment","optional":true,"type":[[["WebhookMessageOptions"]],[["Attachment"]],[["RichEmbed"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">|"],["Object","|"],["Array","<"],["Object",">)>"]]],"meta":{"line":137,"file":"Webhook.js","path":"src/structures"}},{"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);"],"deprecated":true,"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":224,"file":"Webhook.js","path":"src/structures"}},{"name":"sendFile","description":"Send a file with this webhook.","inherits":"Webhook#sendFile","inherited":true,"deprecated":true,"params":[{"name":"attachment","description":"The file to send","type":[[["BufferResolvable"]]]},{"name":"name","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":237,"file":"Webhook.js","path":"src/structures"}},{"name":"sendCode","description":"Send a code block with this webhook.","inherits":"Webhook#sendCode","inherited":true,"deprecated":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":249,"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":270,"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","optional":true,"type":[[["BufferResolvable"]]]}],"returns":[[["Promise","<"],["Webhook",">"]]],"meta":{"line":280,"file":"Webhook.js","path":"src/structures"}},{"name":"delete","description":"Delete the webhook.","inherits":"Webhook#delete","inherited":true,"params":[{"name":"reason","description":"Reason for deleting the webhook","optional":true,"type":[[["string"]]]}],"returns":[[["Promise"]]],"meta":{"line":294,"file":"Webhook.js","path":"src/structures"}}],"meta":{"line":11,"file":"WebhookClient.js","path":"src/client"}},{"name":"WebSocketConnection","description":"Abstracts a WebSocket connection with decoding/encoding for the Discord gateway.","access":"private","construct":{"name":"WebSocketConnection","params":[{"name":"manager","description":"The WebSocket manager","type":[[["WebSocketManager"]]]},{"name":"gateway","description":"The WebSocket gateway to connect to","type":[[["string"]]]}]},"props":[{"name":"manager","description":"The WebSocket Manager of this connection","type":[[["WebSocketManager"]]],"meta":{"line":40,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"client","description":"The client this belongs to","type":[[["Client"]]],"meta":{"line":46,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"ws","description":"The WebSocket connection itself","type":[[["WebSocket"]]],"meta":{"line":52,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"sequence","description":"The current sequence of the WebSocket","type":[[["number"]]],"meta":{"line":58,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"status","description":"The current status of the client","type":[[["number"]]],"meta":{"line":64,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"packetManager","description":"The Packet Manager of the connection","type":[[["WebSocketPacketManager"]]],"meta":{"line":70,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"lastPingTimestamp","description":"The last time a ping was sent (a timestamp)","type":[[["number"]]],"meta":{"line":76,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"ratelimit","description":"Contains the rate limit queue and metadata","type":[[["Object"]]],"meta":{"line":82,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"disabledEvents","description":"Events that are disabled (will not be processed)","type":[[["Object"]]],"meta":{"line":95,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"closeSequence","description":"The sequence on WebSocket close","type":[[["number"]]],"meta":{"line":101,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"expectingClose","description":"Whether or not the WebSocket is expecting to be closed","type":[[["boolean"]]],"meta":{"line":107,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"ENCODING","description":"Encoding the WebSocket connections will use.","scope":"static","type":[[["string"]]],"meta":{"line":502,"file":"WebSocketConnection.js","path":"src/client/websocket"}}],"methods":[{"name":"triggerReady","description":"Causes the client to be marked as ready and emits the ready event.","returns":[[["void"]]],"meta":{"line":115,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"checkIfReady","description":"Checks whether the client is ready to be marked as ready.","returns":[[["void"]]],"meta":{"line":133,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"debug","description":"Emits a debug message.","params":[{"name":"message","description":"Debug message","type":[[["string"]]]}],"returns":[[["void"]]],"meta":{"line":160,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"unpack","description":"Attempts to serialise data from the WebSocket.","params":[{"name":"data","description":"Data to unpack","type":[[["string"]],[["Object"]]]}],"returns":[[["Object"]]],"meta":{"line":170,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"pack","description":"Packs an object ready to be sent.","params":[{"name":"data","description":"Data to pack","type":[[["Object"]]]}],"returns":[[["string"]],[["Buffer"]]],"meta":{"line":184,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"processQueue","description":"Processes the current WebSocket queue.","meta":{"line":191,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"_send","description":"Sends data, bypassing the queue.","params":[{"name":"data","description":"Packet to send","type":[[["Object"]]]}],"returns":[[["void"]]],"meta":{"line":213,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"send","description":"Adds data to the queue to be sent.","params":[{"name":"data","description":"Packet to send","type":[[["Object"]]]}],"returns":[[["void"]]],"meta":{"line":226,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"connect","description":"Creates a connection to a gateway.","params":[{"name":"gateway","description":"The gateway to connect to","type":[[["string"]]]},{"name":"after","description":"How long to wait before connecting","optional":true,"default":0,"type":[[["number"]]]},{"name":"force","description":"Whether or not to force a new connection even if one already exists","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["boolean"]]],"meta":{"line":242,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"destroy","description":"Destroys the connection.","returns":[[["boolean"]]],"meta":{"line":268,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"onMessage","description":"Called whenever a message is received.","params":[{"name":"event","description":"Event received","type":[[["Event"]]]}],"returns":[[["boolean"]]],"meta":{"line":288,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"setSequence","description":"Sets the current sequence of the connection.","params":[{"name":"s","description":"New sequence","type":[[["number"]]]}],"meta":{"line":302,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"onPacket","description":"Called whenever a packet is received.","params":[{"name":"packet","description":"Received packet","type":[[["Object"]]]}],"returns":[[["boolean"]]],"meta":{"line":311,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"onOpen","description":"Called whenever a connection is opened to the gateway.","params":[{"name":"event","description":"Received open event","type":[[["Event"]]]}],"meta":{"line":340,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"reconnect","description":"Causes a reconnection to the gateway.","meta":{"line":349,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"onError","description":"Called whenever an error occurs with the WebSocket.","params":[{"name":"error","description":"The error that occurred","type":[[["Error"]]]}],"meta":{"line":363,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"onClose","description":"Called whenever a connection to the gateway is closed.","params":[{"name":"event","description":"Close event that was received","type":[[["CloseEvent"]]]}],"meta":{"line":385,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"ackHeartbeat","description":"Acknowledges a heartbeat.","meta":{"line":412,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"heartbeat","description":"Sends a heartbeat or sets an interval for sending heartbeats.","params":[{"name":"time","description":"If -1, clears the interval, any other number sets an interval\nIf no value is given, a heartbeat will be sent instantly","optional":true,"type":[[["number"]]]}],"meta":{"line":422,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"identify","description":"Identifies the client on a connection.","params":[{"name":"after","description":"How long to wait before identifying","optional":true,"type":[[["number"]]]}],"returns":[[["void"]]],"meta":{"line":448,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"identifyNew","description":"Identifies as a new connection on the gateway.","returns":[[["void"]]],"meta":{"line":457,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"identifyResume","description":"Resumes a session on the gateway.","returns":[[["void"]]],"meta":{"line":478,"file":"WebSocketConnection.js","path":"src/client/websocket"}}],"meta":{"line":29,"file":"WebSocketConnection.js","path":"src/client/websocket"}},{"name":"WebSocketManager","description":"WebSocket Manager of the client.","access":"private","props":[{"name":"client","description":"The client that instantiated this WebSocketManager","type":[[["Client"]]],"meta":{"line":16,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"connection","description":"The WebSocket connection of this manager","nullable":true,"type":[[["WebSocketConnection"]]],"meta":{"line":22,"file":"WebSocketManager.js","path":"src/client/websocket"}}],"methods":[{"name":"heartbeat","description":"Sends a heartbeat on the available connection.","returns":[[["void"]]],"meta":{"line":29,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"debug","description":"Emits a debug event.","params":[{"name":"message","description":"Debug message","type":[[["string"]]]}],"returns":[[["void"]]],"meta":{"line":39,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"destroy","description":"Destroy the client.","returns":{"types":[[["void"]]],"description":"Whether or not destruction was successful"},"meta":{"line":47,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"send","description":"Send a packet on the available WebSocket.","params":[{"name":"packet","description":"Packet to send","type":[[["Object"]]]}],"returns":[[["void"]]],"meta":{"line":60,"file":"WebSocketManager.js","path":"src/client/websocket"}},{"name":"connect","description":"Connects the client to a gateway.","params":[{"name":"gateway","description":"The gateway to connect to","type":[[["string"]]]}],"returns":[[["boolean"]]],"meta":{"line":73,"file":"WebSocketManager.js","path":"src/client/websocket"}}],"meta":{"line":9,"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":19,"file":"Shard.js","path":"src/sharding"}},{"name":"id","description":"ID of the shard","type":[[["number"]]],"meta":{"line":25,"file":"Shard.js","path":"src/sharding"}},{"name":"env","description":"The environment variables for the shard","type":[[["Object"]]],"meta":{"line":31,"file":"Shard.js","path":"src/sharding"}},{"name":"process","description":"Process of the shard","type":[[["ChildProcess"]]],"meta":{"line":41,"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":58,"file":"Shard.js","path":"src/sharding"}},{"name":"fetchClientValue","description":"Fetches a client property value of the shard.","examples":["shard.fetchClientValue('guilds.size')\n .then(count => {\n console.log(`${count} guilds in shard ${shard.id}`);\n })\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":78,"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":106,"file":"Shard.js","path":"src/sharding"}},{"name":"_handleMessage","description":"Handles an IPC message.","access":"private","params":[{"name":"message","description":"Message received","type":[["*"]]}],"meta":{"line":134,"file":"Shard.js","path":"src/sharding"}}],"meta":{"line":8,"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":"The client of the current shard","type":[[["Client"]]]}]},"props":[{"name":"id","description":"ID of this shard","readonly":true,"type":[[["number"]]],"meta":{"line":20,"file":"ShardClientUtil.js","path":"src/sharding"}},{"name":"count","description":"Total number of shards","readonly":true,"type":[[["number"]]],"meta":{"line":29,"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":38,"file":"ShardClientUtil.js","path":"src/sharding"}},{"name":"fetchClientValues","description":"Fetches a client property value of each shard.","examples":["client.shard.fetchClientValues('guilds.size')\n .then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n })\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":58,"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":79,"file":"ShardClientUtil.js","path":"src/sharding"}},{"name":"_handleMessage","description":"Handles an IPC message.","access":"private","params":[{"name":"message","description":"Message received","type":[["*"]]}],"meta":{"line":100,"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":122,"file":"ShardClientUtil.js","path":"src/sharding"}},{"name":"singleton","description":"Creates/gets the singleton of this class.","scope":"static","params":[{"name":"client","description":"The client to use","type":[[["Client"]]]}],"returns":[[["ShardClientUtil"]]],"meta":{"line":134,"file":"ShardClientUtil.js","path":"src/sharding"}}],"meta":{"line":6,"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":36,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"totalShards","description":"Amount of shards that this manager is going to spawn","type":[[["number"]],[["string"]]],"meta":{"line":46,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"respawn","description":"Whether shards should automatically respawn upon exiting","type":[[["boolean"]]],"meta":{"line":61,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"shardArgs","description":"An array of arguments to pass to shards","type":[[["Array","<"],["string",">"]]],"meta":{"line":67,"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":73,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"shards","description":"A collection of shards that this manager has spawned","type":[[["Collection","<"],["number",", "],["Shard",">"]]],"meta":{"line":79,"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":87,"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":7500,"type":[[["number"]]]}],"returns":[[["Promise","<"],["Collection","<"],["number",", "],["Shard",">>"]]],"meta":{"line":105,"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":126,"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":157,"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":168,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"fetchClientValues","description":"Fetches a client property value of each shard.","examples":["manager.fetchClientValues('guilds.size')\n .then(results => {\n console.log(`${results.reduce((prev, val) => prev + val, 0)} total guilds`);\n })\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":185,"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":155,"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":90,"file":"ShardingManager.js","path":"src/sharding"}}],"meta":{"line":14,"file":"ShardingManager.js","path":"src/sharding"}},{"name":"Attachment","description":"Represents an attachment in a message.","construct":{"name":"Attachment","params":[{"name":"file","description":"The file","type":[[["BufferResolvable"]],[["Stream"]]]},{"name":"name","description":"The name of the file, if any","optional":true,"type":[[["string"]]]}]},"props":[{"name":"name","description":"The name of the file","readonly":true,"nullable":true,"type":[[["string"]]],"meta":{"line":18,"file":"Attachment.js","path":"src/structures"}},{"name":"attachment","description":"The file","readonly":true,"type":[[["BufferResolvable"]],[["Stream"]]],"meta":{"line":27,"file":"Attachment.js","path":"src/structures"}}],"methods":[{"name":"setAttachment","description":"Set the file of this attachment.","params":[{"name":"file","description":"The file","type":[[["BufferResolvable"]],[["Stream"]]]},{"name":"name","description":"The name of the file","type":[[["string"]]]}],"returns":{"types":[[["Attachment"]]],"description":"This attachment"},"meta":{"line":37,"file":"Attachment.js","path":"src/structures"}},{"name":"setFile","description":"Set the file of this attachment.","params":[{"name":"attachment","description":"The file","type":[[["BufferResolvable"]],[["Stream"]]]}],"returns":{"types":[[["Attachment"]]],"description":"This attachment"},"meta":{"line":47,"file":"Attachment.js","path":"src/structures"}},{"name":"setName","description":"Set the name of this attachment.","params":[{"name":"name","description":"The name of the image","type":[[["string"]]]}],"returns":{"types":[[["Attachment"]]],"description":"This attachment"},"meta":{"line":57,"file":"Attachment.js","path":"src/structures"}},{"name":"_attach","description":"Set the file of this attachment.","access":"private","params":[{"name":"file","description":"The file","type":[[["BufferResolvable"]],[["Stream"]]]},{"name":"name","description":"The name of the file","type":[[["string"]]]}],"returns":[[["void"]]],"meta":{"line":69,"file":"Attachment.js","path":"src/structures"}}],"meta":{"line":6,"file":"Attachment.js","path":"src/structures"}},{"name":"CategoryChannel","description":"Represents a guild category channel on Discord.","extends":["GuildChannel"],"props":[{"name":"children","description":"The channels that are part of this category","readonly":true,"nullable":true,"type":[[["Collection","<"],["Snowflake",", "],["GuildChannel",">"]]],"meta":{"line":17,"file":"CategoryChannel.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":"parentID","description":"The ID of the category parent of this channel","nullable":true,"type":[[["Snowflake"]]],"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users","type":[[["Collection","<"],["Snowflake",", "],["PermissionOverwrites",">"]]],"meta":{"line":48,"file":"GuildChannel.js","path":"src/structures"}},{"name":"calculatedPosition","description":"The position of the channel","readonly":true,"type":[[["number"]]],"meta":{"line":61,"file":"GuildChannel.js","path":"src/structures"}},{"name":"parent","description":"The category parent of this channel","readonly":true,"nullable":true,"type":[[["CategoryChannel"]]],"meta":{"line":71,"file":"GuildChannel.js","path":"src/structures"}},{"name":"deletable","description":"Whether the channel is deletable by the client user","readonly":true,"type":[[["boolean"]]],"meta":{"line":378,"file":"GuildChannel.js","path":"src/structures"}},{"name":"muted","description":"Whether the channel is muted\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["boolean"]]],"meta":{"line":389,"file":"GuildChannel.js","path":"src/structures"}},{"name":"messageNotifications","description":"The type of message that should notify you\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["MessageNotificationType"]]],"meta":{"line":404,"file":"GuildChannel.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.","inherits":"GuildChannel#permissionsFor","inherited":true,"params":[{"name":"member","description":"The user that you want to obtain the overall permissions for","type":[[["GuildMemberResolvable"]]]}],"returns":{"types":[[["Permissions"]]],"nullable":true},"meta":{"line":81,"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(updated => console.log(updated.permissionOverwrites.get(message.author.id)))\n .catch(console.error);"],"params":[{"name":"userOrRole","description":"The user or role to update","type":[[["Role"]],[["Snowflake"]],[["UserResolvable"]]]},{"name":"options","description":"The configuration for the update","type":[[["PermissionOverwriteOptions"]]]},{"name":"reason","description":"Reason for creating/editing this overwrite","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":167,"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(console.log)\n .catch(console.error);"],"params":[{"name":"data","description":"The new data for the channel","type":[[["ChannelData"]]]},{"name":"reason","description":"Reason for editing this channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":230,"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"]]]},{"name":"reason","description":"Reason for changing the guild channel's name","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":245,"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"]]]},{"name":"relative","description":"Move the position relative to its current value","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":260,"file":"GuildChannel.js","path":"src/structures"}},{"name":"setParent","description":"Set a new parent for the guild channel.","inherits":"GuildChannel#setParent","inherited":true,"examples":["// Sets the parent of a channel\nchannel.setParent('174674066072928256')\n .then(updated => console.log(`Set the category of ${updated.name} to ${updated.parent.name}`))\n .catch(console.error);"],"params":[{"name":"parent","description":"The new parent for the guild channel","type":[[["CategoryChannel"]],[["SnowFlake"]]]},{"name":"reason","description":"Reason for changing the guild channel's parent","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":275,"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(updated => console.log(`Channel's new topic is ${updated.topic}`))\n .catch(console.error);"],"params":[{"name":"topic","description":"The new topic for the guild channel","type":[[["string"]]]},{"name":"reason","description":"Reason for changing the guild channel's topic","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":291,"file":"GuildChannel.js","path":"src/structures"}},{"name":"createInvite","description":"Create an invite to this guild channel.\n<warn>This is only available when using a bot account.</warn>","inherits":"GuildChannel#createInvite","inherited":true,"examples":["// Create an invite to a channel\nchannel.createInvite()\n .then(invite => console.log(`Created an invite with a code of ${invite.code}`))\n .catch(console.error);"],"params":[{"name":"options","description":"Options for the invite","optional":true,"default":"{}","type":[[["Object"]]]},{"name":"options.temporary","description":"Whether members that joined via the invite should be automatically\nkicked after 24 hours if they have not yet received a role","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"options.maxAge","description":"How long the invite should last (in seconds, 0 for forever)","optional":true,"default":86400,"type":[[["number"]]]},{"name":"options.maxUses","description":"Maximum number of uses","optional":true,"default":0,"type":[[["number"]]]},{"name":"options.unique","description":"Create a unique invite, or use an existing one with similar settings","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"reason","description":"Reason for creating the invite","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Invite",">"]]],"meta":{"line":312,"file":"GuildChannel.js","path":"src/structures"}},{"name":"clone","description":"Clone this channel.","inherits":"GuildChannel#clone","inherited":true,"examples":["// Clone a channel\nchannel.clone(undefined, true, false, 'Needed a clone')\n .then(clone => console.log(`Cloned ${channel.name} to make a channel called ${clone.name}`))\n .catch(console.error);"],"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"]]]},{"name":"withTopic","description":"Whether to clone the channel with this channel's topic","optional":true,"default":true,"type":[[["boolean"]]]},{"name":"reason","description":"Reason for cloning this channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":329,"file":"GuildChannel.js","path":"src/structures"}},{"name":"delete","description":"Deletes this channel.","inherits":"GuildChannel#delete","inherited":true,"examples":["// Delete the channel\nchannel.delete('Making room for new channels')\n .then(deleted => console.log(`Deleted ${deleted.name} to make room for new channels`))\n .catch(console.error);"],"params":[{"name":"reason","description":"Reason for deleting this channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":344,"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":354,"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":["// Logs: Hello from <#123456789012345678>\nconsole.log(`Hello from ${channel}`);","// Logs: Hello from <#123456789012345678>\nconsole.log('Hello from ' + channel);"],"returns":[[["string"]]],"meta":{"line":423,"file":"GuildChannel.js","path":"src/structures"}}],"meta":{"line":7,"file":"CategoryChannel.js","path":"src/structures"}},{"name":"Channel","description":"Represents any channel on Discord.","props":[{"name":"client","description":"The client that instantiated the Channel","readonly":true,"type":[[["Client"]]],"meta":{"line":8,"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\n* `category` - a guild category channel","type":[[["string"]]],"meta":{"line":25,"file":"Channel.js","path":"src/structures"}},{"name":"id","description":"The unique ID of the channel","type":[[["Snowflake"]]],"meta":{"line":35,"file":"Channel.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the channel was created at","readonly":true,"type":[[["number"]]],"meta":{"line":43,"file":"Channel.js","path":"src/structures"}},{"name":"createdAt","description":"The time the channel was created","readonly":true,"type":[[["Date"]]],"meta":{"line":52,"file":"Channel.js","path":"src/structures"}}],"methods":[{"name":"delete","description":"Deletes the channel.","examples":["// Delete the channel\nchannel.delete()\n .then(console.log)\n .catch(console.error);"],"returns":[[["Promise","<"],["Channel",">"]]],"meta":{"line":65,"file":"Channel.js","path":"src/structures"}}],"meta":{"line":6,"file":"Channel.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":20,"file":"ClientUser.js","path":"src/structures"}},{"name":"email","description":"The email of this account\n<warn>This is only filled when using a user account.</warn>","nullable":true,"type":[[["string"]]],"meta":{"line":27,"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","<"],["Snowflake",", "],["User",">"]]],"meta":{"line":36,"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","<"],["Snowflake",", "],["User",">"]]],"meta":{"line":43,"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","<"],["Snowflake",", "],["string",">"]]],"meta":{"line":50,"file":"ClientUser.js","path":"src/structures"}},{"name":"premium","description":"If the user has Discord premium (nitro)\n<warn>This is only filled when using a user account.</warn>","nullable":true,"type":[[["boolean"]]],"meta":{"line":57,"file":"ClientUser.js","path":"src/structures"}},{"name":"mfaEnabled","description":"If the user has MFA enabled on their account\n<warn>This is only filled when using a user account.</warn>","nullable":true,"type":[[["boolean"]]],"meta":{"line":64,"file":"ClientUser.js","path":"src/structures"}},{"name":"mobile","description":"If the user has ever used a mobile device on Discord\n<warn>This is only filled when using a user account.</warn>","nullable":true,"type":[[["boolean"]]],"meta":{"line":71,"file":"ClientUser.js","path":"src/structures"}},{"name":"settings","description":"Various settings for this user\n<warn>This is only filled when using a user account.</warn>","nullable":true,"type":[[["ClientUserSettings"]]],"meta":{"line":78,"file":"ClientUser.js","path":"src/structures"}},{"name":"guildSettings","description":"All of the user's guild settings\n<warn>This is only filled when using a user account</warn>","type":[[["Collection","<"],["Snowflake",", "],["ClientUserGuildSettings",">"]]],"meta":{"line":85,"file":"ClientUser.js","path":"src/structures"}},{"name":"client","description":"The client that created the instance of the user","readonly":true,"type":[[["Client"]]],"meta":{"line":12,"file":"User.js","path":"src/structures"}},{"name":"id","description":"The ID of the user","type":[[["Snowflake"]]],"meta":{"line":28,"file":"User.js","path":"src/structures"}},{"name":"username","description":"The username of the user","type":[[["string"]]],"meta":{"line":34,"file":"User.js","path":"src/structures"}},{"name":"discriminator","description":"A discriminator based on username for the user","type":[[["string"]]],"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"name":"avatar","description":"The ID of the user's avatar","type":[[["string"]]],"meta":{"line":46,"file":"User.js","path":"src/structures"}},{"name":"bot","description":"Whether or not the user is a bot","type":[[["boolean"]]],"meta":{"line":52,"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":[[["Snowflake"]]],"meta":{"line":58,"file":"User.js","path":"src/structures"}},{"name":"lastMessage","description":"The Message object of the last message sent by the user, if one was sent","nullable":true,"type":[[["Message"]]],"meta":{"line":64,"file":"User.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the user was created at","readonly":true,"type":[[["number"]]],"meta":{"line":79,"file":"User.js","path":"src/structures"}},{"name":"createdAt","description":"The time the user was created","readonly":true,"type":[[["Date"]]],"meta":{"line":88,"file":"User.js","path":"src/structures"}},{"name":"presence","description":"The presence of this user","readonly":true,"type":[[["Presence"]]],"meta":{"line":97,"file":"User.js","path":"src/structures"}},{"name":"avatarURL","description":"A link to the user's avatar","readonly":true,"nullable":true,"type":[[["string"]]],"meta":{"line":110,"file":"User.js","path":"src/structures"}},{"name":"defaultAvatarURL","description":"A link to the user's default avatar","readonly":true,"type":[[["string"]]],"meta":{"line":120,"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":131,"file":"User.js","path":"src/structures"}},{"name":"tag","description":"The Discord \"tag\" for this user","readonly":true,"type":[[["string"]]],"meta":{"line":140,"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":150,"file":"User.js","path":"src/structures"}},{"name":"dmChannel","description":"The DM between the client's user and this user","readonly":true,"nullable":true,"type":[[["DMChannel"]]],"meta":{"line":189,"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":110,"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":126,"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":142,"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":156,"file":"ClientUser.js","path":"src/structures"}},{"name":"setPresence","description":"Sets the full presence of the client user.","examples":["// Set the client user's presence\nclient.user.setPresence({ game: { name: 'with discord.js' }, status: 'idle' })\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"data","description":"Data for the presence","type":[[["PresenceData"]]]}],"returns":[[["Promise","<"],["ClientUser",">"]]],"meta":{"line":183,"file":"ClientUser.js","path":"src/structures"}},{"name":"setStatus","description":"Sets the status of the client user.","examples":["// Set the client user's status\nclient.user.setStatus('idle')\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"status","description":"Status to change to","type":[[["PresenceStatus"]]]}],"returns":[[["Promise","<"],["ClientUser",">"]]],"meta":{"line":255,"file":"ClientUser.js","path":"src/structures"}},{"name":"setGame","description":"Sets the game the client user is playing.","deprecated":true,"params":[{"name":"game","description":"Game being played","nullable":true,"type":[[["string"]]]},{"name":"streamingURL","description":"Twitch stream URL","optional":true,"nullable":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["ClientUser",">"]]],"meta":{"line":266,"file":"ClientUser.js","path":"src/structures"}},{"name":"setActivity","description":"Sets the activity the client user is playing.","examples":["client.user.setActivity('YouTube', { type: 'WATCHING' })\n .then(presence => console.log(`Activity set to ${presence.game ? presence.game.name : 'none'}`))\n .catch(console.error);"],"params":[{"name":"name","description":"Activity being played","nullable":true,"type":[[["string"]]]},{"name":"options","description":"Options for setting the activity","optional":true,"type":[[["Object"]]]},{"name":"options.url","description":"Twitch stream URL","optional":true,"type":[[["string"]]]},{"name":"options.type","description":"Type of the activity","optional":true,"type":[[["ActivityType"]],[["number"]]]}],"returns":[[["Promise","<"],["Presence",">"]]],"meta":{"line":288,"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":300,"file":"ClientUser.js","path":"src/structures"}},{"name":"fetchMentions","description":"Fetches messages that mentioned the client's user.","examples":["// Fetch mentions\nclient.user.fetchMentions()\n .then(console.log)\n .catch(console.error);","// Fetch mentions from a guild\nclient.user.fetchMentions({\n guild: '222078108977594368'\n})\n .then(console.log)\n .catch(console.error);"],"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":[[["GuildResolvable"]]]}],"returns":[[["Promise","<"],["Array","<"],["Message",">>"]]],"meta":{"line":325,"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":335,"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":346,"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","optional":true,"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":359,"file":"ClientUser.js","path":"src/structures"}},{"name":"createGroupDM","description":"Creates a Group DM.","examples":["// Create a Group DM with a token provided from OAuth\nclient.user.createGroupDM([{\n user: '66564597481480192',\n accessToken: token\n}])\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"recipients","description":"The recipients","type":[[["Array","<"],["GroupDMRecipientOptions",">"]]]}],"returns":[[["Promise","<"],["GroupDMChannel",">"]]],"meta":{"line":392,"file":"ClientUser.js","path":"src/structures"}},{"name":"acceptInvite","description":"Accepts an invite to join a guild.\n<warn>This is only available when using a user account.</warn>","params":[{"name":"invite","description":"Invite or code to accept","type":[[["Invite"]],[["string"]]]}],"returns":{"types":[[["Promise","<"],["Guild",">"]]],"description":"Joined guild"},"meta":{"line":406,"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":159,"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":169,"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":179,"file":"User.js","path":"src/structures"}},{"name":"createDM","description":"Creates a DM channel between the client and the user.","inherits":"User#createDM","inherited":true,"returns":[[["Promise","<"],["DMChannel",">"]]],"meta":{"line":197,"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":205,"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":232,"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":241,"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":250,"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":260,"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":270,"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":288,"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 basic message\nchannel.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);","// Send a remote file\nchannel.send({\n files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048']\n})\n .then(console.log)\n .catch(console.error);","// Send a local file\nchannel.send({\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);","// Send an embed with a local image inside\nchannel.send('This is an embed', {\n embed: {\n thumbnail: {\n url: 'attachment://file.jpg'\n }\n },\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message,\ncan also be just a RichEmbed or Attachment","optional":true,"type":[[["MessageOptions"]],[["Attachment"]],[["RichEmbed"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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);"],"deprecated":true,"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":486,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendEmbed","description":"Send an embed to this channel.","inherits":"User#sendEmbed","inherited":true,"implements":["TextBasedChannel#sendEmbed"],"deprecated":true,"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":498,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendFile","description":"Send a file to this channel.","inherits":"User#sendFile","inherited":true,"implements":["TextBasedChannel#sendFile"],"deprecated":true,"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":529,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendCode","description":"Send a code block to this channel.","inherits":"User#sendCode","inherited":true,"implements":["TextBasedChannel#sendCode"],"deprecated":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":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":541,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}}],"meta":{"line":12,"file":"ClientUser.js","path":"src/structures"}},{"name":"ClientUserChannelOverride","description":"A wrapper around the ClientUser's channel overrides.","props":[{"name":"messageNotifications","description":"The type of message that should notify you","type":[[["MessageNotificationType"]]],"meta":{"line":669,"file":"Constants.js","path":"src/util"}},{"name":"muted","description":"Whether the channel is muted","type":[[["boolean"]]],"meta":{"line":676,"file":"Constants.js","path":"src/util"}}],"methods":[{"name":"patch","description":"Patch the data contained in this class with new partial data.","access":"private","params":[{"name":"data","description":"Data to patch this with","type":[[["Object"]]]}],"returns":[[["void"]]],"meta":{"line":17,"file":"ClientUserChannelOverride.js","path":"src/structures"}}],"meta":{"line":6,"file":"ClientUserChannelOverride.js","path":"src/structures"}},{"name":"ClientUserGuildSettings","description":"A wrapper around the ClientUser's guild settings.","props":[{"name":"client","description":"The client that created the instance of the ClientUserGuildSettings","readonly":true,"type":[[["Client"]]],"meta":{"line":10,"file":"ClientUserGuildSettings.js","path":"src/structures"}},{"name":"guildID","description":"The ID of the guild this settings are for","type":[[["Snowflake"]]],"meta":{"line":21,"file":"ClientUserGuildSettings.js","path":"src/structures"}},{"name":"messageNotifications","description":"The type of message that should notify you","type":[[["MessageNotificationType"]]],"meta":{"line":634,"file":"Constants.js","path":"src/util"}},{"name":"mobilePush","description":"Whether to receive mobile push notifications","type":[[["boolean"]]],"meta":{"line":641,"file":"Constants.js","path":"src/util"}},{"name":"muted","description":"Whether the guild is muted","type":[[["boolean"]]],"meta":{"line":647,"file":"Constants.js","path":"src/util"}},{"name":"suppressEveryone","description":"Whether to suppress everyone mention","type":[[["boolean"]]],"meta":{"line":653,"file":"Constants.js","path":"src/util"}},{"name":"channelOverrides","description":"A collection containing all the channel overrides","type":[[["Collection","<"],["ClientUserChannelOverride",">"]]],"meta":{"line":659,"file":"Constants.js","path":"src/util"}}],"methods":[{"name":"patch","description":"Patch the data contained in this class with new partial data.","access":"private","params":[{"name":"data","description":"Data to patch this with","type":[[["Object"]]]}],"returns":[[["void"]]],"meta":{"line":32,"file":"ClientUserGuildSettings.js","path":"src/structures"}},{"name":"update","description":"Update a specific property of the guild settings.","params":[{"name":"name","description":"Name of property","type":[[["string"]]]},{"name":"value","description":"Value to patch","type":[[["value"]]]}],"returns":[[["Promise","<"],["Object",">"]]],"meta":{"line":55,"file":"ClientUserGuildSettings.js","path":"src/structures"}}],"meta":{"line":8,"file":"ClientUserGuildSettings.js","path":"src/structures"}},{"name":"ClientUserSettings","description":"A wrapper around the ClientUser's settings.","props":[{"name":"convertEmoticons","description":"Automatically convert emoticons in your messages to emoji\nFor example, when you type `:-)` Discord will convert it to 😃","type":[[["boolean"]]],"meta":{"line":500,"file":"Constants.js","path":"src/util"}},{"name":"defaultGuildsRestricted","description":"If new guilds should automatically disable DMs between you and its members","type":[[["boolean"]]],"meta":{"line":508,"file":"Constants.js","path":"src/util"}},{"name":"detectPlatformAccounts","description":"Automatically detect accounts from services like Steam and Blizzard when you open the Discord client","type":[[["boolean"]]],"meta":{"line":515,"file":"Constants.js","path":"src/util"}},{"name":"developerMode","description":"Developer Mode exposes context menu items helpful for people writing bots using the Discord API","type":[[["boolean"]]],"meta":{"line":522,"file":"Constants.js","path":"src/util"}},{"name":"enableTTSCommand","description":"Allow playback and usage of the `/tts` command","type":[[["boolean"]]],"meta":{"line":529,"file":"Constants.js","path":"src/util"}},{"name":"theme","description":"The theme of the client. Either `light` or `dark`","type":[[["string"]]],"meta":{"line":536,"file":"Constants.js","path":"src/util"}},{"name":"status","description":"Last status set in the client","type":[[["PresenceStatus"]]],"meta":{"line":543,"file":"Constants.js","path":"src/util"}},{"name":"showCurrentGame","description":"Display currently running game as status message","type":[[["boolean"]]],"meta":{"line":550,"file":"Constants.js","path":"src/util"}},{"name":"inlineAttachmentMedia","description":"Display images, videos, and lolcats when uploaded directly to Discord","type":[[["boolean"]]],"meta":{"line":557,"file":"Constants.js","path":"src/util"}},{"name":"inlineEmbedMedia","description":"Display images, videos, and lolcats when uploaded posted as links in chat","type":[[["boolean"]]],"meta":{"line":564,"file":"Constants.js","path":"src/util"}},{"name":"locale","description":"Language the Discord client will use, as an RFC 3066 language identifier","type":[[["string"]]],"meta":{"line":571,"file":"Constants.js","path":"src/util"}},{"name":"messageDisplayCompact","description":"Display messages in compact mode","type":[[["boolean"]]],"meta":{"line":578,"file":"Constants.js","path":"src/util"}},{"name":"renderReactions","description":"Show emoji reactions on messages","type":[[["boolean"]]],"meta":{"line":585,"file":"Constants.js","path":"src/util"}},{"name":"guildPositions","description":"Array of snowflake IDs for guilds, in the order they appear in the Discord client","type":[[["Array","<"],["Snowflake",">"]]],"meta":{"line":592,"file":"Constants.js","path":"src/util"}},{"name":"restrictedGuilds","description":"Array of snowflake IDs for guilds which you will not recieve DMs from","type":[[["Array","<"],["Snowflake",">"]]],"meta":{"line":599,"file":"Constants.js","path":"src/util"}},{"name":"explicitContentFilter","description":"Safe direct messaging; force people's messages with images to be scanned before they are sent to you.\nOne of `DISABLED`, `NON_FRIENDS`, `FRIENDS_AND_NON_FRIENDS`","type":[[["string"]]],"meta":{"line":607,"file":"Constants.js","path":"src/util"}},{"name":"friendSources","description":"Who can add you as a friend","type":[[["Object"]]],"props":[{"name":"all","description":"Mutual friends and mutual guilds","type":[[["boolean"]]]},{"name":"mutualGuilds","description":"Only mutual guilds","type":[[["boolean"]]]},{"name":"mutualFriends","description":"Only mutual friends","type":[[["boolean"]]]}],"meta":{"line":616,"file":"Constants.js","path":"src/util"}}],"methods":[{"name":"patch","description":"Patch the data contained in this class with new partial data.","access":"private","params":[{"name":"data","description":"Data to patch this with","type":[[["Object"]]]}],"returns":[[["void"]]],"meta":{"line":19,"file":"ClientUserSettings.js","path":"src/structures"}},{"name":"update","description":"Update a specific property of of user settings.","params":[{"name":"name","description":"Name of property","type":[[["string"]]]},{"name":"value","description":"Value to patch","type":[["*"]]}],"returns":[[["Promise","<"],["Object",">"]]],"meta":{"line":37,"file":"ClientUserSettings.js","path":"src/structures"}},{"name":"setGuildPosition","description":"Sets the position at which this guild will appear in the Discord client.","params":[{"name":"guild","description":"The guild to move","type":[[["Guild"]]]},{"name":"position","description":"Absolute or relative position","type":[[["number"]]]},{"name":"relative","description":"Whether to position relatively or absolutely","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":48,"file":"ClientUserSettings.js","path":"src/structures"}},{"name":"addRestrictedGuild","description":"Add a guild to the list of restricted guilds.","params":[{"name":"guild","description":"The guild to add","type":[[["Guild"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":59,"file":"ClientUserSettings.js","path":"src/structures"}},{"name":"removeRestrictedGuild","description":"Remove a guild from the list of restricted guilds.","params":[{"name":"guild","description":"The guild to remove","type":[[["Guild"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":71,"file":"ClientUserSettings.js","path":"src/structures"}}],"meta":{"line":7,"file":"ClientUserSettings.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":"typing","description":"Whether or not the typing indicator is being shown in the channel","readonly":true,"type":[[["boolean"]]],"meta":{"line":351,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"typingCount","description":"Number of times `startTyping` has been called","readonly":true,"type":[[["number"]]],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"client","description":"The client that instantiated the Channel","readonly":true,"type":[[["Client"]]],"meta":{"line":8,"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\n* `category` - a guild category channel","type":[[["string"]]],"meta":{"line":25,"file":"Channel.js","path":"src/structures"}},{"name":"id","description":"The unique ID of the channel","type":[[["Snowflake"]]],"meta":{"line":35,"file":"Channel.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the channel was created at","readonly":true,"type":[[["number"]]],"meta":{"line":43,"file":"Channel.js","path":"src/structures"}},{"name":"createdAt","description":"The time the channel was created","readonly":true,"type":[[["Date"]]],"meta":{"line":52,"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 basic message\nchannel.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);","// Send a remote file\nchannel.send({\n files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048']\n})\n .then(console.log)\n .catch(console.error);","// Send a local file\nchannel.send({\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);","// Send an embed with a local image inside\nchannel.send('This is an embed', {\n embed: {\n thumbnail: {\n url: 'attachment://file.jpg'\n }\n },\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message,\ncan also be just a RichEmbed or Attachment","optional":true,"type":[[["MessageOptions"]],[["Attachment"]],[["RichEmbed"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not. Since the single message fetching\nendpoint is reserved for bot accounts, this abstracts the `fetchMessages` method to obtain the single message when\nusing a user account.","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":[[["Snowflake"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":176,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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","<"],["Snowflake",", "],["Message",">>"]]],"meta":{"line":211,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"fetchPinnedMessages","description":"Fetches the pinned messages of this channel and returns a collection of them.","implements":["TextBasedChannel#fetchPinnedMessages"],"returns":[[["Promise","<"],["Collection","<"],["Snowflake",", "],["Message",">>"]]],"meta":{"line":227,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"search","description":"Performs a search within the channel.\n<warn>This is only available when using a user account.</warn>","implements":["TextBasedChannel#search"],"examples":["channel.search({\n content: 'discord.js',\n before: '2016-11-17'\n}).then(res => {\n const hit = res.messages[0].find(m => m.hit).content;\n console.log(`I found: **${hit}**, total results: ${res.totalResults}`);\n}).catch(console.error);"],"params":[{"name":"options","description":"Options to pass to the search","optional":true,"default":"{}","type":[[["MessageSearchOptions"]]]}],"returns":[[["Promise","<"],["MessageSearchResult",">"]]],"meta":{"line":288,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":299,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":["// Reduce the typing count by one and stop typing if it reached 0\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":335,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"createCollector","description":"Creates a Message Collector","implements":["TextBasedChannel#createCollector"],"deprecated":true,"params":[{"name":"filter","description":"The filter to create the collector with","type":[[["CollectorFilter"]]]},{"name":"options","description":"The options to pass to the collector","optional":true,"default":"{}","type":[[["MessageCollectorOptions"]]]}],"returns":[[["MessageCollector"]]],"meta":{"line":372,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"createMessageCollector","description":"Creates a Message Collector.","implements":["TextBasedChannel#createMessageCollector"],"examples":["// Create a message collector\nconst filter = m => m.content.includes('discord');\nconst collector = channel.createMessageCollector(filter, { time: 15000 });\ncollector.on('collect', 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":[[["CollectorFilter"]]]},{"name":"options","description":"The options to pass to the collector","optional":true,"default":"{}","type":[[["MessageCollectorOptions"]]]}],"returns":[[["MessageCollector"]]],"meta":{"line":388,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":[[["CollectorFilter"]]]},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"default":"{}","type":[[["AwaitMessagesOptions"]]]}],"returns":[[["Promise","<"],["Collection","<"],["Snowflake",", "],["Message",">>"]]],"meta":{"line":412,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"acknowledge","description":"Marks all messages in this channel as read.\n<warn>This is only available when using a user account.</warn>","implements":["TextBasedChannel#acknowledge"],"returns":[[["Promise","<("],["TextChannel","|"],["GroupDMChannel","|"],["DMChannel",")>"]]],"meta":{"line":458,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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);"],"deprecated":true,"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":486,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendEmbed","description":"Send an embed to this channel.","implements":["TextBasedChannel#sendEmbed"],"deprecated":true,"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":498,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendFiles","description":"Send files to this channel.","implements":["TextBasedChannel#sendFiles"],"deprecated":true,"params":[{"name":"files","description":"Files to send with the message","type":[[["Array","<"],["FileOptions",">"]],[["Array","<"],["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":516,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendFile","description":"Send a file to this channel.","implements":["TextBasedChannel#sendFile"],"deprecated":true,"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":529,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendCode","description":"Send a code block to this channel.","implements":["TextBasedChannel#sendCode"],"deprecated":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":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":541,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"delete","description":"Deletes the channel.","inherits":"Channel#delete","inherited":true,"examples":["// Delete the channel\nchannel.delete()\n .then(console.log)\n .catch(console.error);"],"returns":[[["Promise","<"],["Channel",">"]]],"meta":{"line":65,"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":10,"file":"Emoji.js","path":"src/structures"}},{"name":"guild","description":"The guild this emoji is part of","type":[[["Guild"]]],"meta":{"line":22,"file":"Emoji.js","path":"src/structures"}},{"name":"id","description":"The ID of the emoji","type":[[["Snowflake"]]],"meta":{"line":32,"file":"Emoji.js","path":"src/structures"}},{"name":"name","description":"The name of the emoji","type":[[["string"]]],"meta":{"line":38,"file":"Emoji.js","path":"src/structures"}},{"name":"requiresColons","description":"Whether or not this emoji requires colons surrounding it","type":[[["boolean"]]],"meta":{"line":44,"file":"Emoji.js","path":"src/structures"}},{"name":"managed","description":"Whether this emoji is managed by an external service","type":[[["boolean"]]],"meta":{"line":50,"file":"Emoji.js","path":"src/structures"}},{"name":"animated","description":"Whether this emoji is animated","type":[[["boolean"]]],"meta":{"line":56,"file":"Emoji.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the emoji was created at","readonly":true,"type":[[["number"]]],"meta":{"line":66,"file":"Emoji.js","path":"src/structures"}},{"name":"createdAt","description":"The time the emoji was created","readonly":true,"type":[[["Date"]]],"meta":{"line":75,"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","<"],["Snowflake",", "],["Role",">"]]],"meta":{"line":84,"file":"Emoji.js","path":"src/structures"}},{"name":"url","description":"The URL to the emoji file","readonly":true,"type":[[["string"]]],"meta":{"line":97,"file":"Emoji.js","path":"src/structures"}},{"name":"identifier","description":"The identifier of this emoji, used for message reactions","readonly":true,"type":[[["string"]]],"meta":{"line":106,"file":"Emoji.js","path":"src/structures"}}],"methods":[{"name":"edit","description":"Edits the emoji.","examples":["// Edit an emoji\nemoji.edit({name: 'newemoji'})\n .then(e => console.log(`Edited emoji ${e}`))\n .catch(console.error);"],"params":[{"name":"data","description":"The new data for the emoji","type":[[["EmojiEditData"]]]},{"name":"reason","description":"Reason for editing this emoji","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Emoji",">"]]],"meta":{"line":129,"file":"Emoji.js","path":"src/structures"}},{"name":"setName","description":"Set the name of the emoji.","params":[{"name":"name","description":"The new name for the emoji","type":[[["string"]]]},{"name":"reason","description":"The reason for changing the emoji's name","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Emoji",">"]]],"meta":{"line":139,"file":"Emoji.js","path":"src/structures"}},{"name":"addRestrictedRole","description":"Add a role to the list of roles that can use this emoji.","params":[{"name":"role","description":"The role to add","type":[[["Role"]]]}],"returns":[[["Promise","<"],["Emoji",">"]]],"meta":{"line":148,"file":"Emoji.js","path":"src/structures"}},{"name":"addRestrictedRoles","description":"Add multiple roles to the list of roles that can use this emoji.","params":[{"name":"roles","description":"Roles to add","type":[[["Array","<"],["Role",">"]]]}],"returns":[[["Promise","<"],["Emoji",">"]]],"meta":{"line":157,"file":"Emoji.js","path":"src/structures"}},{"name":"removeRestrictedRole","description":"Remove a role from the list of roles that can use this emoji.","params":[{"name":"role","description":"The role to remove","type":[[["Role"]]]}],"returns":[[["Promise","<"],["Emoji",">"]]],"meta":{"line":170,"file":"Emoji.js","path":"src/structures"}},{"name":"removeRestrictedRoles","description":"Remove multiple roles from the list of roles that can use this emoji.","params":[{"name":"roles","description":"Roles to remove","type":[[["Array","<"],["Role",">"]]]}],"returns":[[["Promise","<"],["Emoji",">"]]],"meta":{"line":179,"file":"Emoji.js","path":"src/structures"}},{"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":195,"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":208,"file":"Emoji.js","path":"src/structures"}}],"meta":{"line":8,"file":"Emoji.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":48,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"icon","description":"A hash of this Group DM icon","nullable":true,"type":[[["string"]]],"meta":{"line":54,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"ownerID","description":"The user ID of this Group DM's owner","type":[[["string"]]],"meta":{"line":60,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"managed","description":"If the DM is managed by an application","type":[[["boolean"]]],"meta":{"line":66,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"applicationID","description":"Application ID of the application that made this Group DM, if applicable","nullable":true,"type":[[["string"]]],"meta":{"line":72,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"nicks","description":"Nicknames for group members","nullable":true,"type":[[["Collection","<"],["Snowflake",", "],["string",">"]]],"meta":{"line":79,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"recipients","description":"A collection of the recipients of this DM, mapped by their ID","type":[[["Collection","<"],["Snowflake",", "],["User",">"]]],"meta":{"line":87,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"owner","description":"The owner of this Group DM","readonly":true,"type":[[["User"]]],"meta":{"line":105,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"iconURL","description":"The URL to this guild's icon","readonly":true,"nullable":true,"type":[[["string"]]],"meta":{"line":114,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"typing","description":"Whether or not the typing indicator is being shown in the channel","readonly":true,"type":[[["boolean"]]],"meta":{"line":351,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"typingCount","description":"Number of times `startTyping` has been called","readonly":true,"type":[[["number"]]],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"client","description":"The client that instantiated the Channel","readonly":true,"type":[[["Client"]]],"meta":{"line":8,"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\n* `category` - a guild category channel","type":[[["string"]]],"meta":{"line":25,"file":"Channel.js","path":"src/structures"}},{"name":"id","description":"The unique ID of the channel","type":[[["Snowflake"]]],"meta":{"line":35,"file":"Channel.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the channel was created at","readonly":true,"type":[[["number"]]],"meta":{"line":43,"file":"Channel.js","path":"src/structures"}},{"name":"createdAt","description":"The time the channel was created","readonly":true,"type":[[["Date"]]],"meta":{"line":52,"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":133,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"addUser","description":"Add a user to the DM","params":[{"name":"accessTokenOrID","description":"Access token or user resolvable","type":[[["UserResolvable"]],[["string"]]]},{"name":"nick","description":"Permanent nickname to give the user (only available if a bot is creating the DM)","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GroupDMChannel",">"]]],"meta":{"line":154,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"setIcon","description":"Set a new GroupDMChannel icon.","examples":["// Edit the group dm icon\nchannel.setIcon('./icon.png')\n .then(updated => console.log('Updated the channel icon'))\n .catch(console.error);"],"params":[{"name":"icon","description":"The new icon of the group dm","type":[[["Base64Resolvable"]],[["BufferResolvable"]]]}],"returns":[[["Promise","<"],["GroupDMChannel",">"]]],"meta":{"line":172,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"setName","description":"Sets a new name for this Group DM.","params":[{"name":"name","description":"New name for this Group DM","type":[[["string"]]]}],"returns":[[["Promise","<"],["GroupDMChannel",">"]]],"meta":{"line":181,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"removeUser","description":"Removes an user from this Group DM.","params":[{"name":"user","description":"User to remove","type":[[["UserResolvable"]]]}],"returns":[[["Promise","<"],["GroupDMChannel",">"]]],"meta":{"line":190,"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":205,"file":"GroupDMChannel.js","path":"src/structures"}},{"name":"send","description":"Send a message to this channel.","implements":["TextBasedChannel#send"],"examples":["// Send a basic message\nchannel.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);","// Send a remote file\nchannel.send({\n files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048']\n})\n .then(console.log)\n .catch(console.error);","// Send a local file\nchannel.send({\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);","// Send an embed with a local image inside\nchannel.send('This is an embed', {\n embed: {\n thumbnail: {\n url: 'attachment://file.jpg'\n }\n },\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message,\ncan also be just a RichEmbed or Attachment","optional":true,"type":[[["MessageOptions"]],[["Attachment"]],[["RichEmbed"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not. Since the single message fetching\nendpoint is reserved for bot accounts, this abstracts the `fetchMessages` method to obtain the single message when\nusing a user account.","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":[[["Snowflake"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":176,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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","<"],["Snowflake",", "],["Message",">>"]]],"meta":{"line":211,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"fetchPinnedMessages","description":"Fetches the pinned messages of this channel and returns a collection of them.","implements":["TextBasedChannel#fetchPinnedMessages"],"returns":[[["Promise","<"],["Collection","<"],["Snowflake",", "],["Message",">>"]]],"meta":{"line":227,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"search","description":"Performs a search within the channel.\n<warn>This is only available when using a user account.</warn>","implements":["TextBasedChannel#search"],"examples":["channel.search({\n content: 'discord.js',\n before: '2016-11-17'\n}).then(res => {\n const hit = res.messages[0].find(m => m.hit).content;\n console.log(`I found: **${hit}**, total results: ${res.totalResults}`);\n}).catch(console.error);"],"params":[{"name":"options","description":"Options to pass to the search","optional":true,"default":"{}","type":[[["MessageSearchOptions"]]]}],"returns":[[["Promise","<"],["MessageSearchResult",">"]]],"meta":{"line":288,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":299,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":["// Reduce the typing count by one and stop typing if it reached 0\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":335,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"createCollector","description":"Creates a Message Collector","implements":["TextBasedChannel#createCollector"],"deprecated":true,"params":[{"name":"filter","description":"The filter to create the collector with","type":[[["CollectorFilter"]]]},{"name":"options","description":"The options to pass to the collector","optional":true,"default":"{}","type":[[["MessageCollectorOptions"]]]}],"returns":[[["MessageCollector"]]],"meta":{"line":372,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"createMessageCollector","description":"Creates a Message Collector.","implements":["TextBasedChannel#createMessageCollector"],"examples":["// Create a message collector\nconst filter = m => m.content.includes('discord');\nconst collector = channel.createMessageCollector(filter, { time: 15000 });\ncollector.on('collect', 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":[[["CollectorFilter"]]]},{"name":"options","description":"The options to pass to the collector","optional":true,"default":"{}","type":[[["MessageCollectorOptions"]]]}],"returns":[[["MessageCollector"]]],"meta":{"line":388,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":[[["CollectorFilter"]]]},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"default":"{}","type":[[["AwaitMessagesOptions"]]]}],"returns":[[["Promise","<"],["Collection","<"],["Snowflake",", "],["Message",">>"]]],"meta":{"line":412,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"acknowledge","description":"Marks all messages in this channel as read.\n<warn>This is only available when using a user account.</warn>","implements":["TextBasedChannel#acknowledge"],"returns":[[["Promise","<("],["TextChannel","|"],["GroupDMChannel","|"],["DMChannel",")>"]]],"meta":{"line":458,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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);"],"deprecated":true,"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":486,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendEmbed","description":"Send an embed to this channel.","implements":["TextBasedChannel#sendEmbed"],"deprecated":true,"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":498,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendFiles","description":"Send files to this channel.","implements":["TextBasedChannel#sendFiles"],"deprecated":true,"params":[{"name":"files","description":"Files to send with the message","type":[[["Array","<"],["FileOptions",">"]],[["Array","<"],["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":516,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendFile","description":"Send a file to this channel.","implements":["TextBasedChannel#sendFile"],"deprecated":true,"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":529,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendCode","description":"Send a code block to this channel.","implements":["TextBasedChannel#sendCode"],"deprecated":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":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":541,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"delete","description":"Deletes the channel.","inherits":"Channel#delete","inherited":true,"examples":["// Delete the channel\nchannel.delete()\n .then(console.log)\n .catch(console.error);"],"returns":[[["Promise","<"],["Channel",">"]]],"meta":{"line":65,"file":"Channel.js","path":"src/structures"}}],"meta":{"line":33,"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 guild","readonly":true,"type":[[["Client"]]],"meta":{"line":20,"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","<"],["Snowflake",", "],["GuildMember",">"]]],"meta":{"line":32,"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","<"],["Snowflake",", "],["GuildChannel",">"]]],"meta":{"line":38,"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","<"],["Snowflake",", "],["Role",">"]]],"meta":{"line":44,"file":"Guild.js","path":"src/structures"}},{"name":"presences","description":"A collection of presences in this guild","type":[[["Collection","<"],["Snowflake",", "],["Presence",">"]]],"meta":{"line":50,"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":58,"file":"Guild.js","path":"src/structures"}},{"name":"id","description":"The Unique ID of the guild, useful for comparisons","type":[[["Snowflake"]]],"meta":{"line":64,"file":"Guild.js","path":"src/structures"}},{"name":"name","description":"The name of the guild","type":[[["string"]]],"meta":{"line":81,"file":"Guild.js","path":"src/structures"}},{"name":"icon","description":"The hash of the guild icon","nullable":true,"type":[[["string"]]],"meta":{"line":87,"file":"Guild.js","path":"src/structures"}},{"name":"splash","description":"The hash of the guild splash image (VIP only)","nullable":true,"type":[[["string"]]],"meta":{"line":93,"file":"Guild.js","path":"src/structures"}},{"name":"region","description":"The region the guild is located in","type":[[["string"]]],"meta":{"line":99,"file":"Guild.js","path":"src/structures"}},{"name":"memberCount","description":"The full amount of members in this guild as of `READY`","type":[[["number"]]],"meta":{"line":105,"file":"Guild.js","path":"src/structures"}},{"name":"large","description":"Whether the guild is \"large\" (has more than 250 members)","type":[[["boolean"]]],"meta":{"line":111,"file":"Guild.js","path":"src/structures"}},{"name":"features","description":"An array of guild features","type":[[["Array","<"],["Object",">"]]],"meta":{"line":117,"file":"Guild.js","path":"src/structures"}},{"name":"applicationID","description":"The ID of the application that created this guild (if applicable)","nullable":true,"type":[[["Snowflake"]]],"meta":{"line":123,"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":129,"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":135,"file":"Guild.js","path":"src/structures"}},{"name":"systemChannelID","description":"The ID of the system channel","nullable":true,"type":[[["Snowflake"]]],"meta":{"line":141,"file":"Guild.js","path":"src/structures"}},{"name":"embedEnabled","description":"Whether embedded images are enabled on this guild","type":[[["boolean"]]],"meta":{"line":147,"file":"Guild.js","path":"src/structures"}},{"name":"verificationLevel","description":"The verification level of the guild","type":[[["number"]]],"meta":{"line":153,"file":"Guild.js","path":"src/structures"}},{"name":"explicitContentFilter","description":"The explicit content filter level of the guild","type":[[["number"]]],"meta":{"line":159,"file":"Guild.js","path":"src/structures"}},{"name":"joinedTimestamp","description":"The timestamp the client user joined the guild at","type":[[["number"]]],"meta":{"line":165,"file":"Guild.js","path":"src/structures"}},{"name":"ownerID","description":"The user ID of this guild's owner","type":[[["Snowflake"]]],"meta":{"line":181,"file":"Guild.js","path":"src/structures"}},{"name":"emojis","description":"A collection of emojis that are in this guild\nThe key is the emoji's ID, the value is the emoji","type":[[["Collection","<"],["Snowflake",", "],["Emoji",">"]]],"meta":{"line":226,"file":"Guild.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the guild was created at","readonly":true,"type":[[["number"]]],"meta":{"line":241,"file":"Guild.js","path":"src/structures"}},{"name":"createdAt","description":"The time the guild was created","readonly":true,"type":[[["Date"]]],"meta":{"line":250,"file":"Guild.js","path":"src/structures"}},{"name":"joinedAt","description":"The time the client user joined the guild","readonly":true,"type":[[["Date"]]],"meta":{"line":259,"file":"Guild.js","path":"src/structures"}},{"name":"iconURL","description":"The URL to this guild's icon","readonly":true,"nullable":true,"type":[[["string"]]],"meta":{"line":268,"file":"Guild.js","path":"src/structures"}},{"name":"nameAcronym","description":"The acronym that shows up in place of a guild icon.","readonly":true,"type":[[["string"]]],"meta":{"line":278,"file":"Guild.js","path":"src/structures"}},{"name":"splashURL","description":"The URL to this guild's splash","readonly":true,"nullable":true,"type":[[["string"]]],"meta":{"line":287,"file":"Guild.js","path":"src/structures"}},{"name":"owner","description":"The owner of the guild","readonly":true,"type":[[["GuildMember"]]],"meta":{"line":297,"file":"Guild.js","path":"src/structures"}},{"name":"afkChannel","description":"AFK voice channel for this guild","readonly":true,"nullable":true,"type":[[["VoiceChannel"]]],"meta":{"line":306,"file":"Guild.js","path":"src/structures"}},{"name":"systemChannel","description":"System channel for this guild","readonly":true,"nullable":true,"type":[[["GuildChannel"]]],"meta":{"line":315,"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":324,"file":"Guild.js","path":"src/structures"}},{"name":"position","description":"The position of this guild\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["number"]]],"meta":{"line":335,"file":"Guild.js","path":"src/structures"}},{"name":"muted","description":"Whether the guild is muted\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["boolean"]]],"meta":{"line":347,"file":"Guild.js","path":"src/structures"}},{"name":"messageNotifications","description":"The type of message that should notify you\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["MessageNotificationType"]]],"meta":{"line":362,"file":"Guild.js","path":"src/structures"}},{"name":"mobilePush","description":"Whether to receive mobile push notifications\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["boolean"]]],"meta":{"line":377,"file":"Guild.js","path":"src/structures"}},{"name":"suppressEveryone","description":"Whether to suppress everyone messages\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["boolean"]]],"meta":{"line":392,"file":"Guild.js","path":"src/structures"}},{"name":"defaultRole","description":"The `@everyone` role of the guild","readonly":true,"type":[[["Role"]]],"meta":{"line":406,"file":"Guild.js","path":"src/structures"}},{"name":"me","description":"The client user as a GuildMember of this guild","readonly":true,"nullable":true,"type":[[["GuildMember"]]],"meta":{"line":415,"file":"Guild.js","path":"src/structures"}},{"name":"_sortedRoles","description":"Fetches a collection of roles in the current guild sorted by position","access":"private","readonly":true,"type":[[["Collection","<"],["Snowflake",", "],["Role",">"]]],"meta":{"line":425,"file":"Guild.js","path":"src/structures"}},{"name":"defaultChannel","description":"The `#general` TextChannel of the guild","readonly":true,"deprecated":true,"type":[[["TextChannel"]]],"meta":{"line":1276,"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":76,"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":437,"file":"Guild.js","path":"src/structures"}},{"name":"fetchBans","description":"Fetch a collection of banned users in this guild.","examples":["// Fetch bans in guild\nguild.fetchBans()\n .then(bans => console.log(`This guild has ${bans.size} bans`))\n .catch(console.error);"],"returns":[[["Promise","<"],["Collection","<"],["Snowflake",", "],["User",">>"]]],"meta":{"line":450,"file":"Guild.js","path":"src/structures"}},{"name":"fetchInvites","description":"Fetch a collection of invites to this guild.\nResolves with a collection mapping invites by their codes.","examples":["// Fetch invites\nguild.fetchInvites()\n .then(invites => console.log(`Fetched ${invites.size} invites`))\n .catch(console.error);","// Fetch invite creator by their id\nguild.fetchInvites()\n .then(invites => console.log(invites.find(invite => invite.inviter.id === '84484653687267328')))\n .then(console.error);"],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["Invite",">>"]]],"meta":{"line":474,"file":"Guild.js","path":"src/structures"}},{"name":"fetchWebhooks","description":"Fetch all webhooks for the guild.","examples":["// Fetch webhooks\nguild.fetchWebhooks()\n .then(webhooks => console.log(`Fetched ${webhooks.size} webhooks`))\n .catch(console.error);"],"returns":[[["Promise","<"],["Collection","<"],["Snowflake",", "],["Webhook",">>"]]],"meta":{"line":487,"file":"Guild.js","path":"src/structures"}},{"name":"fetchVoiceRegions","description":"Fetch available voice regions.","examples":["// Fetch voice regions\nguild.fetchVoiceRegions()\n .then(console.log)\n .catch(console.error);"],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["VoiceRegion",">>"]]],"meta":{"line":500,"file":"Guild.js","path":"src/structures"}},{"name":"fetchAuditLogs","description":"Fetch audit logs for this guild.","examples":["// Output audit log entries\nguild.fetchAuditLogs()\n .then(audit => console.log(audit.entries.first()))\n .catch(console.error);"],"params":[{"name":"options","description":"Options for fetching audit logs","optional":true,"default":"{}","type":[[["Object"]]]},{"name":"options.before","description":"Limit to entries from before specified entry","optional":true,"type":[[["Snowflake"]],[["GuildAuditLogsEntry"]]]},{"name":"options.after","description":"Limit to entries from after specified entry","optional":true,"type":[[["Snowflake"]],[["GuildAuditLogsEntry"]]]},{"name":"options.limit","description":"Limit number of entries","optional":true,"type":[[["number"]]]},{"name":"options.user","description":"Only show entries involving this user","optional":true,"type":[[["UserResolvable"]]]},{"name":"options.type","description":"Only show entries involving this action type","optional":true,"type":[[["string"]],[["number"]]]}],"returns":[[["Promise","<"],["GuildAuditLogs",">"]]],"meta":{"line":519,"file":"Guild.js","path":"src/structures"}},{"name":"addMember","description":"Adds a user to the guild using OAuth2. Requires the `CREATE_INSTANT_INVITE` permission.","params":[{"name":"user","description":"User to add to the guild","type":[[["UserResolvable"]]]},{"name":"options","description":"Options for the addition","type":[[["Object"]]]},{"name":"options.accessToken","description":"An OAuth2 access token for the user with the `guilds.join` scope granted to the\nbot's application","type":[[["string"]]]},{"name":"options.nick","description":"Nickname to give the member (requires `MANAGE_NICKNAMES`)","optional":true,"type":[[["string"]]]},{"name":"options.roles","description":"Roles to add to the member\n(requires `MANAGE_ROLES`)","optional":true,"type":[[["Collection","<"],["Snowflake",", "],["Role",">"]],[["Array","<"],["Role",">"]],[["Array","<"],["Snowflake",">"]]]},{"name":"options.mute","description":"Whether the member should be muted (requires `MUTE_MEMBERS`)","optional":true,"type":[[["boolean"]]]},{"name":"options.deaf","description":"Whether the member should be deafened (requires `DEAFEN_MEMBERS`)","optional":true,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":536,"file":"Guild.js","path":"src/structures"}},{"name":"fetchMember","description":"Fetch a single guild member from a user.","examples":["// Fetch a guild member\nguild.fetchMember(message.author)\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"user","description":"The user to fetch the member for","type":[[["UserResolvable"]]]},{"name":"cache","description":"Insert the member into the members cache","optional":true,"default":true,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":552,"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.","examples":["// Fetch guild members\nguild.fetchMembers()\n .then(console.log)\n .catch(console.error);","// Fetches a maximum of 1 member with the given query\nguild.fetchMembers('hydrabolt', 1)\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"query","description":"Limit fetch to members with similar usernames","optional":true,"default":"''","type":[[["string"]]]},{"name":"limit","description":"Maximum number of members to request","optional":true,"default":0,"type":[[["number"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":576,"file":"Guild.js","path":"src/structures"}},{"name":"search","description":"Performs a search within the entire guild.\n<warn>This is only available when using a user account.</warn>","examples":["guild.search({\n content: 'discord.js',\n before: '2016-11-17'\n})\n .then(res => {\n const hit = res.messages[0].find(m => m.hit).content;\n console.log(`I found: **${hit}**, total results: ${res.totalResults}`);\n })\n .catch(console.error);"],"params":[{"name":"options","description":"Options to pass to the search","optional":true,"default":"{}","type":[[["MessageSearchOptions"]]]}],"returns":[[["Promise","<"],["MessageSearchResult",">"]]],"meta":{"line":618,"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(g => console.log(`Changed guild name to ${g} and region to ${g.region}`))\n .catch(console.error);"],"params":[{"name":"data","description":"The data to update the guild with","type":[[["GuildEditData"]]]},{"name":"reason","description":"Reason for editing the guild","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":651,"file":"Guild.js","path":"src/structures"}},{"name":"setExplicitContentFilter","description":"Edit the level of the explicit content filter.","params":[{"name":"explicitContentFilter","description":"The new level of the explicit content filter","type":[[["number"]]]},{"name":"reason","description":"Reason for changing the level of the guild's explicit content filter","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":678,"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(g => console.log(`Updated guild name to ${g}`))\n .catch(console.error);"],"params":[{"name":"name","description":"The new name of the guild","type":[[["string"]]]},{"name":"reason","description":"Reason for changing the guild's name","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":693,"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(g => console.log(`Updated guild region to ${g.region}`))\n .catch(console.error);"],"params":[{"name":"region","description":"The new region of the guild","type":[[["string"]]]},{"name":"reason","description":"Reason for changing the guild's region","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":708,"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(g => console.log(`Updated guild verification level to ${g.verificationLevel}`))\n .catch(console.error);"],"params":[{"name":"verificationLevel","description":"The new verification level of the guild","type":[[["number"]]]},{"name":"reason","description":"Reason for changing the guild's verification level","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":723,"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(g => console.log(`Updated guild AFK channel to ${g.afkChannel.name}`))\n .catch(console.error);"],"params":[{"name":"afkChannel","description":"The new AFK channel","type":[[["ChannelResolvable"]]]},{"name":"reason","description":"Reason for changing the guild's AFK channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":738,"file":"Guild.js","path":"src/structures"}},{"name":"setSystemChannel","description":"Edit the system channel of the guild.","params":[{"name":"systemChannel","description":"The new system channel","type":[[["ChannelResolvable"]]]},{"name":"reason","description":"Reason for changing the guild's system channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":748,"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(g => console.log(`Updated guild AFK timeout to ${g.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"]]]},{"name":"reason","description":"Reason for changing the guild's AFK timeout","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":763,"file":"Guild.js","path":"src/structures"}},{"name":"setIcon","description":"Set a new guild icon.","examples":["// Edit the guild icon\nguild.setIcon('./icon.png')\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"icon","description":"The new icon of the guild","type":[[["Base64Resolvable"]],[["BufferResolvable"]]]},{"name":"reason","description":"Reason for changing the guild's icon","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":778,"file":"Guild.js","path":"src/structures"}},{"name":"setOwner","description":"Sets a new owner of the guild.","examples":["// Edit the guild owner\nguild.setOwner(guild.members.first())\n .then(g => console.log(`Updated the guild owner to ${g.owner.displayName}`))\n .catch(console.error);"],"params":[{"name":"owner","description":"The new owner of the guild","type":[[["GuildMemberResolvable"]]]},{"name":"reason","description":"Reason for setting the new owner","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":793,"file":"Guild.js","path":"src/structures"}},{"name":"setSplash","description":"Set a new guild splash screen.","examples":["// Edit the guild splash\nguild.setSplash('./splash.png')\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"splash","description":"The new splash screen of the guild","type":[[["BufferResolvable"]],[["Base64Resolvable"]]]},{"name":"reason","description":"Reason for changing the guild's splash screen","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":808,"file":"Guild.js","path":"src/structures"}},{"name":"setPosition","description":"Sets the position of the guild in the guild listing.\n<warn>This is only available when using a user account.</warn>","params":[{"name":"position","description":"Absolute or relative position","type":[[["number"]]]},{"name":"relative","description":"Whether to position relatively or absolutely","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":819,"file":"Guild.js","path":"src/structures"}},{"name":"acknowledge","description":"Marks all messages in this guild as read.\n<warn>This is only available when using a user account.</warn>","returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":831,"file":"Guild.js","path":"src/structures"}},{"name":"allowDMs","description":"Allow direct messages from guild members.\n<warn>This is only available when using a user account.</warn>","params":[{"name":"allow","description":"Whether to allow direct messages","type":[[["boolean"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":841,"file":"Guild.js","path":"src/structures"}},{"name":"ban","description":"Bans a user from the guild.","examples":["// Ban a user by ID\nguild.ban('some user ID')\n .then(user => console.log(`Banned ${user.username || user.id || user} from ${guild}`))\n .catch(console.error);","// Ban a user by object with reason and days\nguild.ban(user, { days: 7, reason: 'He needed to go' })\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"user","description":"The user to ban","type":[[["UserResolvable"]]]},{"name":"options","description":"Ban options. If a number, the number of days to delete messages for, if a\nstring, the ban reason. Supplying an object allows you to do both.","optional":true,"type":[[["Object"]],[["number"]],[["string"]]]},{"name":"options.days","description":"Number of days of messages to delete","optional":true,"default":0,"type":[[["number"]]]},{"name":"options.reason","description":"Reason for banning","optional":true,"type":[[["string"]]]}],"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":868,"file":"Guild.js","path":"src/structures"}},{"name":"unban","description":"Unbans a user from the guild.","examples":["// Unban a user by ID (or with a user/guild member object)\nguild.unban('some user ID')\n .then(user => console.log(`Unbanned ${user.username} from ${guild}`))\n .catch(console.error);"],"params":[{"name":"user","description":"The user to unban","type":[[["UserResolvable"]]]},{"name":"reason","description":"Reason for unbanning the user","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["User",">"]]],"meta":{"line":889,"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"]]]},{"name":"reason","description":"Reason for this prune","optional":true,"type":[[["string"]]]}],"returns":{"types":[[["Promise","<"],["number",">"]]],"description":"The number of members that were/will be kicked"},"meta":{"line":910,"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":919,"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(console.log)\n .catch(console.error);","// Create a new category channel with permission overwrites\nguild.createChannel('new-category', 'category', [{\n id: guild.id,\n deny: ['MANAGE_MESSAGES'],\n allow: ['SEND_MESSAGES']\n}])\n .then(console.log)\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` or `category`","optional":true,"default":"'text'","type":[[["string"]]]},{"name":"overwrites","description":"Permission overwrites","optional":true,"type":[[["Array","<("],["PermissionOverwrites","|"],["ChannelCreationOverwrites",")>"]]]},{"name":"reason","description":"Reason for creating this channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<("],["CategoryChannel","|"],["TextChannel","|"],["VoiceChannel",")>"]]],"meta":{"line":953,"file":"Guild.js","path":"src/structures"}},{"name":"setChannelPositions","description":"Batch-updates the guild's channels' positions.","examples":["guild.updateChannels([{ channel: channelID, position: newChannelIndex }])\n .then(g => console.log(`Updated channel positions for ${g}`))\n .catch(console.error);"],"params":[{"name":"channelPositions","description":"Channel positions to update","type":[[["Array","<"],["ChannelPosition",">"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":973,"file":"Guild.js","path":"src/structures"}},{"name":"createRole","description":"Creates a new role in the guild with given information.","examples":["// Create a new role\nguild.createRole()\n .then(role => console.log(`Created new role with name ${role.name}`))\n .catch(console.error);","// Create a new role with data\nguild.createRole({\n name: 'Super Cool People',\n color: 'BLUE',\n})\n .then(role => console.log(`Created new role with name ${role.name} and color ${role.color}`))\n .catch(console.error)"],"params":[{"name":"data","description":"The data to update the role with","optional":true,"type":[[["RoleData"]]]},{"name":"reason","description":"Reason for creating this role","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":996,"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"]],[["Base64Resolvable"]]]},{"name":"name","description":"The name for the emoji","type":[[["string"]]]},{"name":"roles","description":"Roles to limit the emoji to","optional":true,"type":[[["Collection","<"],["Snowflake",", "],["Role",">"]],[["Array","<"],["Role",">"]]]},{"name":"reason","description":"Reason for creating the emoji","optional":true,"type":[[["string"]]]}],"returns":{"types":[[["Promise","<"],["Emoji",">"]]],"description":"The created emoji"},"meta":{"line":1018,"file":"Guild.js","path":"src/structures"}},{"name":"deleteEmoji","description":"Delete an emoji.","params":[{"name":"emoji","description":"The emoji to delete","type":[[["Emoji"]],[["string"]]]},{"name":"reason","description":"Reason for deleting the emoji","optional":true,"type":[[["string"]]]}],"returns":[[["Promise"]]],"meta":{"line":1034,"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":1048,"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":1061,"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":"The guild to compare with","type":[[["Guild"]]]}],"returns":[[["boolean"]]],"meta":{"line":1072,"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":1109,"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"]]]},{"name":"relative","description":"Position Moves the role relative to its current position","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":1205,"file":"Guild.js","path":"src/structures"}},{"name":"setChannelPosition","description":"Set the position of a channel in this guild.","params":[{"name":"channel","description":"The channel to edit, can be a channel object or a channel ID","type":[[["string"]],[["GuildChannel"]]]},{"name":"position","description":"The new position of the channel","type":[[["number"]]]},{"name":"relative","description":"Position Moves the channel relative to its current position","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["Guild",">"]]],"meta":{"line":1229,"file":"Guild.js","path":"src/structures"}},{"name":"_sortedChannels","description":"Fetches a collection of channels in the current guild sorted by position.","access":"private","params":[{"name":"type","description":"The channel type","type":[[["string"]]]}],"returns":[[["Collection","<"],["Snowflake",", "],["GuildChannel",">"]]],"meta":{"line":1252,"file":"Guild.js","path":"src/structures"}},{"name":"_sortPositionWithID","description":"Sorts a collection by object position or ID if the positions are equivalent.\nIntended to be identical to Discord's sorting method.","access":"private","params":[{"name":"collection","description":"The collection to sort","type":[[["Collection"]]]}],"returns":[[["Collection"]]],"meta":{"line":1267,"file":"Guild.js","path":"src/structures"}}],"meta":{"line":18,"file":"Guild.js","path":"src/structures"}},{"name":"GuildAuditLogs","description":"Audit logs entries are held in this class.","props":[{"name":"webhooks","description":"Cached webhooks","access":"private","type":[[["Collection","<"],["Snowflake",", "],["Webhook",">"]]],"meta":{"line":116,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"entries","description":"The entries for this guild's audit logs","type":[[["Collection","<"],["Snowflake",", "],["GuildAuditLogsEntry",">"]]],"meta":{"line":127,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"Targets","description":"Key mirror of all available audit log targets.","scope":"static","type":[[["AuditLogTargetType"]]],"meta":{"line":19,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"Actions","description":"All available actions keyed under their names to their numeric values.","scope":"static","type":[[["AuditLogAction"]]],"meta":{"line":68,"file":"GuildAuditLogs.js","path":"src/structures"}}],"methods":[{"name":"build","description":"Handles possible promises for entry targets.","scope":"static","returns":[[["Promise","<"],["GuildAuditLogs",">"]]],"meta":{"line":138,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"targetType","description":"Find target type from entry action.","scope":"static","params":[{"name":"target","description":"The action target","type":[[["number"]]]}],"returns":{"types":[[["string"]]],"nullable":true},"meta":{"line":160,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"actionType","description":"Finds the action type from the entry action.","scope":"static","params":[{"name":"action","description":"The action target","type":[[["AuditLogAction"]]]}],"returns":[[["AuditLogActionType"]]],"meta":{"line":187,"file":"GuildAuditLogs.js","path":"src/structures"}}],"meta":{"line":107,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"GuildAuditLogsEntry","description":"Audit logs entry.","props":[{"name":"targetType","description":"The target type of this entry","type":[[["AuditLogTargetType"]]],"meta":{"line":237,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"actionType","description":"The action type of this entry","type":[[["AuditLogActionType"]]],"meta":{"line":243,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"action","description":"Specific action type of this entry in its string representation","type":[[["AuditLogAction"]]],"meta":{"line":249,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"reason","description":"The reason of this entry","nullable":true,"type":[[["string"]]],"meta":{"line":255,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"executor","description":"The user that executed this entry","type":[[["User"]]],"meta":{"line":261,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"changes","description":"Specific property changes","type":[[["Array","<"],["AuditLogChange",">"]]],"meta":{"line":275,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"id","description":"The ID of this entry","type":[[["Snowflake"]]],"meta":{"line":281,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"extra","description":"Any extra data from the entry","type":[[["Object"]],[["Role"]],[["GuildMember"]]],"meta":{"line":287,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"target","description":"The target of this entry","type":[[["AuditLogEntryTarget"]]],"meta":{"line":320,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp this entry was created at","readonly":true,"type":[[["number"]]],"meta":{"line":353,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"createdAt","description":"The time this entry was created","readonly":true,"type":[[["Date"]]],"meta":{"line":362,"file":"GuildAuditLogs.js","path":"src/structures"}}],"meta":{"line":230,"file":"GuildAuditLogs.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":"parentID","description":"The ID of the category parent of this channel","nullable":true,"type":[[["Snowflake"]]],"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users","type":[[["Collection","<"],["Snowflake",", "],["PermissionOverwrites",">"]]],"meta":{"line":48,"file":"GuildChannel.js","path":"src/structures"}},{"name":"calculatedPosition","description":"The position of the channel","readonly":true,"type":[[["number"]]],"meta":{"line":61,"file":"GuildChannel.js","path":"src/structures"}},{"name":"parent","description":"The category parent of this channel","readonly":true,"nullable":true,"type":[[["CategoryChannel"]]],"meta":{"line":71,"file":"GuildChannel.js","path":"src/structures"}},{"name":"deletable","description":"Whether the channel is deletable by the client user","readonly":true,"type":[[["boolean"]]],"meta":{"line":378,"file":"GuildChannel.js","path":"src/structures"}},{"name":"muted","description":"Whether the channel is muted\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["boolean"]]],"meta":{"line":389,"file":"GuildChannel.js","path":"src/structures"}},{"name":"messageNotifications","description":"The type of message that should notify you\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["MessageNotificationType"]]],"meta":{"line":404,"file":"GuildChannel.js","path":"src/structures"}},{"name":"client","description":"The client that instantiated the Channel","readonly":true,"type":[[["Client"]]],"meta":{"line":8,"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\n* `category` - a guild category channel","type":[[["string"]]],"meta":{"line":25,"file":"Channel.js","path":"src/structures"}},{"name":"id","description":"The unique ID of the channel","type":[[["Snowflake"]]],"meta":{"line":35,"file":"Channel.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the channel was created at","readonly":true,"type":[[["number"]]],"meta":{"line":43,"file":"Channel.js","path":"src/structures"}},{"name":"createdAt","description":"The time the channel was created","readonly":true,"type":[[["Date"]]],"meta":{"line":52,"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":[[["Permissions"]]],"nullable":true},"meta":{"line":81,"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(updated => console.log(updated.permissionOverwrites.get(message.author.id)))\n .catch(console.error);"],"params":[{"name":"userOrRole","description":"The user or role to update","type":[[["Role"]],[["Snowflake"]],[["UserResolvable"]]]},{"name":"options","description":"The configuration for the update","type":[[["PermissionOverwriteOptions"]]]},{"name":"reason","description":"Reason for creating/editing this overwrite","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":167,"file":"GuildChannel.js","path":"src/structures"}},{"name":"edit","description":"Edits the channel.","examples":["// Edit a channel\nchannel.edit({ name: 'new-channel' })\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"data","description":"The new data for the channel","type":[[["ChannelData"]]]},{"name":"reason","description":"Reason for editing this channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":230,"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"]]]},{"name":"reason","description":"Reason for changing the guild channel's name","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":245,"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"]]]},{"name":"relative","description":"Move the position relative to its current value","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":260,"file":"GuildChannel.js","path":"src/structures"}},{"name":"setParent","description":"Set a new parent for the guild channel.","examples":["// Sets the parent of a channel\nchannel.setParent('174674066072928256')\n .then(updated => console.log(`Set the category of ${updated.name} to ${updated.parent.name}`))\n .catch(console.error);"],"params":[{"name":"parent","description":"The new parent for the guild channel","type":[[["CategoryChannel"]],[["SnowFlake"]]]},{"name":"reason","description":"Reason for changing the guild channel's parent","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":275,"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(updated => console.log(`Channel's new topic is ${updated.topic}`))\n .catch(console.error);"],"params":[{"name":"topic","description":"The new topic for the guild channel","type":[[["string"]]]},{"name":"reason","description":"Reason for changing the guild channel's topic","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":291,"file":"GuildChannel.js","path":"src/structures"}},{"name":"createInvite","description":"Create an invite to this guild channel.\n<warn>This is only available when using a bot account.</warn>","examples":["// Create an invite to a channel\nchannel.createInvite()\n .then(invite => console.log(`Created an invite with a code of ${invite.code}`))\n .catch(console.error);"],"params":[{"name":"options","description":"Options for the invite","optional":true,"default":"{}","type":[[["Object"]]]},{"name":"options.temporary","description":"Whether members that joined via the invite should be automatically\nkicked after 24 hours if they have not yet received a role","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"options.maxAge","description":"How long the invite should last (in seconds, 0 for forever)","optional":true,"default":86400,"type":[[["number"]]]},{"name":"options.maxUses","description":"Maximum number of uses","optional":true,"default":0,"type":[[["number"]]]},{"name":"options.unique","description":"Create a unique invite, or use an existing one with similar settings","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"reason","description":"Reason for creating the invite","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Invite",">"]]],"meta":{"line":312,"file":"GuildChannel.js","path":"src/structures"}},{"name":"clone","description":"Clone this channel.","examples":["// Clone a channel\nchannel.clone(undefined, true, false, 'Needed a clone')\n .then(clone => console.log(`Cloned ${channel.name} to make a channel called ${clone.name}`))\n .catch(console.error);"],"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"]]]},{"name":"withTopic","description":"Whether to clone the channel with this channel's topic","optional":true,"default":true,"type":[[["boolean"]]]},{"name":"reason","description":"Reason for cloning this channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":329,"file":"GuildChannel.js","path":"src/structures"}},{"name":"delete","description":"Deletes this channel.","examples":["// Delete the channel\nchannel.delete('Making room for new channels')\n .then(deleted => console.log(`Deleted ${deleted.name} to make room for new channels`))\n .catch(console.error);"],"params":[{"name":"reason","description":"Reason for deleting this channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":344,"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":354,"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":["// Logs: Hello from <#123456789012345678>\nconsole.log(`Hello from ${channel}`);","// Logs: Hello from <#123456789012345678>\nconsole.log('Hello from ' + channel);"],"returns":[[["string"]]],"meta":{"line":423,"file":"GuildChannel.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":[[["Snowflake"]]],"meta":{"line":41,"file":"GuildMember.js","path":"src/structures"}},{"name":"lastMessage","description":"The Message object of the last message sent by the member in their guild, if one was sent","nullable":true,"type":[[["Message"]]],"meta":{"line":47,"file":"GuildMember.js","path":"src/structures"}},{"name":"serverDeaf","description":"Whether this member is deafened server-wide","type":[[["boolean"]]],"meta":{"line":55,"file":"GuildMember.js","path":"src/structures"}},{"name":"serverMute","description":"Whether this member is muted server-wide","type":[[["boolean"]]],"meta":{"line":61,"file":"GuildMember.js","path":"src/structures"}},{"name":"selfMute","description":"Whether this member is self-muted","type":[[["boolean"]]],"meta":{"line":67,"file":"GuildMember.js","path":"src/structures"}},{"name":"selfDeaf","description":"Whether this member is self-deafened","type":[[["boolean"]]],"meta":{"line":73,"file":"GuildMember.js","path":"src/structures"}},{"name":"voiceSessionID","description":"The voice session ID of this member, if any","nullable":true,"type":[[["Snowflake"]]],"meta":{"line":79,"file":"GuildMember.js","path":"src/structures"}},{"name":"voiceChannelID","description":"The voice channel ID of this member, if any","nullable":true,"type":[[["Snowflake"]]],"meta":{"line":85,"file":"GuildMember.js","path":"src/structures"}},{"name":"speaking","description":"Whether this member is speaking","type":[[["boolean"]]],"meta":{"line":91,"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":97,"file":"GuildMember.js","path":"src/structures"}},{"name":"joinedTimestamp","description":"The timestamp the member joined the guild at","type":[[["number"]]],"meta":{"line":103,"file":"GuildMember.js","path":"src/structures"}},{"name":"joinedAt","description":"The time the member joined the guild","readonly":true,"type":[[["Date"]]],"meta":{"line":114,"file":"GuildMember.js","path":"src/structures"}},{"name":"presence","description":"The presence of this guild member","readonly":true,"type":[[["Presence"]]],"meta":{"line":123,"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","<"],["Snowflake",", "],["Role",">"]]],"meta":{"line":132,"file":"GuildMember.js","path":"src/structures"}},{"name":"highestRole","description":"The role of the member with the highest position","readonly":true,"type":[[["Role"]]],"meta":{"line":151,"file":"GuildMember.js","path":"src/structures"}},{"name":"colorRole","description":"The role of the member used to set their color","readonly":true,"nullable":true,"type":[[["Role"]]],"meta":{"line":160,"file":"GuildMember.js","path":"src/structures"}},{"name":"displayColor","description":"The displayed color of the member in base 10","readonly":true,"type":[[["number"]]],"meta":{"line":171,"file":"GuildMember.js","path":"src/structures"}},{"name":"displayHexColor","description":"The displayed color of the member in hexadecimal","readonly":true,"type":[[["string"]]],"meta":{"line":181,"file":"GuildMember.js","path":"src/structures"}},{"name":"hoistRole","description":"The role of the member used to hoist them in a separate category in the users list","readonly":true,"nullable":true,"type":[[["Role"]]],"meta":{"line":191,"file":"GuildMember.js","path":"src/structures"}},{"name":"mute","description":"Whether this member is muted in any way","readonly":true,"type":[[["boolean"]]],"meta":{"line":202,"file":"GuildMember.js","path":"src/structures"}},{"name":"deaf","description":"Whether this member is deafened in any way","readonly":true,"type":[[["boolean"]]],"meta":{"line":211,"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":220,"file":"GuildMember.js","path":"src/structures"}},{"name":"id","description":"The ID of this user","readonly":true,"type":[[["Snowflake"]]],"meta":{"line":229,"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":238,"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":[[["Permissions"]]],"meta":{"line":247,"file":"GuildMember.js","path":"src/structures"}},{"name":"kickable","description":"Whether the member is kickable by the client user","readonly":true,"type":[[["boolean"]]],"meta":{"line":262,"file":"GuildMember.js","path":"src/structures"}},{"name":"bannable","description":"Whether the member is bannable by the client user","readonly":true,"type":[[["boolean"]]],"meta":{"line":275,"file":"GuildMember.js","path":"src/structures"}}],"methods":[{"name":"permissionsIn","description":"Returns `channel.permissionsFor(guildMember)`. Returns permissions for a member in a guild channel,\ntaking into account roles and permission overwrites.","params":[{"name":"channel","description":"The guild channel to use as context","type":[[["ChannelResolvable"]]]}],"returns":{"types":[[["Permissions"]]],"nullable":true},"meta":{"line":289,"file":"GuildMember.js","path":"src/structures"}},{"name":"hasPermission","description":"Checks if any of the member's roles have a permission.","params":[{"name":"permission","description":"Permission(s) to check for","type":[[["PermissionResolvable"]],[["Array","<"],["PermissionResolvable",">"]]]},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission\n**(deprecated)**","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"checkAdmin","description":"Whether to allow the administrator permission to override\n(takes priority over `explicit`)","optional":true,"type":[[["boolean"]]]},{"name":"checkOwner","description":"Whether to allow being the guild's owner to override\n(takes priority over `explicit`)","optional":true,"type":[[["boolean"]]]}],"returns":[[["boolean"]]],"meta":{"line":306,"file":"GuildMember.js","path":"src/structures"}},{"name":"hasPermissions","description":"Checks whether the roles of the member allows them to perform specific actions.","deprecated":true,"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":320,"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":331,"file":"GuildMember.js","path":"src/structures"}},{"name":"edit","description":"Edit a guild member.","examples":["// Set a member's nickname and clear their roles\nmessage.member.edit({\n nick: 'Cool Name',\n roles: []\n})\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"data","description":"The data to edit the member with","type":[[["GuildMemberEditData"]]]},{"name":"reason","description":"Reason for editing this user","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":359,"file":"GuildMember.js","path":"src/structures"}},{"name":"setMute","description":"Mute/unmute a user.","examples":["// Mute a member with a reason\nmessage.member.setMute(true, 'It needed to be done')\n .then(() => console.log(`Muted ${message.member.displayName}`)))\n .catch(console.error);"],"params":[{"name":"mute","description":"Whether or not the member should be muted","type":[[["boolean"]]]},{"name":"reason","description":"Reason for muting or unmuting","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":374,"file":"GuildMember.js","path":"src/structures"}},{"name":"setDeaf","description":"Deafen/undeafen a user.","examples":["// Deafen a member\nmessage.member.setDeaf(true)\n .then(() => console.log(`Deafened ${message.member.displayName}`))\n .catch(console.error);"],"params":[{"name":"deaf","description":"Whether or not the member should be deafened","type":[[["boolean"]]]},{"name":"reason","description":"Reason for deafening or undeafening","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":389,"file":"GuildMember.js","path":"src/structures"}},{"name":"setVoiceChannel","description":"Moves the guild member to the given channel.","examples":["// Moves a member to a voice channel\nmember.setVoiceChannel('174674066072928256')\n .then(() => console.log(`Moved ${member.displayName}`))\n .catch(console.error);"],"params":[{"name":"channel","description":"The channel to move the member to","type":[[["ChannelResolvable"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":403,"file":"GuildMember.js","path":"src/structures"}},{"name":"setRoles","description":"Sets the roles applied to the member.","examples":["// Set the member's roles to a single role\nguildMember.setRoles(['391156570408615936'])\n .then(console.log)\n .catch(console.error);","// Remove all of the member's roles\nguildMember.setRoles([])\n .then(member => console.log(`${member.displayName} now has ${member.roles.size} roles`))\n .catch(console.error);"],"params":[{"name":"roles","description":"The roles or role IDs to apply","type":[[["Collection","<"],["Snowflake",", "],["Role",">"]],[["Array","<"],["RoleResolvable",">"]]]},{"name":"reason","description":"Reason for applying the roles","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":423,"file":"GuildMember.js","path":"src/structures"}},{"name":"addRole","description":"Adds a single role to the member.","examples":["// Give a role to a member\nmessage.member.addRole('193654001089118208')\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"role","description":"The role or ID of the role to add","type":[[["RoleResolvable"]]]},{"name":"reason","description":"Reason for adding the role","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":438,"file":"GuildMember.js","path":"src/structures"}},{"name":"addRoles","description":"Adds multiple roles to the member.","examples":["// Gives a member a few roles\nmessage.member.addRoles(['193654001089118208', '369308579892690945'])\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"roles","description":"The roles or role IDs to add","type":[[["Collection","<"],["Snowflake",", "],["Role",">"]],[["Array","<"],["RoleResolvable",">"]]]},{"name":"reason","description":"Reason for adding the roles","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":455,"file":"GuildMember.js","path":"src/structures"}},{"name":"removeRole","description":"Removes a single role from the member.","examples":["// Remove a role from a member\nmessage.member.removeRole('193654001089118208')\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"role","description":"The role or ID of the role to remove","type":[[["RoleResolvable"]]]},{"name":"reason","description":"Reason for removing the role","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":477,"file":"GuildMember.js","path":"src/structures"}},{"name":"removeRoles","description":"Removes multiple roles from the member.","examples":["// Removes a few roles from the member\nmessage.member.removeRoles(['193654001089118208', '369308579892690945'])\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"roles","description":"The roles or role IDs to remove","type":[[["Collection","<"],["Snowflake",", "],["Role",">"]],[["Array","<"],["RoleResolvable",">"]]]},{"name":"reason","description":"Reason for removing the roles","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":494,"file":"GuildMember.js","path":"src/structures"}},{"name":"setNickname","description":"Set the nickname for the guild member.","examples":["// Update the member's nickname\nmessage.member.setNickname('Cool Name')\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"nick","description":"The nickname for the guild member","type":[[["string"]]]},{"name":"reason","description":"Reason for setting the nickname","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":521,"file":"GuildMember.js","path":"src/structures"}},{"name":"createDM","description":"Creates a DM channel between the client and the member.","returns":[[["Promise","<"],["DMChannel",">"]]],"meta":{"line":529,"file":"GuildMember.js","path":"src/structures"}},{"name":"deleteDM","description":"Deletes any DMs with this guild member.","returns":[[["Promise","<"],["DMChannel",">"]]],"meta":{"line":537,"file":"GuildMember.js","path":"src/structures"}},{"name":"kick","description":"Kick this member from the guild.","examples":["// Kick a member\nmember.kick()\n .then(() => console.log(`Kicked ${member.displayName}`))\n .catch(console.error);"],"params":[{"name":"reason","description":"Reason for kicking user","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":551,"file":"GuildMember.js","path":"src/structures"}},{"name":"ban","description":"Ban this guild member.","examples":["// Ban a guild member\nmember.ban(7)\n .then(() => console.log(`Banned ${member.displayName}`))\n .catch(console.error);"],"params":[{"name":"options","description":"Ban options. If a number, the number of days to delete messages for, if a\nstring, the ban reason. Supplying an object allows you to do both.","optional":true,"type":[[["Object"]],[["number"]],[["string"]]]},{"name":"options.days","description":"Number of days of messages to delete","optional":true,"default":0,"type":[[["number"]]]},{"name":"options.reason","description":"Reason for banning","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildMember",">"]]],"meta":{"line":568,"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":579,"file":"GuildMember.js","path":"src/structures"}},{"name":"send","description":"Send a message to this channel.","implements":["TextBasedChannel#send"],"examples":["// Send a basic message\nchannel.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);","// Send a remote file\nchannel.send({\n files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048']\n})\n .then(console.log)\n .catch(console.error);","// Send a local file\nchannel.send({\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);","// Send an embed with a local image inside\nchannel.send('This is an embed', {\n embed: {\n thumbnail: {\n url: 'attachment://file.jpg'\n }\n },\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message,\ncan also be just a RichEmbed or Attachment","optional":true,"type":[[["MessageOptions"]],[["Attachment"]],[["RichEmbed"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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);"],"deprecated":true,"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":486,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendEmbed","description":"Send an embed to this channel.","implements":["TextBasedChannel#sendEmbed"],"deprecated":true,"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":498,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendFile","description":"Send a file to this channel.","implements":["TextBasedChannel#sendFile"],"deprecated":true,"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":529,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendCode","description":"Send a code block to this channel.","implements":["TextBasedChannel#sendCode"],"deprecated":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":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":541,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}}],"meta":{"line":12,"file":"GuildMember.js","path":"src/structures"}},{"name":"Collector","description":"Abstract class for defining a new Collector.","abstract":true,"props":[{"name":"client","description":"The client","readonly":true,"type":[[["Client"]]],"meta":{"line":26,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"filter","description":"The filter applied to this collector","type":[[["CollectorFilter"]]],"meta":{"line":38,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"options","description":"The options of this collector","type":[[["CollectorOptions"]]],"meta":{"line":44,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"collected","description":"The items collected by this collector","type":[[["Collection"]]],"meta":{"line":50,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"ended","description":"Whether this collector has finished collecting","type":[[["boolean"]]],"meta":{"line":56,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"_timeout","description":"Timeout for cleanup","access":"private","nullable":true,"type":[[["Timeout"]]],"meta":{"line":63,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"listener","description":"Call this to handle an event as a collectable element\nAccepts any event data as parameters","access":"private","type":[[["function"]]],"meta":{"line":71,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"next","description":"Return a promise that resolves with the next collected element;\nrejects with collected elements if the collector finishes without receving a next element","readonly":true,"type":[[["Promise"]]],"meta":{"line":104,"file":"Collector.js","path":"src/structures/interfaces"}}],"methods":[{"name":"_handle","access":"private","emits":["Collector#event:collect"],"params":[{"name":"args","description":"The arguments emitted by the listener","variable":true,"type":[["*"]]}],"meta":{"line":80,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"stop","description":"Stop this collector and emit the `end` event.","emits":["Collector#event:end"],"params":[{"name":"reason","description":"The reason this collector is ending","optional":true,"default":"'user'","type":[[["string"]]]}],"meta":{"line":136,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"handle","description":"Handles incoming events from the `listener` function. Returns null if the event should not be collected,\nor returns an object describing the data that should be stored.","see":["Collector#listener"],"abstract":true,"params":[{"name":"args","description":"Any args the event listener emits","variable":true,"type":[["*"]]}],"returns":{"types":[[["Object"]]],"description":"Data to insert into collection, if any","nullable":true},"meta":{"line":161,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"postCheck","description":"This method runs after collection to see if the collector should finish.","abstract":true,"params":[{"name":"args","description":"Any args the event listener emits","variable":true,"type":[["*"]]}],"returns":{"types":[[["string"]]],"description":"Reason to end the collector, if any","nullable":true},"meta":{"line":169,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"cleanup","description":"Called when the collector is ending.","abstract":true,"meta":{"line":175,"file":"Collector.js","path":"src/structures/interfaces"}}],"events":[{"name":"collect","description":"Emitted whenever an element is collected.","params":[{"name":"element","description":"The element that got collected","type":[["*"]]},{"name":"collector","description":"The collector","type":[[["Collector"]]]}],"meta":{"line":86,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"end","description":"Emitted when the collector is finished collecting.","params":[{"name":"collected","description":"The elements collected by the collector","type":[[["Collection"]]]},{"name":"reason","description":"The reason the collector ended","type":[[["string"]]]}],"meta":{"line":143,"file":"Collector.js","path":"src/structures/interfaces"}}],"meta":{"line":22,"file":"Collector.js","path":"src/structures/interfaces"}},{"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":11,"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":28,"file":"Invite.js","path":"src/structures"}},{"name":"code","description":"The code for this invite","type":[[["string"]]],"meta":{"line":34,"file":"Invite.js","path":"src/structures"}},{"name":"presenceCount","description":"The approximate number of online members of the guild this invite is for","type":[[["number"]]],"meta":{"line":40,"file":"Invite.js","path":"src/structures"}},{"name":"memberCount","description":"The approximate total number of members of the guild this invite is for","type":[[["number"]]],"meta":{"line":46,"file":"Invite.js","path":"src/structures"}},{"name":"textChannelCount","description":"The number of text channels the guild this invite goes to has","type":[[["number"]]],"meta":{"line":52,"file":"Invite.js","path":"src/structures"}},{"name":"voiceChannelCount","description":"The number of voice channels the guild this invite goes to has","type":[[["number"]]],"meta":{"line":58,"file":"Invite.js","path":"src/structures"}},{"name":"temporary","description":"Whether or not this invite is temporary","type":[[["boolean"]]],"meta":{"line":64,"file":"Invite.js","path":"src/structures"}},{"name":"maxAge","description":"The maximum age of the invite, in seconds","nullable":true,"type":[[["number"]]],"meta":{"line":70,"file":"Invite.js","path":"src/structures"}},{"name":"uses","description":"How many times this invite has been used","type":[[["number"]]],"meta":{"line":76,"file":"Invite.js","path":"src/structures"}},{"name":"maxUses","description":"The maximum uses of this invite","type":[[["number"]]],"meta":{"line":82,"file":"Invite.js","path":"src/structures"}},{"name":"inviter","description":"The user who created this invite","type":[[["User"]]],"meta":{"line":89,"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":97,"file":"Invite.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the invite was created at","type":[[["number"]]],"meta":{"line":103,"file":"Invite.js","path":"src/structures"}},{"name":"createdAt","description":"The time the invite was created","readonly":true,"type":[[["Date"]]],"meta":{"line":111,"file":"Invite.js","path":"src/structures"}},{"name":"expiresTimestamp","description":"The timestamp the invite will expire at","readonly":true,"type":[[["number"]]],"meta":{"line":120,"file":"Invite.js","path":"src/structures"}},{"name":"expiresAt","description":"The time the invite will expire","readonly":true,"type":[[["Date"]]],"meta":{"line":129,"file":"Invite.js","path":"src/structures"}},{"name":"url","description":"The URL to the invite","readonly":true,"type":[[["string"]]],"meta":{"line":138,"file":"Invite.js","path":"src/structures"}}],"methods":[{"name":"delete","description":"Deletes this invite.","params":[{"name":"reason","description":"Reason for deleting this invite","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Invite",">"]]],"meta":{"line":147,"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":158,"file":"Invite.js","path":"src/structures"}}],"meta":{"line":9,"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":18,"file":"Message.js","path":"src/structures"}},{"name":"channel","description":"The channel that the message was sent in","type":[[["TextChannel"]],[["DMChannel"]],[["GroupDMChannel"]]],"meta":{"line":30,"file":"Message.js","path":"src/structures"}},{"name":"id","description":"The ID of the message","type":[[["Snowflake"]]],"meta":{"line":40,"file":"Message.js","path":"src/structures"}},{"name":"type","description":"The type of the message","type":[[["MessageType"]]],"meta":{"line":46,"file":"Message.js","path":"src/structures"}},{"name":"content","description":"The content of the message","type":[[["string"]]],"meta":{"line":52,"file":"Message.js","path":"src/structures"}},{"name":"author","description":"The author of the message","type":[[["User"]]],"meta":{"line":58,"file":"Message.js","path":"src/structures"}},{"name":"member","description":"Represents the author of the message as a guild member\nOnly available if the message comes from a guild where the author is still a member","nullable":true,"type":[[["GuildMember"]]],"meta":{"line":65,"file":"Message.js","path":"src/structures"}},{"name":"pinned","description":"Whether or not this message is pinned","type":[[["boolean"]]],"meta":{"line":71,"file":"Message.js","path":"src/structures"}},{"name":"tts","description":"Whether or not the message was Text-To-Speech","type":[[["boolean"]]],"meta":{"line":77,"file":"Message.js","path":"src/structures"}},{"name":"nonce","description":"A random number or string used for checking message delivery","type":[[["string"]]],"meta":{"line":83,"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":89,"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":95,"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","<"],["Snowflake",", "],["MessageAttachment",">"]]],"meta":{"line":101,"file":"Message.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the message was sent at","type":[[["number"]]],"meta":{"line":108,"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":114,"file":"Message.js","path":"src/structures"}},{"name":"reactions","description":"A collection of reactions to this message, mapped by the reaction ID","type":[[["Collection","<"],["Snowflake",", "],["MessageReaction",">"]]],"meta":{"line":120,"file":"Message.js","path":"src/structures"}},{"name":"mentions","description":"All valid mentions that the message contains","type":[[["MessageMentions"]]],"meta":{"line":132,"file":"Message.js","path":"src/structures"}},{"name":"webhookID","description":"ID of the webhook that sent the message, if applicable","nullable":true,"type":[[["Snowflake"]]],"meta":{"line":138,"file":"Message.js","path":"src/structures"}},{"name":"hit","description":"Whether this message is a hit in a search","nullable":true,"type":[[["boolean"]]],"meta":{"line":144,"file":"Message.js","path":"src/structures"}},{"name":"_edits","description":"The previous versions of the message, sorted with the most recent first","access":"private","type":[[["Array","<"],["Message",">"]]],"meta":{"line":151,"file":"Message.js","path":"src/structures"}},{"name":"createdAt","description":"The time the message was sent","readonly":true,"type":[[["Date"]]],"meta":{"line":190,"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":199,"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":208,"file":"Message.js","path":"src/structures"}},{"name":"cleanContent","description":"The message contents with all mentions replaced by the equivalent text.\nIf mentions cannot be resolved to a name, the relevant mention in the message content will not be converted.","readonly":true,"type":[[["string"]]],"meta":{"line":218,"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":301,"file":"Message.js","path":"src/structures"}},{"name":"editable","description":"Whether the message is editable by the client user","readonly":true,"type":[[["boolean"]]],"meta":{"line":312,"file":"Message.js","path":"src/structures"}},{"name":"deletable","description":"Whether the message is deletable by the client user","readonly":true,"type":[[["boolean"]]],"meta":{"line":321,"file":"Message.js","path":"src/structures"}},{"name":"pinnable","description":"Whether the message is pinnable by the client user","readonly":true,"type":[[["boolean"]]],"meta":{"line":332,"file":"Message.js","path":"src/structures"}}],"methods":[{"name":"patch","description":"Updates the message.","access":"private","params":[{"name":"data","description":"Raw Discord message update data","type":[[["Object"]]]}],"meta":{"line":159,"file":"Message.js","path":"src/structures"}},{"name":"createReactionCollector","description":"Creates a reaction collector.","examples":["// Create a reaction collector\nconst filter = (reaction, user) => reaction.emoji.name === '👌' && user.id === 'someID'\nconst collector = message.createReactionCollector(filter, { time: 15000 });\ncollector.on('collect', r => console.log(`Collected ${r.emoji.name}`));\ncollector.on('end', collected => console.log(`Collected ${collected.size} items`));"],"params":[{"name":"filter","description":"The filter to apply","type":[[["CollectorFilter"]]]},{"name":"options","description":"Options to send to the collector","optional":true,"default":"{}","type":[[["ReactionCollectorOptions"]]]}],"returns":[[["ReactionCollector"]]],"meta":{"line":262,"file":"Message.js","path":"src/structures"}},{"name":"awaitReactions","description":"Similar to createMessageCollector but in promise form.\nResolves with a collection of reactions that pass the specified filter.","examples":["// Create a reaction collector\nconst filter = (reaction, user) => reaction.emoji.name === '👌' && user.id === 'someID'\nmessage.awaitReactions(filter, { time: 15000 })\n .then(collected => console.log(`Collected ${collected.size} reactions`))\n .catch(console.error);"],"params":[{"name":"filter","description":"The filter function to use","type":[[["CollectorFilter"]]]},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"default":"{}","type":[[["AwaitReactionsOptions"]]]}],"returns":[[["Promise","<"],["Collection","<"],["string",", "],["MessageReaction",">>"]]],"meta":{"line":285,"file":"Message.js","path":"src/structures"}},{"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":343,"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":"The member/user to check for a mention of","type":[[["GuildMember"]],[["User"]]]}],"returns":[[["boolean"]]],"meta":{"line":354,"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(`New message content: ${msg}`))\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"]],[["RichEmbed"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":381,"file":"Message.js","path":"src/structures"}},{"name":"editCode","description":"Edit the content of the message, with a code block.","deprecated":true,"params":[{"name":"lang","description":"The language for the code block","type":[[["string"]]]},{"name":"content","description":"The new content for the message","type":[[["StringResolvable"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":399,"file":"Message.js","path":"src/structures"}},{"name":"pin","description":"Pins this message to the channel's pinned messages.","returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":408,"file":"Message.js","path":"src/structures"}},{"name":"unpin","description":"Unpins this message from the channel's pinned messages.","returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":416,"file":"Message.js","path":"src/structures"}},{"name":"react","description":"Add a reaction to the message.","examples":["// React to a message with a unicode emoji\nmessage.react('🤔')\n .then(console.log)\n .catch(console.error);","// React to a message with a custom emoji\nmessage.react(message.guild.emojis.get('123456789012345678'))\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"emoji","description":"The emoji to react with","type":[[["string"]],[["Emoji"]],[["ReactionEmoji"]]]}],"returns":[[["Promise","<"],["MessageReaction",">"]]],"meta":{"line":435,"file":"Message.js","path":"src/structures"}},{"name":"clearReactions","description":"Remove all reactions from a message.","returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":446,"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.username}`))\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":460,"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(sent => console.log(`Sent a reply to ${sent.author.username}`))\n .catch(console.error);"],"params":[{"name":"content","description":"The content for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"The options to provide","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":483,"file":"Message.js","path":"src/structures"}},{"name":"acknowledge","description":"Marks the message as read.\n<warn>This is only available when using a user account.</warn>","returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":498,"file":"Message.js","path":"src/structures"}},{"name":"fetchWebhook","description":"Fetches the webhook used to create this message.","returns":[[["Promise","<?"],["Webhook",">"]]],"meta":{"line":506,"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":519,"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":548,"file":"Message.js","path":"src/structures"}}],"meta":{"line":16,"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":[[["Snowflake"]]],"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 on a channel.","extends":["Collector"],"construct":{"name":"MessageCollector","params":[{"name":"channel","description":"The channel","type":[[["TextChannel"]],[["DMChannel"]],[["GroupDMChannel"]]]},{"name":"filter","description":"The filter to be applied to this collector","type":[[["CollectorFilter"]]]},{"name":"options","description":"The options to be applied to this collector","type":[[["MessageCollectorOptions"]]]}]},"props":[{"name":"channel","description":"The channel","type":[[["TextBasedChannel"]]],"meta":{"line":28,"file":"MessageCollector.js","path":"src/structures"}},{"name":"received","description":"Total number of messages that were received in the channel during message collection","type":[[["number"]]],"meta":{"line":34,"file":"MessageCollector.js","path":"src/structures"}},{"name":"client","description":"The client","readonly":true,"type":[[["Client"]]],"meta":{"line":26,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"filter","description":"The filter applied to this collector","type":[[["CollectorFilter"]]],"meta":{"line":38,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"options","description":"The options of this collector","type":[[["CollectorOptions"]]],"meta":{"line":44,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"collected","description":"The items collected by this collector","type":[[["Collection"]]],"meta":{"line":50,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"ended","description":"Whether this collector has finished collecting","type":[[["boolean"]]],"meta":{"line":56,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"_timeout","description":"Timeout for cleanup","access":"private","nullable":true,"type":[[["Timeout"]]],"meta":{"line":63,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"listener","description":"Call this to handle an event as a collectable element\nAccepts any event data as parameters","access":"private","type":[[["function"]]],"meta":{"line":71,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"next","description":"Return a promise that resolves with the next collected element;\nrejects with collected elements if the collector finishes without receving a next element","readonly":true,"type":[[["Promise"]]],"meta":{"line":104,"file":"Collector.js","path":"src/structures/interfaces"}}],"methods":[{"name":"handle","description":"Handle an incoming message for possible collection.","access":"private","params":[{"name":"message","description":"The message that could be collected","type":[[["Message"]]]}],"returns":{"types":[[["Object"]]],"nullable":true},"meta":{"line":67,"file":"MessageCollector.js","path":"src/structures"}},{"name":"postCheck","description":"Check after collection to see if the collector is done.","access":"private","returns":{"types":[[["string"]]],"description":"Reason to end the collector, if any","nullable":true},"meta":{"line":81,"file":"MessageCollector.js","path":"src/structures"}},{"name":"cleanup","description":"Removes event listeners.","access":"private","meta":{"line":92,"file":"MessageCollector.js","path":"src/structures"}},{"name":"_handle","access":"private","inherits":"Collector#_handle","inherited":true,"emits":["Collector#event:collect"],"params":[{"name":"args","description":"The arguments emitted by the listener","variable":true,"type":[["*"]]}],"meta":{"line":80,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"stop","description":"Stop this collector and emit the `end` event.","inherits":"Collector#stop","inherited":true,"emits":["Collector#event:end"],"params":[{"name":"reason","description":"The reason this collector is ending","optional":true,"default":"'user'","type":[[["string"]]]}],"meta":{"line":136,"file":"Collector.js","path":"src/structures/interfaces"}}],"events":[{"name":"message","description":"Emitted when the collector receives a message.","deprecated":true,"params":[{"name":"message","description":"The message","type":[[["Message"]]]}],"meta":{"line":42,"file":"MessageCollector.js","path":"src/structures"}},{"name":"collect","description":"Emitted whenever an element is collected.","params":[{"name":"element","description":"The element that got collected","type":[["*"]]},{"name":"collector","description":"The collector","type":[[["Collector"]]]}],"meta":{"line":86,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"end","description":"Emitted when the collector is finished collecting.","params":[{"name":"collected","description":"The elements collected by the collector","type":[[["Collection"]]]},{"name":"reason","description":"The reason the collector ended","type":[[["string"]]]}],"meta":{"line":143,"file":"Collector.js","path":"src/structures/interfaces"}}],"meta":{"line":14,"file":"MessageCollector.js","path":"src/structures"}},{"name":"MessageEmbed","description":"Represents an embed in a message (image/video preview, rich embed, etc.)\n<info>This class is only used for *recieved* embeds. If you wish to send one, use the {@link RichEmbed} class.</info>","props":[{"name":"client","description":"The client that instantiated this embed","readonly":true,"type":[[["Client"]]],"meta":{"line":7,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"message","description":"The message this embed is part of","type":[[["Message"]]],"meta":{"line":19,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"type","description":"The type of this embed","type":[[["string"]]],"meta":{"line":29,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"title","description":"The title of this embed","nullable":true,"type":[[["string"]]],"meta":{"line":35,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"description","description":"The description of this embed","nullable":true,"type":[[["string"]]],"meta":{"line":41,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"url","description":"The URL of this embed","type":[[["string"]]],"meta":{"line":47,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"color","description":"The color of the embed","type":[[["number"]]],"meta":{"line":53,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"fields","description":"The fields of this embed","type":[[["Array","<"],["MessageEmbedField",">"]]],"meta":{"line":59,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"timestamp","description":"The timestamp of this embed","type":[[["number"]]],"meta":{"line":66,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"thumbnail","description":"The thumbnail of this embed","nullable":true,"type":[[["MessageEmbedThumbnail"]]],"meta":{"line":72,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"image","description":"The image of this embed","nullable":true,"type":[[["MessageEmbedImage"]]],"meta":{"line":78,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"video","description":"The video of this embed","nullable":true,"type":[[["MessageEmbedVideo"]]],"meta":{"line":84,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"author","description":"The author of this embed","nullable":true,"type":[[["MessageEmbedAuthor"]]],"meta":{"line":90,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"provider","description":"The provider of this embed","nullable":true,"type":[[["MessageEmbedProvider"]]],"meta":{"line":96,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"footer","description":"The footer of this embed","nullable":true,"type":[[["MessageEmbedFooter"]]],"meta":{"line":102,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"createdAt","description":"The date this embed was created","readonly":true,"type":[[["Date"]]],"meta":{"line":110,"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":119,"file":"MessageEmbed.js","path":"src/structures"}}],"meta":{"line":5,"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":135,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"url","description":"The URL for this thumbnail","type":[[["string"]]],"meta":{"line":145,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"proxyURL","description":"The Proxy URL for this thumbnail","type":[[["string"]]],"meta":{"line":151,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"height","description":"The height of the thumbnail","type":[[["number"]]],"meta":{"line":157,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"width","description":"The width of the thumbnail","type":[[["number"]]],"meta":{"line":163,"file":"MessageEmbed.js","path":"src/structures"}}],"meta":{"line":129,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"MessageEmbedImage","description":"Represents an image for a message embed.","props":[{"name":"embed","description":"The embed this image is part of","type":[[["MessageEmbed"]]],"meta":{"line":176,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"url","description":"The URL for this image","type":[[["string"]]],"meta":{"line":186,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"proxyURL","description":"The Proxy URL for this image","type":[[["string"]]],"meta":{"line":192,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"height","description":"The height of the image","type":[[["number"]]],"meta":{"line":198,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"width","description":"The width of the image","type":[[["number"]]],"meta":{"line":204,"file":"MessageEmbed.js","path":"src/structures"}}],"meta":{"line":170,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"MessageEmbedVideo","description":"Represents a video for a message embed.","props":[{"name":"embed","description":"The embed this video is part of","type":[[["MessageEmbed"]]],"meta":{"line":217,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"url","description":"The source URL for this video","type":[[["string"]]],"meta":{"line":227,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"height","description":"The height of the video","type":[[["number"]]],"meta":{"line":233,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"width","description":"The width of the video","type":[[["number"]]],"meta":{"line":239,"file":"MessageEmbed.js","path":"src/structures"}}],"meta":{"line":211,"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":252,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"name","description":"The name of this provider","type":[[["string"]]],"meta":{"line":262,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"url","description":"The URL of this provider","type":[[["string"]]],"meta":{"line":268,"file":"MessageEmbed.js","path":"src/structures"}}],"meta":{"line":246,"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":281,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"name","description":"The name of this author","type":[[["string"]]],"meta":{"line":291,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"url","description":"The URL of this author","type":[[["string"]]],"meta":{"line":297,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"iconURL","description":"The icon URL of this author","type":[[["string"]]],"meta":{"line":303,"file":"MessageEmbed.js","path":"src/structures"}}],"meta":{"line":275,"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":316,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"name","description":"The name of this field","type":[[["string"]]],"meta":{"line":326,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"value","description":"The value of this field","type":[[["string"]]],"meta":{"line":332,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"inline","description":"If this field is displayed inline","type":[[["boolean"]]],"meta":{"line":338,"file":"MessageEmbed.js","path":"src/structures"}}],"meta":{"line":310,"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":351,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"text","description":"The text in this footer","type":[[["string"]]],"meta":{"line":361,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"iconURL","description":"The icon URL of this footer","type":[[["string"]]],"meta":{"line":367,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"proxyIconUrl","description":"The proxy icon URL of this footer","type":[[["string"]]],"meta":{"line":373,"file":"MessageEmbed.js","path":"src/structures"}}],"meta":{"line":345,"file":"MessageEmbed.js","path":"src/structures"}},{"name":"MessageMentions","description":"Keeps track of mentions in a {@link Message}.","props":[{"name":"everyone","description":"Whether `@everyone` or `@here` were mentioned","type":[[["boolean"]]],"meta":{"line":12,"file":"MessageMentions.js","path":"src/structures"}},{"name":"users","description":"Any users that were mentioned","type":[[["Collection","<"],["Snowflake",", "],["User",">"]]],"meta":{"line":20,"file":"MessageMentions.js","path":"src/structures"}},{"name":"roles","description":"Any roles that were mentioned","type":[[["Collection","<"],["Snowflake",", "],["Role",">"]]],"meta":{"line":39,"file":"MessageMentions.js","path":"src/structures"}},{"name":"_content","description":"Content of the message","access":"private","type":[[["Message"]]],"meta":{"line":56,"file":"MessageMentions.js","path":"src/structures"}},{"name":"_client","description":"The client the message is from","access":"private","type":[[["Client"]]],"meta":{"line":63,"file":"MessageMentions.js","path":"src/structures"}},{"name":"_guild","description":"The guild the message is in","access":"private","nullable":true,"type":[[["Guild"]]],"meta":{"line":70,"file":"MessageMentions.js","path":"src/structures"}},{"name":"_members","description":"Cached members for {@MessageMention#members}","access":"private","nullable":true,"type":[[["Collection","<"],["Snowflake",", "],["GuildMember",">"]]],"meta":{"line":77,"file":"MessageMentions.js","path":"src/structures"}},{"name":"_channels","description":"Cached channels for {@MessageMention#channels}","access":"private","nullable":true,"type":[[["Collection","<"],["Snowflake",", "],["GuildChannel",">"]]],"meta":{"line":84,"file":"MessageMentions.js","path":"src/structures"}},{"name":"members","description":"Any members that were mentioned (only in {@link TextChannel}s)","readonly":true,"nullable":true,"type":[[["Collection","<"],["Snowflake",", "],["GuildMember",">"]]],"meta":{"line":92,"file":"MessageMentions.js","path":"src/structures"}},{"name":"channels","description":"Any channels that were mentioned","readonly":true,"type":[[["Collection","<"],["Snowflake",", "],["GuildChannel",">"]]],"meta":{"line":108,"file":"MessageMentions.js","path":"src/structures"}},{"name":"EVERYONE_PATTERN","description":"Regular expression that globally matches `@everyone` and `@here`","scope":"static","type":[[["RegExp"]]],"meta":{"line":124,"file":"MessageMentions.js","path":"src/structures"}},{"name":"USERS_PATTERN","description":"Regular expression that globally matches user mentions like `<@81440962496172032>`","scope":"static","type":[[["RegExp"]]],"meta":{"line":130,"file":"MessageMentions.js","path":"src/structures"}},{"name":"ROLES_PATTERN","description":"Regular expression that globally matches role mentions like `<@&297577916114403338>`","scope":"static","type":[[["RegExp"]]],"meta":{"line":136,"file":"MessageMentions.js","path":"src/structures"}},{"name":"CHANNELS_PATTERN","description":"Regular expression that globally matches channel mentions like `<#222079895583457280>`","scope":"static","type":[[["RegExp"]]],"meta":{"line":142,"file":"MessageMentions.js","path":"src/structures"}}],"meta":{"line":6,"file":"MessageMentions.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","<"],["Snowflake",", "],["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()`","readonly":true,"type":[[["Emoji"]],[["ReactionEmoji"]]],"meta":{"line":44,"file":"MessageReaction.js","path":"src/structures"}}],"methods":[{"name":"remove","description":"Removes a user from this reaction.","params":[{"name":"user","description":"The user to remove the reaction of","optional":true,"default":"this.message.client.user","type":[[["UserResolvable"]]]}],"returns":[[["Promise","<"],["MessageReaction",">"]]],"meta":{"line":63,"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"]]]},{"name":"options","description":"Options to fetch users","optional":true,"type":[[["Object"]]]},{"name":"options.before","description":"Limit fetching users to those with an id lower than the supplied id","optional":true,"type":[[["Snowflake"]]]},{"name":"options.after","description":"Limit fetching users to those with an id greater than the supplied id","optional":true,"type":[[["Snowflake"]]]}],"returns":[[["Promise","<"],["Collection","<"],["Snowflake",", "],["User",">>"]]],"meta":{"line":80,"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":8,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"id","description":"The ID of the app","type":[[["Snowflake"]]],"meta":{"line":24,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"name","description":"The name of the app","type":[[["string"]]],"meta":{"line":30,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"description","description":"The app's description","type":[[["string"]]],"meta":{"line":36,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"icon","description":"The app's icon hash","nullable":true,"type":[[["string"]]],"meta":{"line":42,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"iconURL","description":"The app's icon URL","type":[[["string"]]],"meta":{"line":48,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"rpcOrigins","description":"The app's RPC origins","nullable":true,"type":[[["Array","<"],["string",">"]]],"meta":{"line":54,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"redirectURIs","description":"The app's redirect URIs","type":[[["Array","<"],["string",">"]]],"meta":{"line":60,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"botRequireCodeGrant","description":"If this app's bot requires a code grant when using the OAuth2 flow","type":[[["boolean"]]],"meta":{"line":66,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"botPublic","description":"If this app's bot is public","type":[[["boolean"]]],"meta":{"line":72,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"rpcApplicationState","description":"If this app can use rpc","type":[[["boolean"]]],"meta":{"line":78,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"bot","description":"Object containing basic info about this app's bot","type":[[["Object"]]],"meta":{"line":84,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"flags","description":"The flags for the app","type":[[["number"]]],"meta":{"line":90,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"secret","description":"OAuth2 secret for the application","type":[[["boolean"]]],"meta":{"line":96,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"owner","description":"The owner of this OAuth application","nullable":true,"type":[[["User"]]],"meta":{"line":103,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the app was created at","readonly":true,"type":[[["number"]]],"meta":{"line":112,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"createdAt","description":"The time the app was created","readonly":true,"type":[[["Date"]]],"meta":{"line":121,"file":"OAuth2Application.js","path":"src/structures"}}],"methods":[{"name":"reset","description":"Reset the app's secret and bot token.\n<warn>This is only available when using a user account.</warn>","returns":[[["OAuth2Application"]]],"meta":{"line":130,"file":"OAuth2Application.js","path":"src/structures"}},{"name":"toString","description":"When concatenated with a string, this automatically concatenates the app name rather than the app object.","returns":[[["string"]]],"meta":{"line":138,"file":"OAuth2Application.js","path":"src/structures"}}],"meta":{"line":6,"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":[[["Snowflake"]]],"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","nullable":true,"type":[[["string"]]],"meta":{"line":41,"file":"PartialGuild.js","path":"src/structures"}},{"name":"splash","description":"The hash of the guild splash image (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":[[["Snowflake"]]],"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":[[["Snowflake"]]],"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.","params":[{"name":"reason","description":"Reason for deleting this overwrite","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["PermissionOverwrites",">"]]],"meta":{"line":39,"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","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":"The 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":"The 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":"ReactionCollector","description":"Collects reactions on messages.","extends":["Collector"],"construct":{"name":"ReactionCollector","params":[{"name":"message","description":"The message upon which to collect reactions","type":[[["Message"]]]},{"name":"filter","description":"The filter to apply to this collector","type":[[["CollectorFilter"]]]},{"name":"options","description":"The options to apply to this collector","optional":true,"default":"{}","type":[[["ReactionCollectorOptions"]]]}]},"props":[{"name":"message","description":"The message","type":[[["Message"]]],"meta":{"line":28,"file":"ReactionCollector.js","path":"src/structures"}},{"name":"users","description":"The users which have reacted","type":[[["Collection"]]],"meta":{"line":34,"file":"ReactionCollector.js","path":"src/structures"}},{"name":"total","description":"The total number of reactions collected","type":[[["number"]]],"meta":{"line":40,"file":"ReactionCollector.js","path":"src/structures"}},{"name":"client","description":"The client","readonly":true,"type":[[["Client"]]],"meta":{"line":26,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"filter","description":"The filter applied to this collector","type":[[["CollectorFilter"]]],"meta":{"line":38,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"options","description":"The options of this collector","type":[[["CollectorOptions"]]],"meta":{"line":44,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"collected","description":"The items collected by this collector","type":[[["Collection"]]],"meta":{"line":50,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"ended","description":"Whether this collector has finished collecting","type":[[["boolean"]]],"meta":{"line":56,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"_timeout","description":"Timeout for cleanup","access":"private","nullable":true,"type":[[["Timeout"]]],"meta":{"line":63,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"listener","description":"Call this to handle an event as a collectable element\nAccepts any event data as parameters","access":"private","type":[[["function"]]],"meta":{"line":71,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"next","description":"Return a promise that resolves with the next collected element;\nrejects with collected elements if the collector finishes without receving a next element","readonly":true,"type":[[["Promise"]]],"meta":{"line":104,"file":"Collector.js","path":"src/structures/interfaces"}}],"methods":[{"name":"handle","description":"Handle an incoming reaction for possible collection.","access":"private","params":[{"name":"reaction","description":"The reaction to possibly collect","type":[[["MessageReaction"]]]}],"returns":{"types":[[["Object"]]],"nullable":true},"meta":{"line":51,"file":"ReactionCollector.js","path":"src/structures"}},{"name":"postCheck","description":"Check after collection to see if the collector is done.","access":"private","params":[{"name":"reaction","description":"The reaction that was collected","type":[[["MessageReaction"]]]},{"name":"user","description":"The user that reacted","type":[[["User"]]]}],"returns":{"types":[[["string"]]],"description":"Reason to end the collector, if any","nullable":true},"meta":{"line":66,"file":"ReactionCollector.js","path":"src/structures"}},{"name":"cleanup","description":"Remove event listeners.","access":"private","meta":{"line":78,"file":"ReactionCollector.js","path":"src/structures"}},{"name":"_handle","access":"private","inherits":"Collector#_handle","inherited":true,"emits":["Collector#event:collect"],"params":[{"name":"args","description":"The arguments emitted by the listener","variable":true,"type":[["*"]]}],"meta":{"line":80,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"stop","description":"Stop this collector and emit the `end` event.","inherits":"Collector#stop","inherited":true,"emits":["Collector#event:end"],"params":[{"name":"reason","description":"The reason this collector is ending","optional":true,"default":"'user'","type":[[["string"]]]}],"meta":{"line":136,"file":"Collector.js","path":"src/structures/interfaces"}}],"events":[{"name":"collect","description":"Emitted whenever an element is collected.","params":[{"name":"element","description":"The element that got collected","type":[["*"]]},{"name":"collector","description":"The collector","type":[[["Collector"]]]}],"meta":{"line":86,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"end","description":"Emitted when the collector is finished collecting.","params":[{"name":"collected","description":"The elements collected by the collector","type":[[["Collection"]]]},{"name":"reason","description":"The reason the collector ended","type":[[["string"]]]}],"meta":{"line":143,"file":"Collector.js","path":"src/structures/interfaces"}}],"meta":{"line":15,"file":"ReactionCollector.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","nullable":true,"type":[[["Snowflake"]]],"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.send(`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 with a fluent interface for creation.","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":14,"file":"RichEmbed.js","path":"src/structures"}},{"name":"description","description":"Description for this Embed","type":[[["string"]]],"meta":{"line":20,"file":"RichEmbed.js","path":"src/structures"}},{"name":"url","description":"URL for this Embed","type":[[["string"]]],"meta":{"line":26,"file":"RichEmbed.js","path":"src/structures"}},{"name":"color","description":"Color for this Embed","type":[[["number"]]],"meta":{"line":32,"file":"RichEmbed.js","path":"src/structures"}},{"name":"author","description":"Author for this Embed","type":[[["Object"]]],"meta":{"line":38,"file":"RichEmbed.js","path":"src/structures"}},{"name":"timestamp","description":"Timestamp for this Embed","type":[[["Date"]]],"meta":{"line":44,"file":"RichEmbed.js","path":"src/structures"}},{"name":"fields","description":"Fields for this Embed","type":[[["Array","<"],["Object",">"]]],"meta":{"line":50,"file":"RichEmbed.js","path":"src/structures"}},{"name":"thumbnail","description":"Thumbnail for this Embed","type":[[["Object"]]],"meta":{"line":56,"file":"RichEmbed.js","path":"src/structures"}},{"name":"image","description":"Image for this Embed","type":[[["Object"]]],"meta":{"line":62,"file":"RichEmbed.js","path":"src/structures"}},{"name":"footer","description":"Footer for this Embed","type":[[["Object"]]],"meta":{"line":68,"file":"RichEmbed.js","path":"src/structures"}},{"name":"file","description":"File to upload alongside this Embed","type":[[["FileOptions"]],[["string"]],[["Attachment"]]],"meta":{"line":74,"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":82,"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":94,"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":106,"file":"RichEmbed.js","path":"src/structures"}},{"name":"setColor","description":"Sets the color of this embed.","params":[{"name":"color","description":"The color of the embed","type":[[["ColorResolvable"]]]}],"returns":{"types":[[["RichEmbed"]]],"description":"This embed"},"meta":{"line":116,"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":129,"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":139,"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":151,"file":"RichEmbed.js","path":"src/structures"}},{"name":"addBlankField","description":"Convenience function for `<RichEmbed>.addField('\\u200B', '\\u200B', inline)`.","params":[{"name":"inline","description":"Set the field to display inline","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":{"types":[[["RichEmbed"]]],"description":"This embed"},"meta":{"line":168,"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":177,"file":"RichEmbed.js","path":"src/structures"}},{"name":"setImage","description":"Set the image of this embed.","params":[{"name":"url","description":"The URL of the image","type":[[["string"]]]}],"returns":{"types":[[["RichEmbed"]]],"description":"This embed"},"meta":{"line":187,"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":198,"file":"RichEmbed.js","path":"src/structures"}},{"name":"attachFile","description":"Sets the file to upload alongside the embed. This file can be accessed via `attachment://fileName.extension` when\nsetting an embed image or author/footer icons. Only one file may be attached.","params":[{"name":"file","description":"Local path or URL to the file to attach,\nor valid FileOptions for a file to attach","type":[[["FileOptions"]],[["string"]],[["Attachment"]]]}],"returns":{"types":[[["RichEmbed"]]],"description":"This embed"},"meta":{"line":212,"file":"RichEmbed.js","path":"src/structures"}}],"meta":{"line":8,"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":10,"file":"Role.js","path":"src/structures"}},{"name":"guild","description":"The guild that the role belongs to","type":[[["Guild"]]],"meta":{"line":22,"file":"Role.js","path":"src/structures"}},{"name":"id","description":"The ID of the role (unique to the guild it is part of)","type":[[["Snowflake"]]],"meta":{"line":32,"file":"Role.js","path":"src/structures"}},{"name":"name","description":"The name of the role","type":[[["string"]]],"meta":{"line":38,"file":"Role.js","path":"src/structures"}},{"name":"color","description":"The base 10 color of the role","type":[[["number"]]],"meta":{"line":44,"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":50,"file":"Role.js","path":"src/structures"}},{"name":"position","description":"The position of the role from the API","type":[[["number"]]],"meta":{"line":56,"file":"Role.js","path":"src/structures"}},{"name":"permissions","description":"The permissions bitfield of the role","type":[[["number"]]],"meta":{"line":62,"file":"Role.js","path":"src/structures"}},{"name":"managed","description":"Whether or not the role is managed by an external service","type":[[["boolean"]]],"meta":{"line":68,"file":"Role.js","path":"src/structures"}},{"name":"mentionable","description":"Whether or not the role can be mentioned by anyone","type":[[["boolean"]]],"meta":{"line":74,"file":"Role.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the role was created at","readonly":true,"type":[[["number"]]],"meta":{"line":82,"file":"Role.js","path":"src/structures"}},{"name":"createdAt","description":"The time the role was created","readonly":true,"type":[[["Date"]]],"meta":{"line":91,"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":100,"file":"Role.js","path":"src/structures"}},{"name":"members","description":"The cached guild members that have this role","readonly":true,"type":[[["Collection","<"],["Snowflake",", "],["GuildMember",">"]]],"meta":{"line":111,"file":"Role.js","path":"src/structures"}},{"name":"editable","description":"Whether the role is editable by the client user","readonly":true,"type":[[["boolean"]]],"meta":{"line":120,"file":"Role.js","path":"src/structures"}},{"name":"calculatedPosition","description":"The position of the role in the role manager","readonly":true,"type":[[["number"]]],"meta":{"line":132,"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 permissions\nconsole.log(role.serialize());"],"returns":[[["Object","<"],["string",", "],["boolean",">"]]],"meta":{"line":144,"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":"Permission(s) to check for","type":[[["PermissionResolvable"]],[["Array","<"],["PermissionResolvable",">"]]]},{"name":"explicit","description":"Whether to require the role to explicitly have the exact permission\n**(deprecated)**","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"checkAdmin","description":"Whether to allow the administrator permission to override\n(takes priority over `explicit`)","optional":true,"type":[[["boolean"]]]}],"returns":[[["boolean"]]],"meta":{"line":164,"file":"Role.js","path":"src/structures"}},{"name":"hasPermissions","description":"Checks if the role has all specified permissions.","deprecated":true,"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":177,"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":187,"file":"Role.js","path":"src/structures"}},{"name":"edit","description":"Edits the role.","examples":["// Edit name of a role\nrole.edit({ name: 'New Name' })\n .then(updated => console.log(`Edited role name from ${role.name} to ${updated.name}`))\n .catch(console.error);"],"params":[{"name":"data","description":"The new data for the role","type":[[["RoleData"]]]},{"name":"reason","description":"The reason for editing this role","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":213,"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 Name')\n .then(updated => console.log(`Edited role name from ${role.name} to ${updated.name}`))\n .catch(console.error);"],"params":[{"name":"name","description":"The new name of the role","type":[[["string"]]]},{"name":"reason","description":"Reason for changing the role's name","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":228,"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(updated => console.log(`Set color of role to ${role.color}`))\n .catch(console.error);"],"params":[{"name":"color","description":"The color of the role","type":[[["ColorResolvable"]]]},{"name":"reason","description":"Reason for changing the role's color","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":243,"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(updated => console.log(`Role hoisted: ${updated.hoist}`))\n .catch(console.error);"],"params":[{"name":"hoist","description":"Whether or not to hoist the role","type":[[["boolean"]]]},{"name":"reason","description":"Reason for setting whether or not the role should be hoisted","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":258,"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(updated => console.log(`Role position: ${updated.position}`))\n .catch(console.error);"],"params":[{"name":"position","description":"The position of the role","type":[[["number"]]]},{"name":"relative","description":"Move the position relative to its current value","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":273,"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(updated => console.log(`Updated permissions to ${updated.permissions.bitfield}`))\n .catch(console.error);"],"params":[{"name":"permissions","description":"The permissions of the role","type":[[["Array","<"],["string",">"]]]},{"name":"reason","description":"Reason for changing the role's permissions","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":288,"file":"Role.js","path":"src/structures"}},{"name":"setMentionable","description":"Set whether this role is mentionable.","examples":["// Make the role mentionable\nrole.setMentionable(true, 'Role needs to be pinged')\n .then(updated => console.log(`Role mentionable: ${updated.mentionable}`))\n .catch(console.error);"],"params":[{"name":"mentionable","description":"Whether this role should be mentionable","type":[[["boolean"]]]},{"name":"reason","description":"Reason for setting whether or not this role should be mentionable","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":303,"file":"Role.js","path":"src/structures"}},{"name":"delete","description":"Deletes the role.","examples":["// Delete a role\nrole.delete('The role needed to go')\n .then(deleted => console.log(`Deleted role ${deleted.name}`))\n .catch(console.error);"],"params":[{"name":"reason","description":"Reason for deleting the role","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Role",">"]]],"meta":{"line":317,"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":328,"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":343,"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":355,"file":"Role.js","path":"src/structures"}}],"meta":{"line":8,"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","nullable":true,"type":[[["string"]]],"meta":{"line":25,"file":"TextChannel.js","path":"src/structures"}},{"name":"nsfw","description":"If the Discord considers this channel NSFW","readonly":true,"type":[[["boolean"]]],"meta":{"line":32,"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","<"],["Snowflake",", "],["GuildMember",">"]]],"meta":{"line":42,"file":"TextChannel.js","path":"src/structures"}},{"name":"typing","description":"Whether or not the typing indicator is being shown in the channel","readonly":true,"type":[[["boolean"]]],"meta":{"line":351,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"typingCount","description":"Number of times `startTyping` has been called","readonly":true,"type":[[["number"]]],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":"parentID","description":"The ID of the category parent of this channel","nullable":true,"type":[[["Snowflake"]]],"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users","type":[[["Collection","<"],["Snowflake",", "],["PermissionOverwrites",">"]]],"meta":{"line":48,"file":"GuildChannel.js","path":"src/structures"}},{"name":"calculatedPosition","description":"The position of the channel","readonly":true,"type":[[["number"]]],"meta":{"line":61,"file":"GuildChannel.js","path":"src/structures"}},{"name":"parent","description":"The category parent of this channel","readonly":true,"nullable":true,"type":[[["CategoryChannel"]]],"meta":{"line":71,"file":"GuildChannel.js","path":"src/structures"}},{"name":"deletable","description":"Whether the channel is deletable by the client user","readonly":true,"type":[[["boolean"]]],"meta":{"line":378,"file":"GuildChannel.js","path":"src/structures"}},{"name":"muted","description":"Whether the channel is muted\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["boolean"]]],"meta":{"line":389,"file":"GuildChannel.js","path":"src/structures"}},{"name":"messageNotifications","description":"The type of message that should notify you\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["MessageNotificationType"]]],"meta":{"line":404,"file":"GuildChannel.js","path":"src/structures"}}],"methods":[{"name":"fetchWebhooks","description":"Fetch all webhooks for the channel.","returns":[[["Promise","<"],["Collection","<"],["Snowflake",", "],["Webhook",">>"]]],"meta":{"line":56,"file":"TextChannel.js","path":"src/structures"}},{"name":"createWebhook","description":"Create a webhook for the channel.","examples":["channel.createWebhook('Snek', 'https://i.imgur.com/mI8XcpG.jpg')\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","optional":true,"type":[[["BufferResolvable"]],[["Base64Resolvable"]]]},{"name":"reason","description":"Reason for creating this webhook","optional":true,"type":[[["string"]]]}],"returns":{"types":[[["Promise","<"],["Webhook",">"]]],"description":"webhook The created webhook"},"meta":{"line":71,"file":"TextChannel.js","path":"src/structures"}},{"name":"send","description":"Send a message to this channel.","implements":["TextBasedChannel#send"],"examples":["// Send a basic message\nchannel.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);","// Send a remote file\nchannel.send({\n files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048']\n})\n .then(console.log)\n .catch(console.error);","// Send a local file\nchannel.send({\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);","// Send an embed with a local image inside\nchannel.send('This is an embed', {\n embed: {\n thumbnail: {\n url: 'attachment://file.jpg'\n }\n },\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message,\ncan also be just a RichEmbed or Attachment","optional":true,"type":[[["MessageOptions"]],[["Attachment"]],[["RichEmbed"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not. Since the single message fetching\nendpoint is reserved for bot accounts, this abstracts the `fetchMessages` method to obtain the single message when\nusing a user account.","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":[[["Snowflake"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":176,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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","<"],["Snowflake",", "],["Message",">>"]]],"meta":{"line":211,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"fetchPinnedMessages","description":"Fetches the pinned messages of this channel and returns a collection of them.","implements":["TextBasedChannel#fetchPinnedMessages"],"returns":[[["Promise","<"],["Collection","<"],["Snowflake",", "],["Message",">>"]]],"meta":{"line":227,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"search","description":"Performs a search within the channel.\n<warn>This is only available when using a user account.</warn>","implements":["TextBasedChannel#search"],"examples":["channel.search({\n content: 'discord.js',\n before: '2016-11-17'\n}).then(res => {\n const hit = res.messages[0].find(m => m.hit).content;\n console.log(`I found: **${hit}**, total results: ${res.totalResults}`);\n}).catch(console.error);"],"params":[{"name":"options","description":"Options to pass to the search","optional":true,"default":"{}","type":[[["MessageSearchOptions"]]]}],"returns":[[["Promise","<"],["MessageSearchResult",">"]]],"meta":{"line":288,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":299,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":["// Reduce the typing count by one and stop typing if it reached 0\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":335,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"createCollector","description":"Creates a Message Collector","implements":["TextBasedChannel#createCollector"],"deprecated":true,"params":[{"name":"filter","description":"The filter to create the collector with","type":[[["CollectorFilter"]]]},{"name":"options","description":"The options to pass to the collector","optional":true,"default":"{}","type":[[["MessageCollectorOptions"]]]}],"returns":[[["MessageCollector"]]],"meta":{"line":372,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"createMessageCollector","description":"Creates a Message Collector.","implements":["TextBasedChannel#createMessageCollector"],"examples":["// Create a message collector\nconst filter = m => m.content.includes('discord');\nconst collector = channel.createMessageCollector(filter, { time: 15000 });\ncollector.on('collect', 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":[[["CollectorFilter"]]]},{"name":"options","description":"The options to pass to the collector","optional":true,"default":"{}","type":[[["MessageCollectorOptions"]]]}],"returns":[[["MessageCollector"]]],"meta":{"line":388,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":[[["CollectorFilter"]]]},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"default":"{}","type":[[["AwaitMessagesOptions"]]]}],"returns":[[["Promise","<"],["Collection","<"],["Snowflake",", "],["Message",">>"]]],"meta":{"line":412,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"bulkDelete","description":"Bulk delete given messages that are newer than two weeks.\n<warn>This is only available when using a bot account.</warn>","implements":["TextBasedChannel#bulkDelete"],"examples":["// Bulk delete messages\nchannel.bulkDelete(5)\n .then(messages => console.log(`Bulk deleted ${messages.size} messages`))\n .catch(console.error);"],"params":[{"name":"messages","description":"Messages or number of messages to delete","type":[[["Collection","<"],["Snowflake",", "],["Message",">"]],[["Array","<"],["Message",">"]],[["number"]]]},{"name":"filterOld","description":"Filter messages to remove those which are older than two weeks automatically","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":{"types":[[["Promise","<"],["Collection","<"],["Snowflake",", "],["Message",">>"]]],"description":"Deleted messages"},"meta":{"line":437,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"acknowledge","description":"Marks all messages in this channel as read.\n<warn>This is only available when using a user account.</warn>","implements":["TextBasedChannel#acknowledge"],"returns":[[["Promise","<("],["TextChannel","|"],["GroupDMChannel","|"],["DMChannel",")>"]]],"meta":{"line":458,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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);"],"deprecated":true,"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":486,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendEmbed","description":"Send an embed to this channel.","implements":["TextBasedChannel#sendEmbed"],"deprecated":true,"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":498,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendFiles","description":"Send files to this channel.","implements":["TextBasedChannel#sendFiles"],"deprecated":true,"params":[{"name":"files","description":"Files to send with the message","type":[[["Array","<"],["FileOptions",">"]],[["Array","<"],["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":516,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendFile","description":"Send a file to this channel.","implements":["TextBasedChannel#sendFile"],"deprecated":true,"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":529,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendCode","description":"Send a code block to this channel.","implements":["TextBasedChannel#sendCode"],"deprecated":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":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":541,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":[[["Permissions"]]],"nullable":true},"meta":{"line":81,"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(updated => console.log(updated.permissionOverwrites.get(message.author.id)))\n .catch(console.error);"],"params":[{"name":"userOrRole","description":"The user or role to update","type":[[["Role"]],[["Snowflake"]],[["UserResolvable"]]]},{"name":"options","description":"The configuration for the update","type":[[["PermissionOverwriteOptions"]]]},{"name":"reason","description":"Reason for creating/editing this overwrite","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":167,"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(console.log)\n .catch(console.error);"],"params":[{"name":"data","description":"The new data for the channel","type":[[["ChannelData"]]]},{"name":"reason","description":"Reason for editing this channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":230,"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"]]]},{"name":"reason","description":"Reason for changing the guild channel's name","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":245,"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"]]]},{"name":"relative","description":"Move the position relative to its current value","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":260,"file":"GuildChannel.js","path":"src/structures"}},{"name":"setParent","description":"Set a new parent for the guild channel.","inherits":"GuildChannel#setParent","inherited":true,"examples":["// Sets the parent of a channel\nchannel.setParent('174674066072928256')\n .then(updated => console.log(`Set the category of ${updated.name} to ${updated.parent.name}`))\n .catch(console.error);"],"params":[{"name":"parent","description":"The new parent for the guild channel","type":[[["CategoryChannel"]],[["SnowFlake"]]]},{"name":"reason","description":"Reason for changing the guild channel's parent","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":275,"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(updated => console.log(`Channel's new topic is ${updated.topic}`))\n .catch(console.error);"],"params":[{"name":"topic","description":"The new topic for the guild channel","type":[[["string"]]]},{"name":"reason","description":"Reason for changing the guild channel's topic","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":291,"file":"GuildChannel.js","path":"src/structures"}},{"name":"createInvite","description":"Create an invite to this guild channel.\n<warn>This is only available when using a bot account.</warn>","inherits":"GuildChannel#createInvite","inherited":true,"examples":["// Create an invite to a channel\nchannel.createInvite()\n .then(invite => console.log(`Created an invite with a code of ${invite.code}`))\n .catch(console.error);"],"params":[{"name":"options","description":"Options for the invite","optional":true,"default":"{}","type":[[["Object"]]]},{"name":"options.temporary","description":"Whether members that joined via the invite should be automatically\nkicked after 24 hours if they have not yet received a role","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"options.maxAge","description":"How long the invite should last (in seconds, 0 for forever)","optional":true,"default":86400,"type":[[["number"]]]},{"name":"options.maxUses","description":"Maximum number of uses","optional":true,"default":0,"type":[[["number"]]]},{"name":"options.unique","description":"Create a unique invite, or use an existing one with similar settings","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"reason","description":"Reason for creating the invite","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Invite",">"]]],"meta":{"line":312,"file":"GuildChannel.js","path":"src/structures"}},{"name":"clone","description":"Clone this channel.","inherits":"GuildChannel#clone","inherited":true,"examples":["// Clone a channel\nchannel.clone(undefined, true, false, 'Needed a clone')\n .then(clone => console.log(`Cloned ${channel.name} to make a channel called ${clone.name}`))\n .catch(console.error);"],"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"]]]},{"name":"withTopic","description":"Whether to clone the channel with this channel's topic","optional":true,"default":true,"type":[[["boolean"]]]},{"name":"reason","description":"Reason for cloning this channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":329,"file":"GuildChannel.js","path":"src/structures"}},{"name":"delete","description":"Deletes this channel.","inherits":"GuildChannel#delete","inherited":true,"examples":["// Delete the channel\nchannel.delete('Making room for new channels')\n .then(deleted => console.log(`Deleted ${deleted.name} to make room for new channels`))\n .catch(console.error);"],"params":[{"name":"reason","description":"Reason for deleting this channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":344,"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":354,"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":["// Logs: Hello from <#123456789012345678>\nconsole.log(`Hello from ${channel}`);","// Logs: Hello from <#123456789012345678>\nconsole.log('Hello from ' + channel);"],"returns":[[["string"]]],"meta":{"line":423,"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 user","readonly":true,"type":[[["Client"]]],"meta":{"line":12,"file":"User.js","path":"src/structures"}},{"name":"id","description":"The ID of the user","type":[[["Snowflake"]]],"meta":{"line":28,"file":"User.js","path":"src/structures"}},{"name":"username","description":"The username of the user","type":[[["string"]]],"meta":{"line":34,"file":"User.js","path":"src/structures"}},{"name":"discriminator","description":"A discriminator based on username for the user","type":[[["string"]]],"meta":{"line":40,"file":"User.js","path":"src/structures"}},{"name":"avatar","description":"The ID of the user's avatar","type":[[["string"]]],"meta":{"line":46,"file":"User.js","path":"src/structures"}},{"name":"bot","description":"Whether or not the user is a bot","type":[[["boolean"]]],"meta":{"line":52,"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":[[["Snowflake"]]],"meta":{"line":58,"file":"User.js","path":"src/structures"}},{"name":"lastMessage","description":"The Message object of the last message sent by the user, if one was sent","nullable":true,"type":[[["Message"]]],"meta":{"line":64,"file":"User.js","path":"src/structures"}},{"name":"createdTimestamp","description":"The timestamp the user was created at","readonly":true,"type":[[["number"]]],"meta":{"line":79,"file":"User.js","path":"src/structures"}},{"name":"createdAt","description":"The time the user was created","readonly":true,"type":[[["Date"]]],"meta":{"line":88,"file":"User.js","path":"src/structures"}},{"name":"presence","description":"The presence of this user","readonly":true,"type":[[["Presence"]]],"meta":{"line":97,"file":"User.js","path":"src/structures"}},{"name":"avatarURL","description":"A link to the user's avatar","readonly":true,"nullable":true,"type":[[["string"]]],"meta":{"line":110,"file":"User.js","path":"src/structures"}},{"name":"defaultAvatarURL","description":"A link to the user's default avatar","readonly":true,"type":[[["string"]]],"meta":{"line":120,"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":131,"file":"User.js","path":"src/structures"}},{"name":"tag","description":"The Discord \"tag\" for this user","readonly":true,"type":[[["string"]]],"meta":{"line":140,"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":150,"file":"User.js","path":"src/structures"}},{"name":"dmChannel","description":"The DM between the client's user and this user","readonly":true,"nullable":true,"type":[[["DMChannel"]]],"meta":{"line":189,"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":159,"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":169,"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":179,"file":"User.js","path":"src/structures"}},{"name":"createDM","description":"Creates a DM channel between the client and the user.","returns":[[["Promise","<"],["DMChannel",">"]]],"meta":{"line":197,"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":205,"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":214,"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":223,"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":232,"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":241,"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":250,"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":260,"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":270,"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":288,"file":"User.js","path":"src/structures"}},{"name":"send","description":"Send a message to this channel.","implements":["TextBasedChannel#send"],"examples":["// Send a basic message\nchannel.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);","// Send a remote file\nchannel.send({\n files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048']\n})\n .then(console.log)\n .catch(console.error);","// Send a local file\nchannel.send({\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);","// Send an embed with a local image inside\nchannel.send('This is an embed', {\n embed: {\n thumbnail: {\n url: 'attachment://file.jpg'\n }\n },\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message,\ncan also be just a RichEmbed or Attachment","optional":true,"type":[[["MessageOptions"]],[["Attachment"]],[["RichEmbed"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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);"],"deprecated":true,"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":486,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendEmbed","description":"Send an embed to this channel.","implements":["TextBasedChannel#sendEmbed"],"deprecated":true,"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":498,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendFile","description":"Send a file to this channel.","implements":["TextBasedChannel#sendFile"],"deprecated":true,"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":529,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendCode","description":"Send a code block to this channel.","implements":["TextBasedChannel#sendCode"],"deprecated":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":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":541,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}}],"meta":{"line":10,"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":"Partial server integrations (not yet implemented)","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 UserProfile","readonly":true,"type":[[["Client"]]],"meta":{"line":15,"file":"UserProfile.js","path":"src/structures"}},{"name":"mutualGuilds","description":"The guilds that the client user and the user share","type":[[["Collection","<"],["Snowflake",", "],["Guild",">"]]],"meta":{"line":27,"file":"UserProfile.js","path":"src/structures"}},{"name":"connections","description":"The user's connections","type":[[["Collection","<"],["Snowflake",", "],["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"}},{"name":"premiumSince","description":"The date since which the user has had Discord Premium","nullable":true,"type":[[["Date"]]],"meta":{"line":49,"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","<"],["Snowflake",", "],["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":"full","description":"Checks if the voice channel is full","readonly":true,"type":[[["boolean"]]],"meta":{"line":53,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"joinable","description":"Checks if the client has permission join the voice channel","readonly":true,"type":[[["boolean"]]],"meta":{"line":62,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"speakable","description":"Checks if the client has permission to send audio to the voice channel","readonly":true,"type":[[["boolean"]]],"meta":{"line":74,"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":"parentID","description":"The ID of the category parent of this channel","nullable":true,"type":[[["Snowflake"]]],"meta":{"line":42,"file":"GuildChannel.js","path":"src/structures"}},{"name":"permissionOverwrites","description":"A map of permission overwrites in this channel for roles and users","type":[[["Collection","<"],["Snowflake",", "],["PermissionOverwrites",">"]]],"meta":{"line":48,"file":"GuildChannel.js","path":"src/structures"}},{"name":"calculatedPosition","description":"The position of the channel","readonly":true,"type":[[["number"]]],"meta":{"line":61,"file":"GuildChannel.js","path":"src/structures"}},{"name":"parent","description":"The category parent of this channel","readonly":true,"nullable":true,"type":[[["CategoryChannel"]]],"meta":{"line":71,"file":"GuildChannel.js","path":"src/structures"}},{"name":"deletable","description":"Whether the channel is deletable by the client user","readonly":true,"type":[[["boolean"]]],"meta":{"line":378,"file":"GuildChannel.js","path":"src/structures"}},{"name":"muted","description":"Whether the channel is muted\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["boolean"]]],"meta":{"line":389,"file":"GuildChannel.js","path":"src/structures"}},{"name":"messageNotifications","description":"The type of message that should notify you\n<warn>This is only available when using a user account.</warn>","readonly":true,"nullable":true,"type":[[["MessageNotificationType"]]],"meta":{"line":404,"file":"GuildChannel.js","path":"src/structures"}}],"methods":[{"name":"setBitrate","description":"Sets the bitrate of the channel (in kbps).","examples":["// Set the bitrate of a voice channel\nvoiceChannel.setBitrate(48)\n .then(vc => console.log(`Set bitrate to ${vc.bitrate}kbps for ${vc.name}`))\n .catch(console.error);"],"params":[{"name":"bitrate","description":"The new bitrate","type":[[["number"]]]},{"name":"reason","description":"Reason for changing the channel's bitrate","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["VoiceChannel",">"]]],"meta":{"line":89,"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"]]]},{"name":"reason","description":"Reason for changing the user limit","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["VoiceChannel",">"]]],"meta":{"line":105,"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":118,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"leave","description":"Leaves this voice channel.","examples":["// Leave a voice channel\nvoiceChannel.leave();"],"meta":{"line":129,"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":[[["Permissions"]]],"nullable":true},"meta":{"line":81,"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(updated => console.log(updated.permissionOverwrites.get(message.author.id)))\n .catch(console.error);"],"params":[{"name":"userOrRole","description":"The user or role to update","type":[[["Role"]],[["Snowflake"]],[["UserResolvable"]]]},{"name":"options","description":"The configuration for the update","type":[[["PermissionOverwriteOptions"]]]},{"name":"reason","description":"Reason for creating/editing this overwrite","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":167,"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(console.log)\n .catch(console.error);"],"params":[{"name":"data","description":"The new data for the channel","type":[[["ChannelData"]]]},{"name":"reason","description":"Reason for editing this channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":230,"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"]]]},{"name":"reason","description":"Reason for changing the guild channel's name","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":245,"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"]]]},{"name":"relative","description":"Move the position relative to its current value","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":260,"file":"GuildChannel.js","path":"src/structures"}},{"name":"setParent","description":"Set a new parent for the guild channel.","inherits":"GuildChannel#setParent","inherited":true,"examples":["// Sets the parent of a channel\nchannel.setParent('174674066072928256')\n .then(updated => console.log(`Set the category of ${updated.name} to ${updated.parent.name}`))\n .catch(console.error);"],"params":[{"name":"parent","description":"The new parent for the guild channel","type":[[["CategoryChannel"]],[["SnowFlake"]]]},{"name":"reason","description":"Reason for changing the guild channel's parent","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":275,"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(updated => console.log(`Channel's new topic is ${updated.topic}`))\n .catch(console.error);"],"params":[{"name":"topic","description":"The new topic for the guild channel","type":[[["string"]]]},{"name":"reason","description":"Reason for changing the guild channel's topic","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":291,"file":"GuildChannel.js","path":"src/structures"}},{"name":"createInvite","description":"Create an invite to this guild channel.\n<warn>This is only available when using a bot account.</warn>","inherits":"GuildChannel#createInvite","inherited":true,"examples":["// Create an invite to a channel\nchannel.createInvite()\n .then(invite => console.log(`Created an invite with a code of ${invite.code}`))\n .catch(console.error);"],"params":[{"name":"options","description":"Options for the invite","optional":true,"default":"{}","type":[[["Object"]]]},{"name":"options.temporary","description":"Whether members that joined via the invite should be automatically\nkicked after 24 hours if they have not yet received a role","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"options.maxAge","description":"How long the invite should last (in seconds, 0 for forever)","optional":true,"default":86400,"type":[[["number"]]]},{"name":"options.maxUses","description":"Maximum number of uses","optional":true,"default":0,"type":[[["number"]]]},{"name":"options.unique","description":"Create a unique invite, or use an existing one with similar settings","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"reason","description":"Reason for creating the invite","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["Invite",">"]]],"meta":{"line":312,"file":"GuildChannel.js","path":"src/structures"}},{"name":"clone","description":"Clone this channel.","inherits":"GuildChannel#clone","inherited":true,"examples":["// Clone a channel\nchannel.clone(undefined, true, false, 'Needed a clone')\n .then(clone => console.log(`Cloned ${channel.name} to make a channel called ${clone.name}`))\n .catch(console.error);"],"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"]]]},{"name":"withTopic","description":"Whether to clone the channel with this channel's topic","optional":true,"default":true,"type":[[["boolean"]]]},{"name":"reason","description":"Reason for cloning this channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":329,"file":"GuildChannel.js","path":"src/structures"}},{"name":"delete","description":"Deletes this channel.","inherits":"GuildChannel#delete","inherited":true,"examples":["// Delete the channel\nchannel.delete('Making room for new channels')\n .then(deleted => console.log(`Deleted ${deleted.name} to make room for new channels`))\n .catch(console.error);"],"params":[{"name":"reason","description":"Reason for deleting this channel","optional":true,"type":[[["string"]]]}],"returns":[[["Promise","<"],["GuildChannel",">"]]],"meta":{"line":344,"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":354,"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":["// Logs: Hello from <#123456789012345678>\nconsole.log(`Hello from ${channel}`);","// Logs: Hello from <#123456789012345678>\nconsole.log('Hello from ' + channel);"],"returns":[[["string"]]],"meta":{"line":423,"file":"GuildChannel.js","path":"src/structures"}}],"meta":{"line":8,"file":"VoiceChannel.js","path":"src/structures"}},{"name":"VoiceRegion","description":"Represents a Discord voice region for guilds.","props":[{"name":"id","description":"The ID of the region","type":[[["string"]]],"meta":{"line":10,"file":"VoiceRegion.js","path":"src/structures"}},{"name":"name","description":"Name of the region","type":[[["string"]]],"meta":{"line":16,"file":"VoiceRegion.js","path":"src/structures"}},{"name":"vip","description":"Whether the region is VIP-only","type":[[["boolean"]]],"meta":{"line":22,"file":"VoiceRegion.js","path":"src/structures"}},{"name":"deprecated","description":"Whether the region is deprecated","type":[[["boolean"]]],"meta":{"line":28,"file":"VoiceRegion.js","path":"src/structures"}},{"name":"optimal","description":"Whether the region is optimal","type":[[["boolean"]]],"meta":{"line":34,"file":"VoiceRegion.js","path":"src/structures"}},{"name":"custom","description":"Whether the region is custom","type":[[["boolean"]]],"meta":{"line":40,"file":"VoiceRegion.js","path":"src/structures"}},{"name":"sampleHostname","description":"A sample hostname for what a connection might look like","type":[[["string"]]],"meta":{"line":46,"file":"VoiceRegion.js","path":"src/structures"}}],"meta":{"line":4,"file":"VoiceRegion.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":12,"file":"Webhook.js","path":"src/structures"}},{"name":"name","description":"The name of the webhook","type":[[["string"]]],"meta":{"line":32,"file":"Webhook.js","path":"src/structures"}},{"name":"token","description":"The token for the webhook","type":[[["string"]]],"meta":{"line":38,"file":"Webhook.js","path":"src/structures"}},{"name":"avatar","description":"The avatar for the webhook","nullable":true,"type":[[["string"]]],"meta":{"line":44,"file":"Webhook.js","path":"src/structures"}},{"name":"id","description":"The ID of the webhook","type":[[["Snowflake"]]],"meta":{"line":50,"file":"Webhook.js","path":"src/structures"}},{"name":"guildID","description":"The guild the webhook belongs to","type":[[["Snowflake"]]],"meta":{"line":56,"file":"Webhook.js","path":"src/structures"}},{"name":"channelID","description":"The channel the webhook belongs to","type":[[["Snowflake"]]],"meta":{"line":62,"file":"Webhook.js","path":"src/structures"}},{"name":"owner","description":"The owner of the webhook","type":[[["User"]],[["Object"]]],"meta":{"line":69,"file":"Webhook.js","path":"src/structures"}}],"methods":[{"name":"send","description":"Send a message with this webhook.","examples":["// Send a basic message\nwebhook.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);","// Send a remote file\nwebhook.send({\n files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048']\n})\n .then(console.log)\n .catch(console.error);","// Send a local file\nwebhook.send({\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);","// Send an embed with a local image inside\nwebhook.send('This is an embed', {\n embeds: [{\n thumbnail: {\n url: 'attachment://file.jpg'\n }\n }],\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"content","description":"The content to send","type":[[["StringResolvable"]]]},{"name":"options","description":"The options to provide,\ncan also be just a RichEmbed or Attachment","optional":true,"type":[[["WebhookMessageOptions"]],[["Attachment"]],[["RichEmbed"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">|"],["Object","|"],["Array","<"],["Object",">)>"]]],"meta":{"line":137,"file":"Webhook.js","path":"src/structures"}},{"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);"],"deprecated":true,"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":224,"file":"Webhook.js","path":"src/structures"}},{"name":"sendFile","description":"Send a file with this webhook.","deprecated":true,"params":[{"name":"attachment","description":"The file to send","type":[[["BufferResolvable"]]]},{"name":"name","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":237,"file":"Webhook.js","path":"src/structures"}},{"name":"sendCode","description":"Send a code block with this webhook.","deprecated":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":249,"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":270,"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","optional":true,"type":[[["BufferResolvable"]]]}],"returns":[[["Promise","<"],["Webhook",">"]]],"meta":{"line":280,"file":"Webhook.js","path":"src/structures"}},{"name":"delete","description":"Delete the webhook.","params":[{"name":"reason","description":"Reason for deleting the webhook","optional":true,"type":[[["string"]]]}],"returns":[[["Promise"]]],"meta":{"line":294,"file":"Webhook.js","path":"src/structures"}}],"meta":{"line":9,"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":10,"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":18,"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 `[...collection.values()]` or\n`Array.from(collection.values())` instead.","returns":[[["Array"]]],"meta":{"line":46,"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 `[...collection.keys()]` or\n`Array.from(collection.keys())` instead.","returns":[[["Array"]]],"meta":{"line":58,"file":"Collection.js","path":"src/util"}},{"name":"first","description":"Obtains the first value(s) in this collection.","params":[{"name":"count","description":"Number of values to obtain from the beginning","optional":true,"type":[[["number"]]]}],"returns":{"types":[["*"],[["Array","<"],["*",">"]]],"description":"The single value if `count` is undefined, or an array of values of `count` length"},"meta":{"line":68,"file":"Collection.js","path":"src/util"}},{"name":"firstKey","description":"Obtains the first key(s) in this collection.","params":[{"name":"count","description":"Number of keys to obtain from the beginning","optional":true,"type":[[["number"]]]}],"returns":{"types":[["*"],[["Array","<"],["*",">"]]],"description":"The single key if `count` is undefined, or an array of keys of `count` length"},"meta":{"line":84,"file":"Collection.js","path":"src/util"}},{"name":"last","description":"Obtains the last value(s) in this collection. This relies on {@link Collection#array}, and thus the caching\nmechanism applies here as well.","params":[{"name":"count","description":"Number of values to obtain from the end","optional":true,"type":[[["number"]]]}],"returns":{"types":[["*"],[["Array","<"],["*",">"]]],"description":"The single value if `count` is undefined, or an array of values of `count` length"},"meta":{"line":101,"file":"Collection.js","path":"src/util"}},{"name":"lastKey","description":"Obtains the last key(s) in this collection. This relies on {@link Collection#keyArray}, and thus the caching\nmechanism applies here as well.","params":[{"name":"count","description":"Number of keys to obtain from the end","optional":true,"type":[[["number"]]]}],"returns":{"types":[["*"],[["Array","<"],["*",">"]]],"description":"The single key if `count` is undefined, or an array of keys of `count` length"},"meta":{"line":115,"file":"Collection.js","path":"src/util"}},{"name":"random","description":"Obtains random value(s) from this collection. This relies on {@link Collection#array}, and thus the caching\nmechanism applies here as well.","params":[{"name":"count","description":"Number of values to obtain randomly","optional":true,"type":[[["number"]]]}],"returns":{"types":[["*"],[["Array","<"],["*",">"]]],"description":"The single value if `count` is undefined, or an array of values of `count` length"},"meta":{"line":129,"file":"Collection.js","path":"src/util"}},{"name":"randomKey","description":"Obtains random key(s) from this collection. This relies on {@link Collection#keyArray}, and thus the caching\nmechanism applies here as well.","params":[{"name":"count","description":"Number of keys to obtain randomly","optional":true,"type":[[["number"]]]}],"returns":{"types":[["*"],[["Array","<"],["*",">"]]],"description":"The single key if `count` is undefined, or an array of keys of `count` length"},"meta":{"line":147,"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":168,"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>All collections used in Discord.js are mapped using their `id` property, and if you want to find by id you\nshould use the `get` method. 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":193,"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":254,"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":266,"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":282,"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":298,"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":313,"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":328,"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":344,"file":"Collection.js","path":"src/util"}},{"name":"clone","description":"Creates an identical shallow copy of this collection.","examples":["const newColl = someColl.clone();"],"returns":[[["Collection"]]],"meta":{"line":368,"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":378,"file":"Collection.js","path":"src/util"}},{"name":"deleteAll","description":"Calls the `delete()` method on all items that have it.","returns":[[["Array","<"],["Promise",">"]]],"meta":{"line":390,"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":405,"file":"Collection.js","path":"src/util"}},{"name":"sort","description":"The sort() method sorts the elements of a collection in place and returns the collection.\nThe sort is not necessarily stable. The default sort order is according to string Unicode code points.","params":[{"name":"compareFunction","description":"Specifies a function that defines the sort order.\nif omitted, the collection is sorted according to each character's Unicode code point value,\naccording to the string conversion of each element.","optional":true,"type":[[["function"]]]}],"returns":[[["Collection"]]],"meta":{"line":423,"file":"Collection.js","path":"src/util"}}],"meta":{"line":6,"file":"Collection.js","path":"src/util"}},{"name":"Permissions","description":"Data structure that makes it easy to interact with a permission bitfield. All {@link GuildMember}s have a set of\npermissions in their guild, and each channel in the guild may also have {@link PermissionOverwrites} for the member\nthat override their default permissions.","construct":{"name":"Permissions","params":[{"name":"member","description":"Member the permissions are for **(deprecated)**","optional":true,"type":[[["GuildMember"]]]},{"name":"permissions","description":"Permissions or bitfield to read from","type":[[["number"]],[["Array","<"],["PermissionResolvable",">"]]]}]},"props":[{"name":"_member","description":"Member the permissions are for","deprecated":true,"type":[[["GuildMember"]]],"meta":{"line":22,"file":"Permissions.js","path":"src/util"}},{"name":"bitfield","description":"Bitfield of the packed permissions","type":[[["number"]]],"meta":{"line":28,"file":"Permissions.js","path":"src/util"}},{"name":"raw","description":"Bitfield of the packed permissions","see":["{@link Permissions#bitfield}"],"readonly":true,"deprecated":true,"type":[[["number"]]],"meta":{"line":46,"file":"Permissions.js","path":"src/util"}},{"name":"FLAGS","description":"Numeric permission flags. All available properties:\n- `ADMINISTRATOR` (implicitly has *all* permissions, and bypasses all channel overwrites)\n- `CREATE_INSTANT_INVITE` (create invitations to the guild)\n- `KICK_MEMBERS`\n- `BAN_MEMBERS`\n- `MANAGE_CHANNELS` (edit and reorder channels)\n- `MANAGE_GUILD` (edit the guild information, region, etc.)\n- `ADD_REACTIONS` (add new reactions to messages)\n- `VIEW_AUDIT_LOG`\n- `VIEW_CHANNEL`\n- `READ_MESSAGES` **(deprecated)**\n- `SEND_MESSAGES`\n- `SEND_TTS_MESSAGES`\n- `MANAGE_MESSAGES` (delete messages and reactions)\n- `EMBED_LINKS` (links posted will have a preview embedded)\n- `ATTACH_FILES`\n- `READ_MESSAGE_HISTORY` (view messages that were posted prior to opening Discord)\n- `MENTION_EVERYONE`\n- `USE_EXTERNAL_EMOJIS` (use emojis from different guilds)\n- `EXTERNAL_EMOJIS` **(deprecated)**\n- `CONNECT` (connect to a voice channel)\n- `SPEAK` (speak in a voice channel)\n- `MUTE_MEMBERS` (mute members across all voice channels)\n- `DEAFEN_MEMBERS` (deafen members across all voice channels)\n- `MOVE_MEMBERS` (move members between voice channels)\n- `USE_VAD` (use voice activity detection)\n- `CHANGE_NICKNAME`\n- `MANAGE_NICKNAMES` (change other members' nicknames)\n- `MANAGE_ROLES`\n- `MANAGE_ROLES_OR_PERMISSIONS` **(deprecated)**\n- `MANAGE_WEBHOOKS`\n- `MANAGE_EMOJIS`","see":["{@link https://discordapp.com/developers/docs/topics/permissions}"],"scope":"static","type":[[["Object"]]],"meta":{"line":209,"file":"Permissions.js","path":"src/util"}},{"name":"ALL","description":"Bitfield representing every permission combined","scope":"static","type":[[["number"]]],"meta":{"line":250,"file":"Permissions.js","path":"src/util"}},{"name":"DEFAULT","description":"Bitfield representing the default permissions for users","scope":"static","type":[[["number"]]],"meta":{"line":256,"file":"Permissions.js","path":"src/util"}}],"methods":[{"name":"has","description":"Checks whether the bitfield has a permission, or multiple permissions.","params":[{"name":"permission","description":"Permission(s) to check for","type":[[["PermissionResolvable"]],[["Array","<"],["PermissionResolvable",">"]]]},{"name":"checkAdmin","description":"Whether to allow the administrator permission to override","optional":true,"default":true,"type":[[["boolean"]]]}],"returns":[[["boolean"]]],"meta":{"line":60,"file":"Permissions.js","path":"src/util"}},{"name":"missing","description":"Gets all given permissions that are missing from the bitfield.","params":[{"name":"permissions","description":"Permissions to check for","type":[[["Array","<"],["PermissionResolvable",">"]]]},{"name":"checkAdmin","description":"Whether to allow the administrator permission to override","optional":true,"default":true,"type":[[["boolean"]]]}],"returns":[[["Array","<"],["PermissionResolvable",">"]]],"meta":{"line":73,"file":"Permissions.js","path":"src/util"}},{"name":"add","description":"Adds permissions to this one, creating a new instance to represent the new bitfield.","params":[{"name":"permissions","description":"Permissions to add","variable":true,"type":[[["PermissionResolvable"]]]}],"returns":[[["Permissions"]]],"meta":{"line":82,"file":"Permissions.js","path":"src/util"}},{"name":"remove","description":"Removes permissions to this one, creating a new instance to represent the new bitfield.","params":[{"name":"permissions","description":"Permissions to remove","variable":true,"type":[[["PermissionResolvable"]]]}],"returns":[[["Permissions"]]],"meta":{"line":96,"file":"Permissions.js","path":"src/util"}},{"name":"serialize","description":"Gets an object mapping permission name (like `VIEW_CHANNEL`) to a {@link boolean} indicating whether the\npermission is available.","params":[{"name":"checkAdmin","description":"Whether to allow the administrator permission to override","optional":true,"default":true,"type":[[["boolean"]]]}],"returns":[[["Object"]]],"meta":{"line":111,"file":"Permissions.js","path":"src/util"}},{"name":"hasPermission","description":"Checks whether the user has a certain permission, e.g. `READ_MESSAGES`.","see":["{@link Permissions#has}"],"deprecated":true,"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":125,"file":"Permissions.js","path":"src/util"}},{"name":"hasPermissions","description":"Checks whether the user has all specified permissions.","see":["{@link Permissions#has}"],"deprecated":true,"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":137,"file":"Permissions.js","path":"src/util"}},{"name":"missingPermissions","description":"Checks whether the user has all specified permissions, and lists any missing permissions.","see":["{@link Permissions#missing}"],"deprecated":true,"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":149,"file":"Permissions.js","path":"src/util"}},{"name":"resolve","description":"Resolves permissions to their numeric form.","scope":"static","params":[{"name":"permission","description":"Permission(s) to resolve","type":[[["PermissionResolvable"]],[["Array","<"],["PermissionResolvable",">"]]]}],"returns":[[["number"]]],"meta":{"line":165,"file":"Permissions.js","path":"src/util"}}],"meta":{"line":9,"file":"Permissions.js","path":"src/util"}},{"name":"EvaluatedPermissions","description":"The final evaluated permissions for a member in a channel","see":["{@link Permissions}"],"deprecated":true,"meta":{"line":258,"file":"Permissions.js","path":"src/util"}},{"name":"SnowflakeUtil","description":"A container for useful snowflake-related methods.","methods":[{"name":"generate","description":"Generates a Discord snowflake.\n<info>This hardcodes the worker ID as 1 and the process ID as 0.</info>","scope":"static","returns":{"types":[[["Snowflake"]]],"description":"The generated snowflake"},"meta":{"line":32,"file":"Snowflake.js","path":"src/util"}},{"name":"deconstruct","description":"Deconstructs a Discord snowflake.","scope":"static","params":[{"name":"snowflake","description":"Snowflake to deconstruct","type":[[["Snowflake"]]]}],"returns":{"types":[[["DeconstructedSnowflake"]]],"description":"Deconstructed snowflake"},"meta":{"line":54,"file":"Snowflake.js","path":"src/util"}}],"meta":{"line":10,"file":"Snowflake.js","path":"src/util"}},{"name":"Util","description":"Contains various general-purpose utility methods. These functions are also available on the base `Discord` object.","methods":[{"name":"splitMessage","description":"Splits a string into multiple chunks at a designated character that do not exceed a specific length.","scope":"static","params":[{"name":"text","description":"Content to split","type":[[["string"]]]},{"name":"options","description":"Options controlling the behaviour of the split","optional":true,"type":[[["SplitOptions"]]]}],"returns":[[["string"]],[["Array","<"],["string",">"]]],"meta":{"line":19,"file":"Util.js","path":"src/util"}},{"name":"escapeMarkdown","description":"Escapes any Discord-flavour markdown in a string.","scope":"static","params":[{"name":"text","description":"Content to escape","type":[[["string"]]]},{"name":"onlyCodeBlock","description":"Whether to only escape codeblocks (takes priority)","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"onlyInlineCode","description":"Whether to only escape inline code","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["string"]]],"meta":{"line":43,"file":"Util.js","path":"src/util"}},{"name":"fetchRecommendedShards","description":"Gets the recommended shard count from Discord.","scope":"static","params":[{"name":"token","description":"Discord auth token","type":[[["string"]]]},{"name":"guildsPerShard","description":"Number of guilds per shard","optional":true,"default":1000,"type":[[["number"]]]}],"returns":{"types":[[["Promise","<"],["number",">"]]],"description":"The recommended number of shards"},"meta":{"line":55,"file":"Util.js","path":"src/util"}},{"name":"parseEmoji","description":"Parses emoji info out of a string. The string must be one of:\n* A UTF-8 emoji (no ID)\n* A URL-encoded UTF-8 emoji (no ID)\n* A Discord custom emoji (`<:name:id>` or `<a:name:id>`)","scope":"static","access":"private","params":[{"name":"text","description":"Emoji string to parse","type":[[["string"]]]}],"returns":{"types":[[["Object"]]],"description":"Object with `animated`, `name`, and `id` properties","nullable":true},"meta":{"line":76,"file":"Util.js","path":"src/util"}},{"name":"arraysEqual","description":"Checks whether the arrays are equal, also removes duplicated entries from b.","scope":"static","access":"private","params":[{"name":"a","description":"Array which will not be modified.","type":[[["Array","<"],["*",">"]]]},{"name":"b","description":"Array to remove duplicated entries from.","type":[[["Array","<"],["*",">"]]]}],"returns":{"types":[[["boolean"]]],"description":"Whether the arrays are equal."},"meta":{"line":91,"file":"Util.js","path":"src/util"}},{"name":"cloneObject","description":"Shallow-copies an object with its class/prototype intact.","scope":"static","access":"private","params":[{"name":"obj","description":"Object to clone","type":[[["Object"]]]}],"returns":[[["Object"]]],"meta":{"line":109,"file":"Util.js","path":"src/util"}},{"name":"mergeDefault","description":"Sets default properties on an object that aren't already specified.","scope":"static","access":"private","params":[{"name":"def","description":"Default properties","type":[[["Object"]]]},{"name":"given","description":"Object to assign defaults to","type":[[["Object"]]]}],"returns":[[["Object"]]],"meta":{"line":120,"file":"Util.js","path":"src/util"}},{"name":"convertToBuffer","description":"Converts an ArrayBuffer or string to a Buffer.","scope":"static","access":"private","params":[{"name":"ab","description":"ArrayBuffer to convert","type":[[["ArrayBuffer"]],[["string"]]]}],"returns":[[["Buffer"]]],"meta":{"line":139,"file":"Util.js","path":"src/util"}},{"name":"str2ab","description":"Converts a string to an ArrayBuffer.","scope":"static","access":"private","params":[{"name":"str","description":"String to convert","type":[[["string"]]]}],"returns":[[["ArrayBuffer"]]],"meta":{"line":150,"file":"Util.js","path":"src/util"}},{"name":"makeError","description":"Makes an Error from a plain info object.","scope":"static","access":"private","params":[{"name":"obj","description":"Error info","type":[[["Object"]]]},{"name":"obj.name","description":"Error type","type":[[["string"]]]},{"name":"obj.message","description":"Message for the error","type":[[["string"]]]},{"name":"obj.stack","description":"Stack for the error","type":[[["string"]]]}],"returns":[[["Error"]]],"meta":{"line":166,"file":"Util.js","path":"src/util"}},{"name":"makePlainError","description":"Makes a plain error info object from an Error.","scope":"static","access":"private","params":[{"name":"err","description":"Error to get info from","type":[[["Error"]]]}],"returns":[[["Object"]]],"meta":{"line":179,"file":"Util.js","path":"src/util"}},{"name":"moveElementInArray","description":"Moves an element in an array *in place*.","scope":"static","access":"private","params":[{"name":"array","description":"Array to modify","type":[[["Array","<"],["*",">"]]]},{"name":"element","description":"Element to move","type":[["*"]]},{"name":"newIndex","description":"Index or offset to move the element to","type":[[["number"]]]},{"name":"offset","description":"Move the element by an offset amount rather than to a set index","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":[[["number"]]],"meta":{"line":196,"file":"Util.js","path":"src/util"}}],"meta":{"line":8,"file":"Util.js","path":"src/util"}}],"interfaces":[{"name":"TextBasedChannel","description":"Interface for classes that have text-channel-like features.","props":[{"name":"typing","description":"Whether or not the typing indicator is being shown in the channel","readonly":true,"type":[[["boolean"]]],"meta":{"line":351,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"typingCount","description":"Number of times `startTyping` has been called","readonly":true,"type":[[["number"]]],"meta":{"line":360,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}}],"methods":[{"name":"send","description":"Send a message to this channel.","examples":["// Send a basic message\nchannel.send('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.error);","// Send a remote file\nchannel.send({\n files: ['https://cdn.discordapp.com/icons/222078108977594368/6e1019b3179d71046e463a75915e7244.png?size=2048']\n})\n .then(console.log)\n .catch(console.error);","// Send a local file\nchannel.send({\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);","// Send an embed with a local image inside\nchannel.send('This is an embed', {\n embed: {\n thumbnail: {\n url: 'attachment://file.jpg'\n }\n },\n files: [{\n attachment: 'entire/path/to/file.jpg',\n name: 'file.jpg'\n }]\n})\n .then(console.log)\n .catch(console.error);"],"params":[{"name":"content","description":"Text for the message","optional":true,"type":[[["StringResolvable"]]]},{"name":"options","description":"Options for the message,\ncan also be just a RichEmbed or Attachment","optional":true,"type":[[["MessageOptions"]],[["Attachment"]],[["RichEmbed"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":112,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"fetchMessage","description":"Gets a single message from this channel, regardless of it being cached or not. Since the single message fetching\nendpoint is reserved for bot accounts, this abstracts the `fetchMessages` method to obtain the single message when\nusing a user account.","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":[[["Snowflake"]]]}],"returns":[[["Promise","<"],["Message",">"]]],"meta":{"line":176,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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","<"],["Snowflake",", "],["Message",">>"]]],"meta":{"line":211,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"fetchPinnedMessages","description":"Fetches the pinned messages of this channel and returns a collection of them.","returns":[[["Promise","<"],["Collection","<"],["Snowflake",", "],["Message",">>"]]],"meta":{"line":227,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"search","description":"Performs a search within the channel.\n<warn>This is only available when using a user account.</warn>","examples":["channel.search({\n content: 'discord.js',\n before: '2016-11-17'\n}).then(res => {\n const hit = res.messages[0].find(m => m.hit).content;\n console.log(`I found: **${hit}**, total results: ${res.totalResults}`);\n}).catch(console.error);"],"params":[{"name":"options","description":"Options to pass to the search","optional":true,"default":"{}","type":[[["MessageSearchOptions"]]]}],"returns":[[["Promise","<"],["MessageSearchResult",">"]]],"meta":{"line":288,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":299,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":["// Reduce the typing count by one and stop typing if it reached 0\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":335,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"createCollector","description":"Creates a Message Collector","deprecated":true,"params":[{"name":"filter","description":"The filter to create the collector with","type":[[["CollectorFilter"]]]},{"name":"options","description":"The options to pass to the collector","optional":true,"default":"{}","type":[[["MessageCollectorOptions"]]]}],"returns":[[["MessageCollector"]]],"meta":{"line":372,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"createMessageCollector","description":"Creates a Message Collector.","examples":["// Create a message collector\nconst filter = m => m.content.includes('discord');\nconst collector = channel.createMessageCollector(filter, { time: 15000 });\ncollector.on('collect', 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":[[["CollectorFilter"]]]},{"name":"options","description":"The options to pass to the collector","optional":true,"default":"{}","type":[[["MessageCollectorOptions"]]]}],"returns":[[["MessageCollector"]]],"meta":{"line":388,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":[[["CollectorFilter"]]]},{"name":"options","description":"Optional options to pass to the internal collector","optional":true,"default":"{}","type":[[["AwaitMessagesOptions"]]]}],"returns":[[["Promise","<"],["Collection","<"],["Snowflake",", "],["Message",">>"]]],"meta":{"line":412,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"bulkDelete","description":"Bulk delete given messages that are newer than two weeks.\n<warn>This is only available when using a bot account.</warn>","examples":["// Bulk delete messages\nchannel.bulkDelete(5)\n .then(messages => console.log(`Bulk deleted ${messages.size} messages`))\n .catch(console.error);"],"params":[{"name":"messages","description":"Messages or number of messages to delete","type":[[["Collection","<"],["Snowflake",", "],["Message",">"]],[["Array","<"],["Message",">"]],[["number"]]]},{"name":"filterOld","description":"Filter messages to remove those which are older than two weeks automatically","optional":true,"default":false,"type":[[["boolean"]]]}],"returns":{"types":[[["Promise","<"],["Collection","<"],["Snowflake",", "],["Message",">>"]]],"description":"Deleted messages"},"meta":{"line":437,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"acknowledge","description":"Marks all messages in this channel as read.\n<warn>This is only available when using a user account.</warn>","returns":[[["Promise","<("],["TextChannel","|"],["GroupDMChannel","|"],["DMChannel",")>"]]],"meta":{"line":458,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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);"],"deprecated":true,"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":486,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendEmbed","description":"Send an embed to this channel.","deprecated":true,"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":498,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendFiles","description":"Send files to this channel.","deprecated":true,"params":[{"name":"files","description":"Files to send with the message","type":[[["Array","<"],["FileOptions",">"]],[["Array","<"],["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":516,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendFile","description":"Send a file to this channel.","deprecated":true,"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":529,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"sendCode","description":"Send a code block to this channel.","deprecated":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":"Options for the message","optional":true,"type":[[["MessageOptions"]]]}],"returns":[[["Promise","<("],["Message","|"],["Array","<"],["Message",">)>"]]],"meta":{"line":541,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}}],"meta":{"line":14,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}}],"typedefs":[{"name":"UserResolvable","description":"Data that resolves to give a User object. This can be:\n* A User object\n* A Snowflake\n* A Message object (resolves to the message author)\n* A Guild object (owner of the guild)\n* A GuildMember object","type":[[["User"]],[["Snowflake"]],[["Message"]],[["Guild"]],[["GuildMember"]]],"meta":{"line":29,"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 Snowflake","type":[[["Guild"]],[["Snowflake"]]],"meta":{"line":66,"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":[[["GuildMember"]],[["User"]]],"meta":{"line":84,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"RoleResolvable","description":"Data that can be resolved to a Role object. This can be:\n* A Role\n* A Snowflake","type":[[["Role"]],[["Snowflake"]]],"meta":{"line":105,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"ChannelResolvable","description":"Data that can be resolved to give a Channel object. 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 Snowflake","type":[[["Channel"]],[["Guild"]],[["Message"]],[["Snowflake"]]],"meta":{"line":126,"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":161,"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":180,"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":213,"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\n* A Stream","type":[[["string"]],[["Buffer"]]],"meta":{"line":230,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"EmojiIdentifierResolvable","description":"Data that can be resolved to give an emoji identifier. This can be:\n* The unicode representation of an emoji\n* A custom emoji ID\n* An Emoji object\n* A ReactionEmoji object","type":[[["string"]],[["Emoji"]],[["ReactionEmoji"]]],"meta":{"line":286,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"ColorResolvable","description":"Can be a Hex Literal, Hex String, Number, RGB Array, or one of the following\n```\n[\n 'DEFAULT',\n 'AQUA',\n 'GREEN',\n 'BLUE',\n 'PURPLE',\n 'GOLD',\n 'ORANGE',\n 'RED',\n 'GREY',\n 'DARKER_GREY',\n 'NAVY',\n 'DARK_AQUA',\n 'DARK_GREEN',\n 'DARK_BLUE',\n 'DARK_PURPLE',\n 'DARK_GOLD',\n 'DARK_ORANGE',\n 'DARK_RED',\n 'DARK_GREY',\n 'LIGHT_GREY',\n 'DARK_NAVY',\n 'RANDOM',\n]\n```\nor something like\n```\n[255, 0, 255]\n```\nfor purple","type":[[["string"]],[["number"]],[["Array"]]],"meta":{"line":310,"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"]]]},{"name":"bitrate","description":"The bitrate (quality) of the audio.\nIf set to 'auto', the voice channel's bitrate will be used","optional":true,"default":48000,"type":[[["number"]],[["string"]]]}],"meta":{"line":429,"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"]]]},{"name":"game.type","description":"Type of the activity","optional":true,"type":[[["ActivityType"]],[["number"]]]}],"meta":{"line":162,"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":236,"file":"ClientUser.js","path":"src/structures"}},{"name":"GroupDMRecipientOptions","description":"An object containing either a user or access token, and an optional nickname.","type":[[["Object"]]],"props":[{"name":"user","description":"User to add to the Group DM\n(only available if a user is creating the DM)","optional":true,"type":[[["UserResolvable"]],[["Snowflake"]]]},{"name":"accessToken","description":"Access token to use to add a user to the Group DM\n(only available if a bot is creating the DM)","optional":true,"type":[[["string"]]]},{"name":"nick","description":"Permanent nickname (only available if a bot is creating the DM)","optional":true,"type":[[["string"]]]}],"meta":{"line":369,"file":"ClientUser.js","path":"src/structures"}},{"name":"EmojiEditData","description":"Data for editing an emoji.","type":[[["Object"]]],"props":[{"name":"name","description":"The name of the emoji","optional":true,"type":[[["string"]]]},{"name":"roles","description":"Roles to restrict emoji to","optional":true,"type":[[["Collection","<"],["Snowflake",", "],["Role",">"]],[["Array","<("],["Snowflake","|"],["Role",")>"]]]}],"meta":{"line":111,"file":"Emoji.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":"explicitContentFilter","description":"The level of the explicit content filter","optional":true,"type":[[["number"]]]},{"name":"afkChannel","description":"The AFK channel of the guild","optional":true,"type":[[["ChannelResolvable"]]]},{"name":"systemChannel","description":"The system 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":622,"file":"Guild.js","path":"src/structures"}},{"name":"ChannelCreationOverwrites","description":"Can be used to overwrite permissions when creating a channel.","type":[[["Object"]]],"props":[{"name":"allow","description":"The permissions to allow","optional":true,"type":[[["Array","<"],["PermissionResolvable",">"]],[["number"]]]},{"name":"deny","description":"The permissions to deny","optional":true,"type":[[["Array","<"],["PermissionResolvable",">"]],[["number"]]]},{"name":"id","description":"ID of the role or member this overwrite is for","type":[[["RoleResolvable"]],[["UserResolvable"]]]}],"meta":{"line":923,"file":"Guild.js","path":"src/structures"}},{"name":"ChannelPosition","description":"The data needed for updating a channel's position.","type":[[["Object"]]],"props":[{"name":"channel","description":"Channel to update","type":[[["ChannelResolvable"]]]},{"name":"position","description":"New position for the channel","type":[[["number"]]]}],"meta":{"line":957,"file":"Guild.js","path":"src/structures"}},{"name":"AuditLogTargetType","description":"The target type of an entry, e.g. `GUILD`. Here are the available types:\n* GUILD\n* CHANNEL\n* USER\n* ROLE\n* INVITE\n* WEBHOOK\n* EMOJI\n* MESSAGE","type":[[["string"]]],"meta":{"line":6,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"AuditLogAction","description":"The action of an entry. Here are the available actions:\n* ALL: null\n* GUILD_UPDATE: 1\n* CHANNEL_CREATE: 10\n* CHANNEL_UPDATE: 11\n* CHANNEL_DELETE: 12\n* CHANNEL_OVERWRITE_CREATE: 13\n* CHANNEL_OVERWRITE_UPDATE: 14\n* CHANNEL_OVERWRITE_DELETE: 15\n* MEMBER_KICK: 20\n* MEMBER_PRUNE: 21\n* MEMBER_BAN_ADD: 22\n* MEMBER_BAN_REMOVE: 23\n* MEMBER_UPDATE: 24\n* MEMBER_ROLE_UPDATE: 25\n* ROLE_CREATE: 30\n* ROLE_UPDATE: 31\n* ROLE_DELETE: 32\n* INVITE_CREATE: 40\n* INVITE_UPDATE: 41\n* INVITE_DELETE: 42\n* WEBHOOK_CREATE: 50\n* WEBHOOK_UPDATE: 51\n* WEBHOOK_DELETE: 50\n* EMOJI_CREATE: 60\n* EMOJI_UPDATE: 61\n* EMOJI_DELETE: 62\n* MESSAGE_DELETE: 72","type":[[["number"]],[["string"]]],"meta":{"line":36,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"AuditLogEntryTarget","description":"The target of an entry. It can be one of:\n* A guild\n* A user\n* A role\n* An emoji\n* An invite\n* A webhook\n* An object where the keys represent either the new value or the old value","type":[[["Object"]],[["Guild"]],[["User"]],[["Role"]],[["Emoji"]],[["Invite"]],[["Webhook"]]],"meta":{"line":143,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"AuditLogActionType","description":"The action type of an entry, e.g. `CREATE`. Here are the available types:\n* CREATE\n* DELETE\n* UPDATE\n* ALL","type":[[["string"]]],"meta":{"line":172,"file":"GuildAuditLogs.js","path":"src/structures"}},{"name":"AuditLogChange","description":"An entry in the audit log representing a specific change.","type":[[["object"]]],"props":[{"name":"key","description":"The property that was changed, e.g. `nick` for nickname changes","type":[[["string"]]]},{"name":"old","description":"The old value of the change, e.g. for nicknames, the old nickname","optional":true,"type":[["*"]]},{"name":"new","description":"The new value of the change, e.g. for nicknames, the new nickname","optional":true,"type":[["*"]]}],"meta":{"line":263,"file":"GuildAuditLogs.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":142,"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":209,"file":"GuildChannel.js","path":"src/structures"}},{"name":"GuildMemberEditData","description":"The data for editing a guild member.","type":[[["Object"]]],"props":[{"name":"nick","description":"The nickname to set for the member","optional":true,"type":[[["string"]]]},{"name":"roles","description":"The roles or role IDs to apply","optional":true,"type":[[["Collection","<"],["Snowflake",", "],["Role",">"]],[["Array","<"],["RoleResolvable",">"]]]},{"name":"mute","description":"Whether or not the member should be muted","optional":true,"type":[[["boolean"]]]},{"name":"deaf","description":"Whether or not the member should be deafened","optional":true,"type":[[["boolean"]]]},{"name":"channel","description":"Channel to move member to (if they are connected to voice)","optional":true,"type":[[["ChannelResolvable"]]]}],"meta":{"line":335,"file":"GuildMember.js","path":"src/structures"}},{"name":"CollectorFilter","description":"Filter to be applied to the collector.","type":[[["function"]]],"meta":{"line":4,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"CollectorOptions","description":"Options to be applied to the collector.","type":[[["Object"]]],"props":[{"name":"time","description":"How long to run the collector for","optional":true,"type":[[["number"]]]}],"meta":{"line":12,"file":"Collector.js","path":"src/structures/interfaces"}},{"name":"MessageOptions","description":"Options provided when sending or editing a message.","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":[[["RichEmbed"]],[["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 **(deprecated)**","optional":true,"type":[[["FileOptions"]],[["BufferResolvable"]],[["Attachment"]]]},{"name":"files","description":"Files to send with the message","optional":true,"type":[[["Array","<"],["FileOptions",">"]],[["Array","<"],["BufferResolvable",">"]],[["Array","<"],["Attachment",">"]]]},{"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"]]]},{"name":"reply","description":"User to reply to (prefixes the message with a mention, except in DMs)","optional":true,"type":[[["UserResolvable"]]]}],"meta":{"line":35,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"FileOptions","type":[[["Object"]]],"props":[{"name":"attachment","description":"File to attach","type":[[["BufferResolvable"]]]},{"name":"name","description":"Filename of the attachment","optional":true,"default":"'file.jpg'","type":[[["string"]]]}],"meta":{"line":52,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"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":58,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"ChannelLogsQueryOptions","description":"The 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":[[["Snowflake"]]]},{"name":"after","description":"ID of a message to get the messages that were posted after it","optional":true,"type":[[["Snowflake"]]]},{"name":"around","description":"ID of a message to get the messages that were posted around it","optional":true,"type":[[["Snowflake"]]]}],"meta":{"line":191,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"MessageSearchOptions","type":[[["Object"]]],"props":[{"name":"content","description":"Message content","optional":true,"type":[[["string"]]]},{"name":"maxID","description":"Maximum ID for the filter","optional":true,"type":[[["Snowflake"]]]},{"name":"minID","description":"Minimum ID for the filter","optional":true,"type":[[["Snowflake"]]]},{"name":"has","description":"One of `link`, `embed`, `file`, `video`, `image`, or `sound`,\nor add `-` to negate (e.g. `-file`)","optional":true,"type":[[["string"]]]},{"name":"channel","description":"Channel to limit search to (only for guild search endpoint)","optional":true,"type":[[["ChannelResolvable"]]]},{"name":"author","description":"Author to limit search","optional":true,"type":[[["UserResolvable"]]]},{"name":"authorType","description":"One of `user`, `bot`, `webhook`, or add `-` to negate (e.g. `-webhook`)","optional":true,"type":[[["string"]]]},{"name":"sortBy","description":"`recent` or `relevant`","optional":true,"default":"'recent'","type":[[["string"]]]},{"name":"sortOrder","description":"`asc` or `desc`","optional":true,"default":"'desc'","type":[[["string"]]]},{"name":"contextSize","description":"How many messages to get around the matched message (0 to 2)","optional":true,"default":2,"type":[[["number"]]]},{"name":"limit","description":"Maximum number of results to get (1 to 25)","optional":true,"default":25,"type":[[["number"]]]},{"name":"offset","description":"Offset the \"pages\" of results (since you can only see 25 at a time)","optional":true,"default":0,"type":[[["number"]]]},{"name":"mentions","description":"Mentioned user filter","optional":true,"type":[[["UserResolvable"]]]},{"name":"mentionsEveryone","description":"If everyone is mentioned","optional":true,"type":[[["boolean"]]]},{"name":"linkHostname","description":"Filter links by hostname","optional":true,"type":[[["string"]]]},{"name":"embedProvider","description":"The name of an embed provider","optional":true,"type":[[["string"]]]},{"name":"embedType","description":"one of `image`, `video`, `url`, `rich`","optional":true,"type":[[["string"]]]},{"name":"attachmentFilename","description":"The name of an attachment","optional":true,"type":[[["string"]]]},{"name":"attachmentExtension","description":"The extension of an attachment","optional":true,"type":[[["string"]]]},{"name":"before","description":"Date to find messages before","optional":true,"type":[[["Date"]]]},{"name":"after","description":"Date to find messages before","optional":true,"type":[[["Date"]]]},{"name":"during","description":"Date to find messages during (range of date to date + 24 hours)","optional":true,"type":[[["Date"]]]},{"name":"nsfw","description":"Include results from NSFW channels","optional":true,"default":false,"type":[[["boolean"]]]}],"meta":{"line":239,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"MessageSearchResult","type":[[["Object"]]],"props":[{"name":"totalResults","description":"Total result count","type":[[["number"]]]},{"name":"messages","description":"Array of message results\nThe message which has triggered the result will have the `hit` property set to `true`","type":[[["Array","<"],["Array","<"],["Message",">>"]]]}],"meta":{"line":267,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"AwaitMessagesOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":[[["MessageCollectorOptions"]]],"props":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":[[["Array","<"],["string",">"]]]}],"meta":{"line":392,"file":"TextBasedChannel.js","path":"src/structures/interfaces"}},{"name":"AwaitReactionsOptions","description":"An object containing the same properties as CollectorOptions, but a few more:","type":[[["ReactionCollectorOptions"]]],"props":[{"name":"errors","description":"Stop/end reasons that cause the promise to reject","optional":true,"type":[[["Array","<"],["string",">"]]]}],"meta":{"line":266,"file":"Message.js","path":"src/structures"}},{"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":363,"file":"Message.js","path":"src/structures"}},{"name":"MessageCollectorOptions","type":[[["CollectorOptions"]]],"props":[{"name":"max","description":"The maximum amount of messages to process","type":[[["number"]]]},{"name":"maxMatches","description":"The maximum amount of messages to collect","type":[[["number"]]]}],"meta":{"line":4,"file":"MessageCollector.js","path":"src/structures"}},{"name":"ReactionCollectorOptions","type":[[["CollectorOptions"]]],"props":[{"name":"max","description":"The maximum total amount of reactions to collect","type":[[["number"]]]},{"name":"maxEmojis","description":"The maximum number of emojis to collect","type":[[["number"]]]},{"name":"maxUsers","description":"The maximum number of users to react","type":[[["number"]]]}],"meta":{"line":4,"file":"ReactionCollector.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":[[["ColorResolvable"]]]},{"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","<"],["PermissionResolvable",">"]],[["number"]]]},{"name":"mentionable","description":"Whether or not the role should be mentionable","optional":true,"type":[[["boolean"]]]}],"meta":{"line":191,"file":"Role.js","path":"src/structures"}},{"name":"WebhookMessageOptions","description":"Options that can be passed into send, sendMessage, sendFile, sendEmbed, and sendCode.","type":[[["Object"]]],"props":[{"name":"username","description":"Username override for the message","optional":true,"default":"this.name","type":[[["string"]]]},{"name":"avatarURL","description":"Avatar URL override for the message","optional":true,"type":[[["string"]]]},{"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":"embeds","description":"An array of embeds for the message\n(see [here](https://discordapp.com/developers/docs/resources/channel#embed-object) for more details)","optional":true,"type":[[["Array","<("],["RichEmbed","|"],["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 **(deprecated)**","optional":true,"type":[[["FileOptions"]],[["BufferResolvable"]],[["Attachment"]]]},{"name":"files","description":"Files to send with the message","optional":true,"type":[[["Array","<"],["FileOptions",">"]],[["Array","<"],["BufferResolvable",">"]],[["Array","<"],["Attachment",">"]]]},{"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":75,"file":"Webhook.js","path":"src/structures"}},{"name":"ClientOptions","description":"Options for a client.","type":[[["Object"]]],"props":[{"name":"apiRequestMethod","description":"One of `sequential` or `burst`. The sequential handler executes\nall requests in the order they are triggered, whereas the burst handler runs multiple in parallel, and doesn't\nprovide the guarantee of any particular order. Burst mode is more likely to hit a 429 ratelimit error by its nature,\nand is therefore slightly riskier to use.","optional":true,"default":"'sequential'","type":[[["string"]]]},{"name":"shardId","description":"ID of the shard to run","optional":true,"default":0,"type":[[["number"]]]},{"name":"shardCount","description":"Total 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 a message should stay in the cache until it is considered\nsweepable (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 (should be avoided whenever possible)","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"disableEveryone","description":"Default value for {@link MessageOptions#disableEveryone}","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"sync","description":"Whether to periodically sync guilds (for user accounts)","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":"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"]]]},{"name":"http","description":"HTTP options","optional":true,"type":[[["HTTPOptions"]]]}],"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\n(defaults to `false` for browsers)","optional":true,"default":true,"type":[[["boolean"]]]}],"meta":{"line":48,"file":"Constants.js","path":"src/util"}},{"name":"HTTPOptions","description":"HTTP options","type":[[["Object"]]],"props":[{"name":"version","description":"API version to use","optional":true,"default":7,"type":[[["number"]]]},{"name":"api","description":"Base url of the API","optional":true,"default":"'https://discordapp.com/api'","type":[[["string"]]]},{"name":"cdn","description":"Base url of the CDN","optional":true,"default":"'https://cdn.discordapp.com'","type":[[["string"]]]},{"name":"invite","description":"Base url of invites","optional":true,"default":"'https://discord.gg'","type":[[["string"]]]}],"meta":{"line":68,"file":"Constants.js","path":"src/util"}},{"name":"Status","description":"The current status of the client. Here are the available statuses:\n* READY\n* CONNECTING\n* RECONNECTING\n* IDLE\n* NEARLY\n* DISCONNECTED","type":[[["number"]]],"meta":{"line":237,"file":"Constants.js","path":"src/util"}},{"name":"VoiceStatus","description":"The current status of a voice connection. Here are the available statuses:\n* CONNECTED\n* CONNECTING\n* AUTHENTICATING\n* RECONNECTING\n* DISCONNECTED","type":[[["number"]]],"meta":{"line":256,"file":"Constants.js","path":"src/util"}},{"name":"ActivityType","description":"The type of an activity of a users presence, e.g. `PLAYING`. Here are the available types:\n* PLAYING\n* STREAMING\n* LISTENING\n* WATCHING","type":[[["string"]]],"meta":{"line":353,"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* RESUMED\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* USER_SETTINGS_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":368,"file":"Constants.js","path":"src/util"}},{"name":"MessageType","description":"The type of a message, e.g. `DEFAULT`. Here are the available types:\n* DEFAULT\n* RECIPIENT_ADD\n* RECIPIENT_REMOVE\n* CALL\n* CHANNEL_NAME_CHANGE\n* CHANNEL_ICON_CHANGE\n* PINS_ADD\n* GUILD_MEMBER_JOIN","type":[[["string"]]],"meta":{"line":447,"file":"Constants.js","path":"src/util"}},{"name":"MessageNotificationType","description":"The type of a message notification setting. Here are the available types:\n* EVERYTHING\n* MENTIONS\n* NOTHING\n* INHERIT (only for GuildChannel)","type":[[["string"]]],"meta":{"line":470,"file":"Constants.js","path":"src/util"}},{"name":"APIError","description":"An error encountered while performing an API request. Here are the potential errors:\n* UNKNOWN_ACCOUNT\n* UNKNOWN_APPLICATION\n* UNKNOWN_CHANNEL\n* UNKNOWN_GUILD\n* UNKNOWN_INTEGRATION\n* UNKNOWN_INVITE\n* UNKNOWN_MEMBER\n* UNKNOWN_MESSAGE\n* UNKNOWN_OVERWRITE\n* UNKNOWN_PROVIDER\n* UNKNOWN_ROLE\n* UNKNOWN_TOKEN\n* UNKNOWN_USER\n* UNKNOWN_EMOJI\n* BOT_PROHIBITED_ENDPOINT\n* BOT_ONLY_ENDPOINT\n* MAXIMUM_GUILDS\n* MAXIMUM_FRIENDS\n* MAXIMUM_PINS\n* MAXIMUM_ROLES\n* MAXIMUM_REACTIONS\n* UNAUTHORIZED\n* MISSING_ACCESS\n* INVALID_ACCOUNT_TYPE\n* CANNOT_EXECUTE_ON_DM\n* EMBED_DISABLED\n* CANNOT_EDIT_MESSAGE_BY_OTHER\n* CANNOT_SEND_EMPTY_MESSAGE\n* CANNOT_MESSAGE_USER\n* CANNOT_SEND_MESSAGES_IN_VOICE_CHANNEL\n* CHANNEL_VERIFICATION_LEVEL_TOO_HIGH\n* OAUTH2_APPLICATION_BOT_ABSENT\n* MAXIMUM_OAUTH2_APPLICATIONS\n* INVALID_OAUTH_STATE\n* MISSING_PERMISSIONS\n* INVALID_AUTHENTICATION_TOKEN\n* NOTE_TOO_LONG\n* INVALID_BULK_DELETE_QUANTITY\n* CANNOT_PIN_MESSAGE_IN_OTHER_CHANNEL\n* CANNOT_EXECUTE_ON_SYSTEM_MESSAGE\n* BULK_DELETE_MESSAGE_TOO_OLD\n* INVITE_ACCEPTED_TO_GUILD_NOT_CONTANING_BOT\n* REACTION_BLOCKED","type":[[["string"]]],"meta":{"line":712,"file":"Constants.js","path":"src/util"}},{"name":"PermissionResolvable","description":"Data that can be resolved to give a permission number. This can be:\n* A string (see {@link Permissions.FLAGS})\n* A permission number","type":[[["string"]],[["number"]]],"meta":{"line":153,"file":"Permissions.js","path":"src/util"}},{"name":"Snowflake","description":"A Twitter snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```","type":[[["string"]]],"meta":{"line":15,"file":"Snowflake.js","path":"src/util"}},{"name":"DeconstructedSnowflake","description":"A deconstructed snowflake.","type":[[["Object"]]],"props":[{"name":"timestamp","description":"Timestamp the snowflake was created","type":[[["number"]]]},{"name":"date","description":"Date the snowflake was created","type":[[["Date"]]]},{"name":"workerID","description":"Worker ID in the snowflake","type":[[["number"]]]},{"name":"processID","description":"Process ID in the snowflake","type":[[["number"]]]},{"name":"increment","description":"Increment in the snowflake","type":[[["number"]]]},{"name":"binary","description":"Binary representation of the snowflake","type":[[["string"]]]}],"meta":{"line":38,"file":"Snowflake.js","path":"src/util"}}],"externals":[{"name":"Stream","see":["{@link https://nodejs.org/api/stream.html}"],"meta":{"line":239,"file":"ClientDataResolver.js","path":"src/client"}},{"name":"Prism","see":["{@link https://github.com/hydrabolt/prism-media}"],"meta":{"line":37,"file":"VoiceConnection.js","path":"src/client/voice"}},{"name":"CloseEvent","see":["{@link https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent}"],"meta":{"line":376,"file":"WebSocketConnection.js","path":"src/client/websocket"}}]}