From 18299970bd23aef6c5966203899751279b125175 Mon Sep 17 00:00:00 2001 From: Amish Shah Date: Thu, 18 Aug 2016 13:07:42 +0100 Subject: [PATCH] Updated to docs format v3, adds support for interfaces --- docs/docs.json | 2 +- docs/gen/index.js | 19 ++++++--- package.json | 2 +- src/structures/TextChannel.js | 1 + src/structures/User.js | 5 +++ src/structures/interface/TextBasedChannel.js | 43 +++++++++++++++++--- 6 files changed, 59 insertions(+), 13 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 7956608c7..fd24ba362 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -1 +1 @@ -{"meta":{"version":2},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":127},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":128},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":129}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":120},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":121},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":122},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":123},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":124},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":125},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":126}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"examples":["// set a new channel name\nchannel.setName('not general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":132}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":130},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":131}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":70},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":85},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":86},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":87}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":71},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":74},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":75},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":76},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":77},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":78},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":79},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":80},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":81},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":82},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":83},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":84}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":88},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":98},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":99},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":100},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":101},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":102},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":103},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":104},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":105},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":106}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":93},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":94},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":95},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":96},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":97}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":9,"filename":"TextChannel.js","path":"src/structures"},"order":107},"functions":[{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":139},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":140},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"examples":["// set a new channel name\nchannel.setName('not general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":141},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":142},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":143},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":144},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":147}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":133},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":134},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":135},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":136},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":137},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":138},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":145},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":146}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","description":"Represents a User on Discord.","meta":{"lineno":6,"filename":"User.js","path":"src/structures"},"order":108},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":63,"filename":"User.js","path":"src/structures"},"order":116},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":71,"filename":"User.js","path":"src/structures"},"order":117},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":81,"filename":"User.js","path":"src/structures"},"order":118}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":19,"filename":"User.js","path":"src/structures"},"order":109},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":24,"filename":"User.js","path":"src/structures"},"order":110},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":29,"filename":"User.js","path":"src/structures"},"order":111},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":34,"filename":"User.js","path":"src/structures"},"order":112},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":39,"filename":"User.js","path":"src/structures"},"order":113},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":48,"filename":"User.js","path":"src/structures"},"order":114},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":53,"filename":"User.js","path":"src/structures"},"order":115}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":119},"functions":[{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":154},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":155},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"examples":["// set a new channel name\nchannel.setName('not general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":156},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":157},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":158},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":159},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":162}],"properties":[{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":148},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":149},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":150},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":151},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":152},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":153},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":160},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":161}],"events":[]}}}} \ No newline at end of file +{"meta":{"version":3},"custom":{"general":{"Getting Started":"# Welcome!\ndiscord.js is an easy-to-use and intuitive JavaScript library that wraps around the Discord API.\n\n## Installation\nTo install discord.js from npm:\n```bash\nnpm i --save discord.js\n```\n\nTo install discord.js from the master branch:\n```bash\nnpm i --save hydrabolt/discord.js\n```\n\nTo install discord.js from the development branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev\n```\n\nTo install discord.js from the rewrite branch:\n```bash\nnpm i --save hydrabolt/discord.js#indev-rewrite\n```\n"}},"json":{"classes":{"Client":{"meta":{"id":"Client","longname":"Client","name":"Client","scope":"global","kind":"class","description":"Creates a new Discord Client\n```js\nconst Discord = require(\"discord.js\");\nconst client = new Discord.Client();\n```","meta":{"lineno":18,"filename":"Client.js","path":"src/client"},"order":0},"functions":[{"id":"Client#login","longname":"Client#login","name":"login","scope":"instance","kind":"function","description":"Logs the client in. If successful, resolves with the account's token. If you're making a bot, it's\nmuch better to use a bot account rather than a user account.\nBot accounts have higher rate limits and have access to some features user accounts don't have. User bots\nthat are making a lot of API requests can even be banned.","memberof":"Client","params":[{"type":{"names":["string"]},"description":"The email or token used for the account. If it is an email, a password _must_ be\nprovided.","name":"emailOrToken"},{"type":{"names":["string"]},"optional":true,"description":"The password for the account, only needed if an email was provided.","name":"password"}],"examples":["// log the client in using a token\nconst token = 'my token';\nclient.login(token);","// log the client in using email and password\nconst email = 'user@email.com';\nconst password = 'supersecret123';\nclient.login(email, password);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":50,"filename":"Client.js","path":"src/client"},"order":1}],"properties":[{"id":"Client#user","longname":"Client#user","name":"user","scope":"instance","kind":"member","description":"The User of the logged in Client, only available after `READY` has been fired.","memberof":"Client","params":[],"type":{"names":["ClientUser"]},"meta":{"lineno":63,"filename":"Client.js","path":"src/client"},"order":2}],"events":[]},"Channel":{"meta":{"id":"Channel","longname":"Channel","name":"Channel","scope":"global","kind":"class","description":"Represents any Channel on Discord","meta":{"lineno":4,"filename":"Channel.js","path":"src/structures"},"order":3},"functions":[{"id":"Channel#delete","longname":"Channel#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the channel","memberof":"Channel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":6}],"properties":[{"id":"Channel#client","longname":"Channel#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Channel","memberof":"Channel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":4},{"id":"Channel#id","longname":"Channel#id","name":"id","scope":"instance","kind":"member","description":"The unique ID of the channel","memberof":"Channel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":5}],"events":[]},"ClientUser":{"meta":{"id":"ClientUser","longname":"ClientUser","name":"ClientUser","scope":"global","kind":"class","augments":["User"],"description":"Represents the logged in client's Discord User","meta":{"lineno":7,"filename":"ClientUser.js","path":"src/structures"},"order":7},"functions":[{"id":"ClientUser#setUsername","longname":"ClientUser#setUsername","name":"setUsername","scope":"instance","kind":"function","description":"Set the username of the logged in Client.\nChanging usernames in Discord is heavily rate limited, with only 2 requests\nevery hour. Use this sparingly!","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the new username","name":"username"}],"examples":["// set username\nclient.store.user.setUsername('discordjs')\n .then(user => console.log(`My new username is ${user.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":34,"filename":"ClientUser.js","path":"src/structures"},"order":10},{"id":"ClientUser#setEmail","longname":"ClientUser#setEmail","name":"setEmail","scope":"instance","kind":"function","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\nemail here.","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the new email","name":"email"}],"examples":["// set email\nclient.store.user.setEmail('bob@gmail.com')\n .then(user => console.log(`My new email is ${user.email}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":49,"filename":"ClientUser.js","path":"src/structures"},"order":11},{"id":"ClientUser#setPassword","longname":"ClientUser#setPassword","name":"setPassword","scope":"instance","kind":"function","description":"If this user is a \"self bot\" or logged in using a normal user's details (which should be avoided), you can set the\npassword here.","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the new password","name":"password"}],"examples":["// set password\nclient.store.user.setPassword('password')\n .then(user => console.log('New password set!'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":64,"filename":"ClientUser.js","path":"src/structures"},"order":12},{"id":"ClientUser#setAvatar","longname":"ClientUser#setAvatar","name":"setAvatar","scope":"instance","kind":"function","description":"Set the avatar of the logged in Client.","memberof":"ClientUser","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new avatar","name":"avatar"}],"examples":["// set avatar\nclient.store.user.setAvatar(fs.readFileSync('./avatar.png'))\n .then(user => console.log(`New avatar set!`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":77,"filename":"ClientUser.js","path":"src/structures"},"order":13},{"id":"ClientUser#toString","longname":"ClientUser#toString","name":"toString","scope":"instance","kind":"function","inherits":"User#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"ClientUser","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":131},{"id":"ClientUser#deleteDM","longname":"ClientUser#deleteDM","name":"deleteDM","scope":"instance","kind":"function","inherits":"User#deleteDM","inherited":true,"description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"ClientUser","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":132},{"id":"ClientUser#equals","longname":"ClientUser#equals","name":"equals","scope":"instance","kind":"function","inherits":"User#equals","inherited":true,"description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"ClientUser","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":133},{"id":"ClientUser#sendMessage","longname":"ClientUser#sendMessage","name":"sendMessage","scope":"instance","kind":"function","inherits":"User#sendMessage","inherited":true,"implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"ClientUser","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":134}],"properties":[{"id":"ClientUser#verified","longname":"ClientUser#verified","name":"verified","scope":"instance","kind":"member","description":"Whether or not this account has been verified","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":14,"filename":"ClientUser.js","path":"src/structures"},"order":8},{"id":"ClientUser#email","longname":"ClientUser#email","name":"email","scope":"instance","kind":"member","description":"The email of this account","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":19,"filename":"ClientUser.js","path":"src/structures"},"order":9},{"id":"ClientUser#username","longname":"ClientUser#username","name":"username","scope":"instance","kind":"member","inherits":"User#username","inherited":true,"description":"The username of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":124},{"id":"ClientUser#id","longname":"ClientUser#id","name":"id","scope":"instance","kind":"member","inherits":"User#id","inherited":true,"description":"The ID of the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":125},{"id":"ClientUser#discriminator","longname":"ClientUser#discriminator","name":"discriminator","scope":"instance","kind":"member","inherits":"User#discriminator","inherited":true,"description":"A discriminator based on username for the User","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":126},{"id":"ClientUser#avatar","longname":"ClientUser#avatar","name":"avatar","scope":"instance","kind":"member","inherits":"User#avatar","inherited":true,"description":"The ID of the user's avatar","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":127},{"id":"ClientUser#bot","longname":"ClientUser#bot","name":"bot","scope":"instance","kind":"member","inherits":"User#bot","inherited":true,"description":"Whether or not the User is a Bot.","memberof":"ClientUser","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":128},{"id":"ClientUser#status","longname":"ClientUser#status","name":"status","scope":"instance","kind":"member","inherits":"User#status","inherited":true,"description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":129},{"id":"ClientUser#game","longname":"ClientUser#game","name":"game","scope":"instance","kind":"member","inherits":"User#game","inherited":true,"description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"ClientUser","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":130}],"events":[]},"Guild":{"meta":{"id":"Guild","longname":"Guild","name":"Guild","scope":"global","kind":"class","description":"Represents a Guild (or a Server) on Discord.","meta":{"lineno":25,"filename":"Guild.js","path":"src/structures"},"order":14},"functions":[{"id":"Guild#toString","longname":"Guild#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Guild's name instead of the Guild object.","memberof":"Guild","params":[],"examples":["// logs: Hello from My Guild!\nconsole.log(`Hello from ${guild}!`);","// logs: Hello from My Guild!\nconsole.log(`Hello from ' + guild + '!');"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":97,"filename":"Guild.js","path":"src/structures"},"order":19},{"id":"Guild#kick","longname":"Guild#kick","name":"kick","scope":"instance","kind":"function","description":"Tries to kick a member from the guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the member to kick","name":"member"}],"examples":["// kicks a member from a guild:\nguild.kick(message.author)\n .then(member => console.log(`Kicked ${member}`))\n .catch(error => console.log(error));"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":111,"filename":"Guild.js","path":"src/structures"},"order":20},{"id":"Guild#member","longname":"Guild#member","name":"member","scope":"instance","kind":"function","description":"Returns the GuildMember form of a User object, if the User is present in the guild.","memberof":"Guild","params":[{"type":{"names":["UserResolvable"]},"description":"the user that you want to obtain the GuildMember of.","name":"user"}],"examples":["// get the guild member of a user\nconst member = guild.member(message.author);"],"returns":[{"type":{"names":["GuildMember","null"]}}],"meta":{"lineno":123,"filename":"Guild.js","path":"src/structures"},"order":21},{"id":"Guild#equals","longname":"Guild#equals","name":"equals","scope":"instance","kind":"function","description":"Whether this Guild equals another Guild. It compares all properties, so for most operations\nit is advisable to just compare `guild.id === guild2.id` as it is much faster and is often\nwhat most users need.","memberof":"Guild","params":[{"type":{"names":["Guild"]},"description":"the guild to compare","name":"guild"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":134,"filename":"Guild.js","path":"src/structures"},"order":22},{"id":"Guild#createChannel","longname":"Guild#createChannel","name":"createChannel","scope":"instance","kind":"function","description":"Creates a new Channel in the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the name of the new channel.","name":"name"},{"type":{"names":["String"]},"description":"the type of the new channel, either `text` or `voice`.","name":"type"}],"examples":["// create a new text channel\nguild.createChannel('new general', 'text')\n .then(channel => console.log(`Created new channel ${channel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise.<(TextChannel|VoiceChannel), Error>"]}}],"meta":{"lineno":301,"filename":"Guild.js","path":"src/structures"},"order":38},{"id":"Guild#createRole","longname":"Guild#createRole","name":"createRole","scope":"instance","kind":"function","description":"Creates a new role in the guild, as of now this is just a blank role.","memberof":"Guild","params":[],"examples":["// create a new role\nguild.createRole()\n .then(role => console.log(`Created role ${role}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":314,"filename":"Guild.js","path":"src/structures"},"order":39},{"id":"Guild#leave","longname":"Guild#leave","name":"leave","scope":"instance","kind":"function","description":"Causes the Client to leave the guild.","memberof":"Guild","params":[],"examples":["// leave a guild\nguild.leave()\n .then(g => console.log(`Left the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":327,"filename":"Guild.js","path":"src/structures"},"order":40},{"id":"Guild#delete","longname":"Guild#delete","name":"delete","scope":"instance","kind":"function","description":"Causes the Client to delete the guild.","memberof":"Guild","params":[],"examples":["// delete a guild\nguild.delete()\n .then(g => console.log(`Deleted the guild ${g}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":340,"filename":"Guild.js","path":"src/structures"},"order":41},{"id":"Guild#edit","longname":"Guild#edit","name":"edit","scope":"instance","kind":"function","description":"Updates the Guild with new information - e.g. a new name.","memberof":"Guild","params":[{"type":{"names":["GuildEditData"]},"description":"the data to update the guild with.","name":"data"}],"examples":["// set the guild name and region\nguild.edit({\n name: 'Discord Guild',\n region: 'london',\n})\n.then(updated => console.log(`New guild name ${updated.name} in region ${updated.region}`))\n.catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":357,"filename":"Guild.js","path":"src/structures"},"order":42},{"id":"Guild#setName","longname":"Guild#setName","name":"setName","scope":"instance","kind":"function","description":"Edit the name of the Guild.","memberof":"Guild","params":[{"type":{"names":["String"]},"description":"the new name of the Guild.","name":"name"}],"examples":["// edit the guild name\nguild.setName('Discord Guild')\n .then(updated => console.log(`Updated guild name to ${guild.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":371,"filename":"Guild.js","path":"src/structures"},"order":43},{"id":"Guild#setRegion","longname":"Guild#setRegion","name":"setRegion","scope":"instance","kind":"function","description":"Edit the region of the Guild.","memberof":"Guild","params":[{"type":{"names":["Region"]},"description":"the new region of the guild.","name":"region"}],"examples":["// edit the guild region\nguild.setRegion('london')\n .then(updated => console.log(`Updated guild region to ${guild.region}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":385,"filename":"Guild.js","path":"src/structures"},"order":44},{"id":"Guild#setVerificationLevel","longname":"Guild#setVerificationLevel","name":"setVerificationLevel","scope":"instance","kind":"function","description":"Edit the verification level of the Guild.","memberof":"Guild","params":[{"type":{"names":["VerificationLevel"]},"description":"the new verification level of the guild.","name":"verificationLevel"}],"examples":["// edit the guild verification level\nguild.setVerificationLevel(1)\n .then(updated => console.log(`Updated guild verification level to ${guild.verificationLevel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":399,"filename":"Guild.js","path":"src/structures"},"order":45},{"id":"Guild#setAFKChannel","longname":"Guild#setAFKChannel","name":"setAFKChannel","scope":"instance","kind":"function","description":"Edit the AFK channel of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildChannelResolvable"]},"description":"the new AFK channel.","name":"afkChannel"}],"examples":["// edit the guild AFK channel\nguild.setAFKChannel(channel)\n .then(updated => console.log(`Updated guild AFK channel to ${guild.afkChannel}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":413,"filename":"Guild.js","path":"src/structures"},"order":46},{"id":"Guild#setAFKTimeout","longname":"Guild#setAFKTimeout","name":"setAFKTimeout","scope":"instance","kind":"function","description":"Edit the AFK timeout of the Guild.","memberof":"Guild","params":[{"type":{"names":["Number"]},"description":"the time in seconds that a user must be idle to be considered AFK.","name":"afkTimeout"}],"examples":["// edit the guild AFK channel\nguild.setAFKTimeout(60)\n .then(updated => console.log(`Updated guild AFK timeout to ${guild.afkTimeout}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":427,"filename":"Guild.js","path":"src/structures"},"order":47},{"id":"Guild#setIcon","longname":"Guild#setIcon","name":"setIcon","scope":"instance","kind":"function","description":"Set a new Guild Icon.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new icon of the guild.","name":"icon"}],"examples":["// edit the guild icon\nguild.setIcon(fs.readFileSync('./icon.png'))\n .then(updated => console.log('Updated the guild icon'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":441,"filename":"Guild.js","path":"src/structures"},"order":48},{"id":"Guild#setOwner","longname":"Guild#setOwner","name":"setOwner","scope":"instance","kind":"function","description":"Sets a new owner of the Guild.","memberof":"Guild","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the new owner of the Guild.","name":"owner"}],"examples":["// edit the guild owner\nguild.setOwner(guilds.members[0])\n .then(updated => console.log(`Updated the guild owner to ${updated.owner.username}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":455,"filename":"Guild.js","path":"src/structures"},"order":49},{"id":"Guild#setSplash","longname":"Guild#setSplash","name":"setSplash","scope":"instance","kind":"function","description":"Set a new Guild Splash Logo.","memberof":"Guild","params":[{"type":{"names":["Base64Resolvable"]},"description":"the new splash screen of the guild.","name":"splash"}],"examples":["// edit the guild splash\nguild.setIcon(fs.readFileSync('./splash.png'))\n .then(updated => console.log('Updated the guild splash'))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":469,"filename":"Guild.js","path":"src/structures"},"order":50}],"properties":[{"id":"Guild#client","longname":"Guild#client","name":"client","scope":"instance","kind":"member","description":"The Client that created the instance of the the Guild.","memberof":"Guild","type":{"names":["Client"]},"meta":{"lineno":31,"filename":"Guild.js","path":"src/structures"},"order":15},{"id":"Guild#store","longname":"Guild#store","name":"store","scope":"instance","kind":"member","description":"The data store of the Guild.","memberof":"Guild","type":{"names":["GuildDataStore"]},"meta":{"lineno":37,"filename":"Guild.js","path":"src/structures"},"order":16},{"id":"Guild#available","longname":"Guild#available","name":"available","scope":"instance","kind":"member","description":"Whether the Guild is available to access. If it is not available, it indicates a server outage.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":48,"filename":"Guild.js","path":"src/structures"},"order":17},{"id":"Guild#id","longname":"Guild#id","name":"id","scope":"instance","kind":"member","description":"The Unique ID of the Guild, useful for comparisons.","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":53,"filename":"Guild.js","path":"src/structures"},"order":18},{"id":"Guild#splash","longname":"Guild#splash","name":"splash","scope":"instance","kind":"member","description":"The hash of the guild splash image, or null if no splash (VIP only)","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":169,"filename":"Guild.js","path":"src/structures"},"order":23},{"id":"Guild#region","longname":"Guild#region","name":"region","scope":"instance","kind":"member","description":"The region the guild is located in","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":174,"filename":"Guild.js","path":"src/structures"},"order":24},{"id":"Guild#name","longname":"Guild#name","name":"name","scope":"instance","kind":"member","description":"The name of the guild","memberof":"Guild","type":{"names":["String"]},"meta":{"lineno":179,"filename":"Guild.js","path":"src/structures"},"order":25},{"id":"Guild#memberCount","longname":"Guild#memberCount","name":"memberCount","scope":"instance","kind":"member","description":"The amount of initial members in the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":184,"filename":"Guild.js","path":"src/structures"},"order":26},{"id":"Guild#large","longname":"Guild#large","name":"large","scope":"instance","kind":"member","description":"Whether the guild is \"large\" (has more than 250 members)","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":189,"filename":"Guild.js","path":"src/structures"},"order":27},{"id":"Guild#joinDate","longname":"Guild#joinDate","name":"joinDate","scope":"instance","kind":"member","description":"The date at which the logged-in client joined the guild.","memberof":"Guild","type":{"names":["Date"]},"meta":{"lineno":194,"filename":"Guild.js","path":"src/structures"},"order":28},{"id":"Guild#icon","longname":"Guild#icon","name":"icon","scope":"instance","kind":"member","description":"The hash of the guild icon, or null if there is no icon.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":199,"filename":"Guild.js","path":"src/structures"},"order":29},{"id":"Guild#features","longname":"Guild#features","name":"features","scope":"instance","kind":"member","description":"An array of guild features.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":204,"filename":"Guild.js","path":"src/structures"},"order":30},{"id":"Guild#emojis","longname":"Guild#emojis","name":"emojis","scope":"instance","kind":"member","description":"An array of guild emojis.","memberof":"Guild","type":{"names":["Array."]},"meta":{"lineno":209,"filename":"Guild.js","path":"src/structures"},"order":31},{"id":"Guild#afkTimeout","longname":"Guild#afkTimeout","name":"afkTimeout","scope":"instance","kind":"member","description":"The time in seconds before a user is counted as \"away from keyboard\".","memberof":"Guild","type":{"names":["Number"]},"nullable":true,"meta":{"lineno":214,"filename":"Guild.js","path":"src/structures"},"order":32},{"id":"Guild#afkChannelID","longname":"Guild#afkChannelID","name":"afkChannelID","scope":"instance","kind":"member","description":"The ID of the voice channel where AFK members are moved.","memberof":"Guild","type":{"names":["String"]},"nullable":true,"meta":{"lineno":219,"filename":"Guild.js","path":"src/structures"},"order":33},{"id":"Guild#embedEnabled","longname":"Guild#embedEnabled","name":"embedEnabled","scope":"instance","kind":"member","description":"Whether embedded images are enabled on this guild.","memberof":"Guild","type":{"names":["Boolean"]},"meta":{"lineno":224,"filename":"Guild.js","path":"src/structures"},"order":34},{"id":"Guild#verificationLevel","longname":"Guild#verificationLevel","name":"verificationLevel","scope":"instance","kind":"member","description":"The verification level of the guild.","memberof":"Guild","type":{"names":["Number"]},"meta":{"lineno":229,"filename":"Guild.js","path":"src/structures"},"order":35},{"id":"Guild#owner","longname":"Guild#owner","name":"owner","scope":"instance","kind":"member","description":"The owner of the guild","memberof":"Guild","type":{"names":["User"]},"meta":{"lineno":243,"filename":"Guild.js","path":"src/structures"},"order":36},{"id":"Guild#embedChannel","longname":"Guild#embedChannel","name":"embedChannel","scope":"instance","kind":"member","description":"The embed channel of the Guild.","memberof":"Guild","type":{"names":["GuildChannel"]},"meta":{"lineno":256,"filename":"Guild.js","path":"src/structures"},"order":37},{"id":"Guild#channels","longname":"Guild#channels","name":"channels","scope":"instance","kind":"member","description":"The channels in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":478,"filename":"Guild.js","path":"src/structures"},"order":51},{"id":"Guild#$channels","longname":"Guild#$channels","name":"$channels","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of channels in this guild to the channel itself. If you want to find a channel\nin the guild by ID, use `guild.$channels[id]` rather than filtering `guild.channels` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":486,"filename":"Guild.js","path":"src/structures"},"order":52},{"id":"Guild#roles","longname":"Guild#roles","name":"roles","scope":"instance","kind":"member","description":"The roles in the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":493,"filename":"Guild.js","path":"src/structures"},"order":53},{"id":"Guild#$roles","longname":"Guild#$roles","name":"$roles","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of roles in this guild to the role itself. If you want to find a role\nin the guild by ID, use `guild.$roles[id]` rather than filtering `guild.roles` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":501,"filename":"Guild.js","path":"src/structures"},"order":54},{"id":"Guild#members","longname":"Guild#members","name":"members","scope":"instance","kind":"member","description":"The members of the guild.","memberof":"Guild","params":[],"type":{"names":["Array."]},"readonly":true,"meta":{"lineno":508,"filename":"Guild.js","path":"src/structures"},"order":55},{"id":"Guild#$members","longname":"Guild#$members","name":"$members","scope":"instance","kind":"member","description":"A dictionary mapping the IDs of members in this guild to the member object itself. If you want to find a member\nin the guild by ID, use `guild.$members[id]` rather than filtering `guild.members` as it is much more efficient.","memberof":"Guild","params":[],"type":{"names":["Object."]},"readonly":true,"meta":{"lineno":516,"filename":"Guild.js","path":"src/structures"},"order":56}],"events":[]},"GuildChannel":{"meta":{"id":"GuildChannel","longname":"GuildChannel","name":"GuildChannel","scope":"global","kind":"class","augments":["Channel"],"description":"Represents a Guild Channel (i.e. Text Channels and Voice Channels)","meta":{"lineno":25,"filename":"GuildChannel.js","path":"src/structures"},"order":57},"functions":[{"id":"GuildChannel#equals","longname":"GuildChannel#equals","name":"equals","scope":"instance","kind":"function","description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"GuildChannel","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":64},{"id":"GuildChannel#permissionsFor","longname":"GuildChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"GuildChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":65},{"id":"GuildChannel#setName","longname":"GuildChannel#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"examples":["// set a new channel name\nchannel.setName('not general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":66},{"id":"GuildChannel#setPosition","longname":"GuildChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set a new position for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":67},{"id":"GuildChannel#setTopic","longname":"GuildChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","description":"Set a new topic for the Guild Channel","memberof":"GuildChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":68},{"id":"GuildChannel#toString","longname":"GuildChannel#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"GuildChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":69},{"id":"GuildChannel#delete","longname":"GuildChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"GuildChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":137}],"properties":[{"id":"GuildChannel#type","longname":"GuildChannel#type","name":"type","scope":"instance","kind":"member","description":"The type of the Guild Channel","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":58},{"id":"GuildChannel#topic","longname":"GuildChannel#topic","name":"topic","scope":"instance","kind":"member","description":"The topic of the Guild Channel, if there is one.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":59},{"id":"GuildChannel#position","longname":"GuildChannel#position","name":"position","scope":"instance","kind":"member","description":"The position of the channel in the list.","memberof":"GuildChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":60},{"id":"GuildChannel#name","longname":"GuildChannel#name","name":"name","scope":"instance","kind":"member","description":"The name of the Guild Channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":61},{"id":"GuildChannel#lastMessageID","longname":"GuildChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","description":"The ID of the last message in the channel, if one was sent.","memberof":"GuildChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":62},{"id":"GuildChannel#permissionOverwrites","longname":"GuildChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","description":"A list of permission overwrites in this channel for roles and users.","memberof":"GuildChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":63},{"id":"GuildChannel#client","longname":"GuildChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"GuildChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":135},{"id":"GuildChannel#id","longname":"GuildChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"GuildChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":136}],"events":[]},"Message":{"meta":{"id":"Message","longname":"Message","name":"Message","scope":"global","kind":"class","description":"Represents a Message on Discord","meta":{"lineno":4,"filename":"Message.js","path":"src/structures"},"order":70},"functions":[{"id":"Message#equals","longname":"Message#equals","name":"equals","scope":"instance","kind":"function","description":"Used mainly internally. Whether two messages are identical in properties. If you want to compare messages\nwithout checking all the properties, use `message.id === message2.id`, which is much more efficient. This\nmethod allows you to see if there are differences in content, embeds, attachments, nonce and tts properties.","memberof":"Message","params":[{"type":{"names":["Message"]},"description":"The message to compare it to","name":"message"},{"type":{"names":["Object"]},"description":"Raw data passed through the WebSocket about this message","name":"rawData"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":150,"filename":"Message.js","path":"src/structures"},"order":85},{"id":"Message#delete","longname":"Message#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the message","memberof":"Message","params":[],"examples":["// delete a message\nmessage.delete()\n .then(msg => console.log(`Deleted message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":184,"filename":"Message.js","path":"src/structures"},"order":86},{"id":"Message#edit","longname":"Message#edit","name":"edit","scope":"instance","kind":"function","description":"Edit the content of a message","memberof":"Message","params":[{"type":{"names":["String"]},"description":"the new content of a message","name":"content"}],"examples":["// update the content of a message\nmessage.edit('This is my new content!')\n .then(msg => console.log(`Updated the content of a message from ${msg.author}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":198,"filename":"Message.js","path":"src/structures"},"order":87}],"properties":[{"id":"Message#channel","longname":"Message#channel","name":"channel","scope":"instance","kind":"member","description":"The channel that the message was sent in","memberof":"Message","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Message.js","path":"src/structures"},"order":71},{"id":"Message#guild","longname":"Message#guild","name":"guild","scope":"instance","kind":"member","description":"If the message was sent in a guild, this will be the guild the message was sent in","memberof":"Message","type":{"names":["Guild"]},"nullable":true,"meta":{"lineno":17,"filename":"Message.js","path":"src/structures"},"order":72},{"id":"Message#client","longname":"Message#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the Object","memberof":"Message","type":{"names":["Client"]},"meta":{"lineno":24,"filename":"Message.js","path":"src/structures"},"order":73},{"id":"Message#author","longname":"Message#author","name":"author","scope":"instance","kind":"member","description":"The author of the message","memberof":"Message","type":{"names":["User"]},"meta":{"lineno":35,"filename":"Message.js","path":"src/structures"},"order":74},{"id":"Message#content","longname":"Message#content","name":"content","scope":"instance","kind":"member","description":"The content of the message","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Message.js","path":"src/structures"},"order":75},{"id":"Message#timestamp","longname":"Message#timestamp","name":"timestamp","scope":"instance","kind":"member","description":"When the message was sent","memberof":"Message","type":{"names":["Date"]},"meta":{"lineno":45,"filename":"Message.js","path":"src/structures"},"order":76},{"id":"Message#editedTimestamp","longname":"Message#editedTimestamp","name":"editedTimestamp","scope":"instance","kind":"member","description":"If the message was edited, the timestamp at which it was last edited","memberof":"Message","type":{"names":["Date"]},"nullable":true,"meta":{"lineno":50,"filename":"Message.js","path":"src/structures"},"order":77},{"id":"Message#tts","longname":"Message#tts","name":"tts","scope":"instance","kind":"member","description":"Whether or not the message was Text-To-Speech","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Message.js","path":"src/structures"},"order":78},{"id":"Message#mentionEveryone","longname":"Message#mentionEveryone","name":"mentionEveryone","scope":"instance","kind":"member","description":"Whether the message mentioned @everyone or not","memberof":"Message","type":{"names":["Boolean"]},"meta":{"lineno":60,"filename":"Message.js","path":"src/structures"},"order":79},{"id":"Message#nonce","longname":"Message#nonce","name":"nonce","scope":"instance","kind":"member","description":"A random number used for checking message delivery","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":65,"filename":"Message.js","path":"src/structures"},"order":80},{"id":"Message#embeds","longname":"Message#embeds","name":"embeds","scope":"instance","kind":"member","description":"A list of embeds in the message - e.g. YouTube Player","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":70,"filename":"Message.js","path":"src/structures"},"order":81},{"id":"Message#attachments","longname":"Message#attachments","name":"attachments","scope":"instance","kind":"member","description":"A list of attachments in the message - e.g. Pictures","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":75,"filename":"Message.js","path":"src/structures"},"order":82},{"id":"Message#mentions","longname":"Message#mentions","name":"mentions","scope":"instance","kind":"member","description":"A list of users mentioned in the message","memberof":"Message","type":{"names":["Array."]},"meta":{"lineno":80,"filename":"Message.js","path":"src/structures"},"order":83},{"id":"Message#id","longname":"Message#id","name":"id","scope":"instance","kind":"member","description":"The ID of the message (unique in the channel it was sent)","memberof":"Message","type":{"names":["String"]},"meta":{"lineno":85,"filename":"Message.js","path":"src/structures"},"order":84}],"events":[]},"Role":{"meta":{"id":"Role","longname":"Role","name":"Role","scope":"global","kind":"class","description":"Represents a Role on Discord","meta":{"lineno":6,"filename":"Role.js","path":"src/structures"},"order":88},"functions":[{"id":"Role#delete","longname":"Role#delete","name":"delete","scope":"instance","kind":"function","description":"Deletes the role","memberof":"Role","params":[],"examples":["// delete a role\nrole.delete()\n .then(r => console.log(`Deleted role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":82,"filename":"Role.js","path":"src/structures"},"order":98},{"id":"Role#edit","longname":"Role#edit","name":"edit","scope":"instance","kind":"function","description":"Edits the role","memberof":"Role","params":[{"type":{"names":["RoleData"]},"description":"the new data for the role","name":"data"}],"examples":["// edit a role\nrole.edit({name: 'new role'})\n .then(r => console.log(`Edited role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":96,"filename":"Role.js","path":"src/structures"},"order":99},{"id":"Role#setName","longname":"Role#setName","name":"setName","scope":"instance","kind":"function","description":"Set a new name for the role","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the new name of the role","name":"name"}],"examples":["// set the name of the role\nrole.setName('new role')\n .then(r => console.log(`Edited name of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":110,"filename":"Role.js","path":"src/structures"},"order":100},{"id":"Role#setColor","longname":"Role#setColor","name":"setColor","scope":"instance","kind":"function","description":"Set a new color for the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the new color for the role","name":"color"}],"examples":["// set the color of a role\nrole.setColor(parseInt('FF0000', 16))\n .then(r => console.log(`Set color of role ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":124,"filename":"Role.js","path":"src/structures"},"order":101},{"id":"Role#setHoist","longname":"Role#setHoist","name":"setHoist","scope":"instance","kind":"function","description":"Set whether or not the role should be hoisted","memberof":"Role","params":[{"type":{"names":["Boolean"]},"description":"whether or not to hoist the role","name":"hoist"}],"examples":["// set the hoist of the role\nrole.setHoist(true)\n .then(r => console.log(`Role hoisted: ${r.hoist}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":138,"filename":"Role.js","path":"src/structures"},"order":102},{"id":"Role#setPosition","longname":"Role#setPosition","name":"setPosition","scope":"instance","kind":"function","description":"Set the position of the role","memberof":"Role","params":[{"type":{"names":["Number"]},"description":"the position of the role","name":"position"}],"examples":["// set the position of the role\nrole.setPosition(1)\n .then(r => console.log(`Role position: ${r.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":152,"filename":"Role.js","path":"src/structures"},"order":103},{"id":"Role#setPermissions","longname":"Role#setPermissions","name":"setPermissions","scope":"instance","kind":"function","description":"Set the permissions of the role","memberof":"Role","params":[{"type":{"names":["Array."]},"description":"the permissions of the role","name":"permissions"}],"examples":["// set the permissions of the role\nrole.setPermissions(['KICK_MEMBERS', 'BAN_MEMBERS'])\n .then(r => console.log(`Role updated ${r}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":166,"filename":"Role.js","path":"src/structures"},"order":104},{"id":"Role#serialize","longname":"Role#serialize","name":"serialize","scope":"instance","kind":"function","description":"Get an object mapping permission names to whether or not the role enables that permission","memberof":"Role","params":[],"examples":["// print the serialized role\nconsole.log(role.serialize());"],"returns":[{"type":{"names":["Object."]}}],"meta":{"lineno":177,"filename":"Role.js","path":"src/structures"},"order":105},{"id":"Role#hasPermission","longname":"Role#hasPermission","name":"hasPermission","scope":"instance","kind":"function","description":"Whether or not the role includes the given permission","memberof":"Role","params":[{"type":{"names":["String"]},"description":"the name of the permission to test","name":"permission"},{"type":{"names":["Boolean"]},"optional":true,"defaultvalue":false,"description":"whether or not the inclusion of the permission is explicit","name":"explicit"}],"examples":["// see if a role can ban a member\nif (role.hasPermission('BAN_MEMBERS')) {\n console.log('This role can ban members');\n} else {\n console.log('This role can\\'t ban members');\n}"],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":199,"filename":"Role.js","path":"src/structures"},"order":106}],"properties":[{"id":"Role#guild","longname":"Role#guild","name":"guild","scope":"instance","kind":"member","description":"The guild that the role belongs to","memberof":"Role","type":{"names":["Guild"]},"meta":{"lineno":12,"filename":"Role.js","path":"src/structures"},"order":89},{"id":"Role#client","longname":"Role#client","name":"client","scope":"instance","kind":"member","description":"The client that instantiated the role","memberof":"Role","type":{"names":["Client"]},"meta":{"lineno":17,"filename":"Role.js","path":"src/structures"},"order":90},{"id":"Role#id","longname":"Role#id","name":"id","scope":"instance","kind":"member","description":"The ID of the role (unique to the guild it is part of)","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":40,"filename":"Role.js","path":"src/structures"},"order":91},{"id":"Role#name","longname":"Role#name","name":"name","scope":"instance","kind":"member","description":"The name of the role","memberof":"Role","type":{"names":["String"]},"meta":{"lineno":45,"filename":"Role.js","path":"src/structures"},"order":92},{"id":"Role#color","longname":"Role#color","name":"color","scope":"instance","kind":"member","description":"The base 10 color of the role","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":50,"filename":"Role.js","path":"src/structures"},"order":93},{"id":"Role#hoist","longname":"Role#hoist","name":"hoist","scope":"instance","kind":"member","description":"If true, users that are part of this role will appear in a separate category in the users list","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":55,"filename":"Role.js","path":"src/structures"},"order":94},{"id":"Role#position","longname":"Role#position","name":"position","scope":"instance","kind":"member","description":"The position of the role in the role manager","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":60,"filename":"Role.js","path":"src/structures"},"order":95},{"id":"Role#permissions","longname":"Role#permissions","name":"permissions","scope":"instance","kind":"member","description":"The evaluated permissions number","memberof":"Role","type":{"names":["Number"]},"meta":{"lineno":65,"filename":"Role.js","path":"src/structures"},"order":96},{"id":"Role#managed","longname":"Role#managed","name":"managed","scope":"instance","kind":"member","description":"Whether or not the role is managed by an external service","memberof":"Role","type":{"names":["Boolean"]},"meta":{"lineno":70,"filename":"Role.js","path":"src/structures"},"order":97}],"events":[]},"TextChannel":{"meta":{"id":"TextChannel","longname":"TextChannel","name":"TextChannel","scope":"global","kind":"class","augments":["GuildChannel"],"implements":["TextBasedChannel"],"description":"Represents a Server Text Channel on Discord.","meta":{"lineno":10,"filename":"TextChannel.js","path":"src/structures"},"order":107},"functions":[{"id":"TextChannel#equals","longname":"TextChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"TextChannel","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":144},{"id":"TextChannel#permissionsFor","longname":"TextChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"TextChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":145},{"id":"TextChannel#setName","longname":"TextChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"examples":["// set a new channel name\nchannel.setName('not general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":146},{"id":"TextChannel#setPosition","longname":"TextChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":147},{"id":"TextChannel#setTopic","longname":"TextChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"TextChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":148},{"id":"TextChannel#toString","longname":"TextChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"TextChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":149},{"id":"TextChannel#delete","longname":"TextChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"TextChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":152}],"properties":[{"id":"TextChannel#type","longname":"TextChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":138},{"id":"TextChannel#topic","longname":"TextChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":139},{"id":"TextChannel#position","longname":"TextChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"TextChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":140},{"id":"TextChannel#name","longname":"TextChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":141},{"id":"TextChannel#lastMessageID","longname":"TextChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"TextChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":142},{"id":"TextChannel#permissionOverwrites","longname":"TextChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"TextChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":143},{"id":"TextChannel#client","longname":"TextChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"TextChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":150},{"id":"TextChannel#id","longname":"TextChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"TextChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":151}],"events":[]},"User":{"meta":{"id":"User","longname":"User","name":"User","scope":"global","kind":"class","implements":["TextBasedChannel"],"description":"Represents a User on Discord.","meta":{"lineno":7,"filename":"User.js","path":"src/structures"},"order":108},"functions":[{"id":"User#toString","longname":"User#toString","name":"toString","scope":"instance","kind":"function","description":"When concatenated with a String, this automatically concatenates the User's mention instead of the User object.","memberof":"User","params":[],"examples":["// logs: Hello from <@123456789>!\nconsole.log(`Hello from ${user}!`);"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":64,"filename":"User.js","path":"src/structures"},"order":116},{"id":"User#deleteDM","longname":"User#deleteDM","name":"deleteDM","scope":"instance","kind":"function","description":"Deletes a DM Channel (if one exists) between the Client and the User. Resolves with the Channel if successful.","memberof":"User","params":[],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":72,"filename":"User.js","path":"src/structures"},"order":117},{"id":"User#equals","longname":"User#equals","name":"equals","scope":"instance","kind":"function","description":"Checks if the user is equal to another. It compares username, ID, discriminator, status and the game being played.\nIt is recommended to compare equality by using `user.id === user2.id` unless you want to compare all properties.","memberof":"User","params":[{"type":{"names":["User"]},"description":"the user to compare","name":"user"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":82,"filename":"User.js","path":"src/structures"},"order":118},{"id":"User#sendMessage","longname":"User#sendMessage","name":"sendMessage","scope":"instance","kind":"function","implements":["TextBasedChannel#sendMessage"],"description":"Send a message to this channel","memberof":"User","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":123}],"properties":[{"id":"User#username","longname":"User#username","name":"username","scope":"instance","kind":"member","description":"The username of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":20,"filename":"User.js","path":"src/structures"},"order":109},{"id":"User#id","longname":"User#id","name":"id","scope":"instance","kind":"member","description":"The ID of the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":25,"filename":"User.js","path":"src/structures"},"order":110},{"id":"User#discriminator","longname":"User#discriminator","name":"discriminator","scope":"instance","kind":"member","description":"A discriminator based on username for the User","memberof":"User","type":{"names":["String"]},"meta":{"lineno":30,"filename":"User.js","path":"src/structures"},"order":111},{"id":"User#avatar","longname":"User#avatar","name":"avatar","scope":"instance","kind":"member","description":"The ID of the user's avatar","memberof":"User","type":{"names":["String"]},"meta":{"lineno":35,"filename":"User.js","path":"src/structures"},"order":112},{"id":"User#bot","longname":"User#bot","name":"bot","scope":"instance","kind":"member","description":"Whether or not the User is a Bot.","memberof":"User","type":{"names":["Boolean"]},"meta":{"lineno":40,"filename":"User.js","path":"src/structures"},"order":113},{"id":"User#status","longname":"User#status","name":"status","scope":"instance","kind":"member","description":"The status of the user:\n\n* **`online`** - user is online\n* **`offline`** - user is offline\n* **`idle`** - user is AFK","memberof":"User","type":{"names":["String"]},"meta":{"lineno":49,"filename":"User.js","path":"src/structures"},"order":114},{"id":"User#game","longname":"User#game","name":"game","scope":"instance","kind":"member","description":"The game that the user is playing, `null` if they aren't playing a game.","memberof":"User","type":{"names":["String"]},"meta":{"lineno":54,"filename":"User.js","path":"src/structures"},"order":115}],"events":[]},"VoiceChannel":{"meta":{"id":"VoiceChannel","longname":"VoiceChannel","name":"VoiceChannel","scope":"global","kind":"class","augments":["GuildChannel"],"description":"Represents a Server Voice Channel on Discord.","meta":{"lineno":8,"filename":"VoiceChannel.js","path":"src/structures"},"order":119},"functions":[{"id":"VoiceChannel#equals","longname":"VoiceChannel#equals","name":"equals","scope":"instance","kind":"function","inherits":"GuildChannel#equals","inherited":true,"description":"Checks if this channel has the same type, topic, position, name, overwrites and ID as another channel.\nIn most cases, a simple `channel.id === channel2.id` will do, and is much faster too.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildChannel"]},"description":"the channel to compare this channel to","name":"channel"}],"returns":[{"type":{"names":["Boolean"]}}],"meta":{"lineno":76,"filename":"GuildChannel.js","path":"src/structures"},"order":159},{"id":"VoiceChannel#permissionsFor","longname":"VoiceChannel#permissionsFor","name":"permissionsFor","scope":"instance","kind":"function","inherits":"GuildChannel#permissionsFor","inherited":true,"description":"Gets the overall set of permissions for a user in this channel, taking into account roles and permission\noverwrites.","memberof":"VoiceChannel","params":[{"type":{"names":["GuildMemberResolvable"]},"description":"the user that you want to obtain the overall permissions for","name":"member"}],"returns":[{"type":{"names":["EvaluatedPermissions"]},"nullable":true}],"meta":{"lineno":108,"filename":"GuildChannel.js","path":"src/structures"},"order":160},{"id":"VoiceChannel#setName","longname":"VoiceChannel#setName","name":"setName","scope":"instance","kind":"function","inherits":"GuildChannel#setName","inherited":true,"description":"Set a new name for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new name for the guild channel","name":"name"}],"examples":["// set a new channel name\nchannel.setName('not general')\n .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":178,"filename":"GuildChannel.js","path":"src/structures"},"order":161},{"id":"VoiceChannel#setPosition","longname":"VoiceChannel#setPosition","name":"setPosition","scope":"instance","kind":"function","inherits":"GuildChannel#setPosition","inherited":true,"description":"Set a new position for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["Number"]},"description":"the new position for the guild channel","name":"position"}],"examples":["// set a new channel position\nchannel.setPosition(2)\n .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":192,"filename":"GuildChannel.js","path":"src/structures"},"order":162},{"id":"VoiceChannel#setTopic","longname":"VoiceChannel#setTopic","name":"setTopic","scope":"instance","kind":"function","inherits":"GuildChannel#setTopic","inherited":true,"description":"Set a new topic for the Guild Channel","memberof":"VoiceChannel","params":[{"type":{"names":["String"]},"description":"the new topic for the guild channel","name":"topic"}],"examples":["// set a new channel topic\nchannel.setTopic('needs more rate limiting')\n .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":206,"filename":"GuildChannel.js","path":"src/structures"},"order":163},{"id":"VoiceChannel#toString","longname":"VoiceChannel#toString","name":"toString","scope":"instance","kind":"function","inherits":"GuildChannel#toString","inherited":true,"description":"When concatenated with a String, this automatically concatenates the Channel's name instead of the Channel object.","memberof":"VoiceChannel","params":[],"examples":["// Outputs: Hello from general\nconsole.log(`Hello from ${channel}`);","// Outputs: Hello from general\nconsole.log('Hello from ' + ${channel});"],"returns":[{"type":{"names":["String"]}}],"meta":{"lineno":224,"filename":"GuildChannel.js","path":"src/structures"},"order":164},{"id":"VoiceChannel#delete","longname":"VoiceChannel#delete","name":"delete","scope":"instance","kind":"function","inherits":"Channel#delete","inherited":true,"description":"Deletes the channel","memberof":"VoiceChannel","params":[],"examples":["// delete the channel\nchannel.delete()\n .then() // success\n .catch(console.log); // log error"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":39,"filename":"Channel.js","path":"src/structures"},"order":167}],"properties":[{"id":"VoiceChannel#type","longname":"VoiceChannel#type","name":"type","scope":"instance","kind":"member","inherits":"GuildChannel#type","inherited":true,"description":"The type of the Guild Channel","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":36,"filename":"GuildChannel.js","path":"src/structures"},"order":153},{"id":"VoiceChannel#topic","longname":"VoiceChannel#topic","name":"topic","scope":"instance","kind":"member","inherits":"GuildChannel#topic","inherited":true,"description":"The topic of the Guild Channel, if there is one.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":41,"filename":"GuildChannel.js","path":"src/structures"},"order":154},{"id":"VoiceChannel#position","longname":"VoiceChannel#position","name":"position","scope":"instance","kind":"member","inherits":"GuildChannel#position","inherited":true,"description":"The position of the channel in the list.","memberof":"VoiceChannel","type":{"names":["Number"]},"meta":{"lineno":46,"filename":"GuildChannel.js","path":"src/structures"},"order":155},{"id":"VoiceChannel#name","longname":"VoiceChannel#name","name":"name","scope":"instance","kind":"member","inherits":"GuildChannel#name","inherited":true,"description":"The name of the Guild Channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":51,"filename":"GuildChannel.js","path":"src/structures"},"order":156},{"id":"VoiceChannel#lastMessageID","longname":"VoiceChannel#lastMessageID","name":"lastMessageID","scope":"instance","kind":"member","inherits":"GuildChannel#lastMessageID","inherited":true,"description":"The ID of the last message in the channel, if one was sent.","memberof":"VoiceChannel","type":{"names":["String"]},"nullable":true,"meta":{"lineno":56,"filename":"GuildChannel.js","path":"src/structures"},"order":157},{"id":"VoiceChannel#permissionOverwrites","longname":"VoiceChannel#permissionOverwrites","name":"permissionOverwrites","scope":"instance","kind":"member","inherits":"GuildChannel#permissionOverwrites","inherited":true,"description":"A list of permission overwrites in this channel for roles and users.","memberof":"VoiceChannel","type":{"names":["Array."]},"meta":{"lineno":62,"filename":"GuildChannel.js","path":"src/structures"},"order":158},{"id":"VoiceChannel#client","longname":"VoiceChannel#client","name":"client","scope":"instance","kind":"member","inherits":"Channel#client","inherited":true,"description":"The client that instantiated the Channel","memberof":"VoiceChannel","type":{"names":["Channel"]},"meta":{"lineno":10,"filename":"Channel.js","path":"src/structures"},"order":165},{"id":"VoiceChannel#id","longname":"VoiceChannel#id","name":"id","scope":"instance","kind":"member","inherits":"Channel#id","inherited":true,"description":"The unique ID of the channel","memberof":"VoiceChannel","type":{"names":["String"]},"meta":{"lineno":27,"filename":"Channel.js","path":"src/structures"},"order":166}],"events":[]}},"interfaces":{"TextBasedChannel":{"meta":{"id":"TextBasedChannel","longname":"TextBasedChannel","name":"TextBasedChannel","scope":"global","kind":"interface","classdesc":"Interface for classes that have text-channel-like features","meta":{"lineno":5,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":120},"functions":[{"id":"TextBasedChannel#sendMessage","longname":"TextBasedChannel#sendMessage","name":"sendMessage","scope":"instance","kind":"function","description":"Send a message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"},{"type":{"names":["MessageOptions"]},"optional":true,"defaultvalue":"{}","description":"the options to provide","name":"options"}],"examples":["// send a message\nchannel.sendMessage('hello!')\n .then(message => console.log(`Sent message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":17,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":121},{"id":"TextBasedChannel#sendTTSMessage","longname":"TextBasedChannel#sendTTSMessage","name":"sendTTSMessage","scope":"instance","kind":"function","description":"Send a text-to-speech message to this channel","memberof":"TextBasedChannel","params":[{"type":{"names":["String"]},"description":"the content to send","name":"content"}],"examples":["// send a TTS message\nchannel.sendTTSMessage('hello!')\n .then(message => console.log(`Sent tts message: ${message.content}`))\n .catch(console.log);"],"returns":[{"type":{"names":["Promise."]}}],"meta":{"lineno":30,"filename":"TextBasedChannel.js","path":"src/structures/interface"},"order":122}],"properties":[],"events":[]}}}} \ No newline at end of file diff --git a/docs/gen/index.js b/docs/gen/index.js index a12185e5a..307c237c6 100644 --- a/docs/gen/index.js +++ b/docs/gen/index.js @@ -4,7 +4,7 @@ let parse; const customDocs = require('../custom/index'); -const GEN_VERSION = 2; +const GEN_VERSION = 3; try { fs = require('fs-extra'); @@ -20,7 +20,7 @@ console.log('Starting...'); let json = ''; const stream = parse({ - src: ['./src/*.js', './src/*/*.js'], + src: ['./src/*.js', './src/*/*.js', './src/**/*.js'], }); const cwd = (`${process.cwd()}\\`).replace(/\\/g, '/'); @@ -36,6 +36,7 @@ function cleanPaths() { function clean() { const cleaned = { classes: {}, + interfaces: {}, }; for (const item of json) { if (item.kind === 'class') { @@ -45,10 +46,19 @@ function clean() { properties: [], events: [], }; + } else if (item.kind === 'interface') { + cleaned.interfaces[item.longname] = { + meta: item, + functions: [], + properties: [], + events: [], + }; } else if (item.kind === 'member') { - cleaned.classes[item.memberof].properties.push(item); + const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; + obj.properties.push(item); } else if (item.kind === 'function' && item.memberof) { - cleaned.classes[item.memberof].functions.push(item); + const obj = cleaned.classes[item.memberof] || cleaned.interfaces[item.memberof]; + obj.functions.push(item); } } json = cleaned; @@ -58,7 +68,6 @@ function next() { json = JSON.parse(json); cleanPaths(); console.log('parsed inline code'); - console.log(json); clean(); json = { meta: { diff --git a/package.json b/package.json index 64bc6e480..0cb8e060c 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "A way to interface with the Discord API", "main": "./src/index", "scripts": { - "test": "node test/random", + "test": "eslint src/ && node test/random", "docs": "node docs/gen/index.js" }, "repository": { diff --git a/src/structures/TextChannel.js b/src/structures/TextChannel.js index f98594965..603fba181 100644 --- a/src/structures/TextChannel.js +++ b/src/structures/TextChannel.js @@ -5,6 +5,7 @@ const TextBasedChannel = require('./interface/TextBasedChannel'); /** * Represents a Server Text Channel on Discord. * @extends {GuildChannel} + * @implements {TextBasedChannel} */ class TextChannel extends GuildChannel { diff --git a/src/structures/User.js b/src/structures/User.js index 174fc931a..448e4c33a 100644 --- a/src/structures/User.js +++ b/src/structures/User.js @@ -2,6 +2,7 @@ const TextBasedChannel = require('./interface/TextBasedChannel'); /** * Represents a User on Discord. + * @implements {TextBasedChannel} */ class User { constructor(client, data) { @@ -99,6 +100,10 @@ class User { return base; } + + sendMessage() { + return; + } } TextBasedChannel.applyToClass(User); diff --git a/src/structures/interface/TextBasedChannel.js b/src/structures/interface/TextBasedChannel.js index 1eb44ca90..974a4d432 100644 --- a/src/structures/interface/TextBasedChannel.js +++ b/src/structures/interface/TextBasedChannel.js @@ -1,12 +1,43 @@ -function sendMessage(content, options = {}) { - return this.client.rest.methods.sendMessage(this, content, options.tts); +/** + * Interface for classes that have text-channel-like features + * @interface + */ +class TextBasedChannel { + /** + * Send a message to this channel + * @param {String} content the content to send + * @param {MessageOptions} [options={}] the options to provide + * @returns {Promise} + * @example + * // send a message + * channel.sendMessage('hello!') + * .then(message => console.log(`Sent message: ${message.content}`)) + * .catch(console.log); + */ + sendMessage(content, options = {}) { + return this.client.rest.methods.sendMessage(this, content, options.tts); + } + /** + * Send a text-to-speech message to this channel + * @param {String} content the content to send + * @returns {Promise} + * @example + * // send a TTS message + * channel.sendTTSMessage('hello!') + * .then(message => console.log(`Sent tts message: ${message.content}`)) + * .catch(console.log); + */ + sendTTSMessage(content) { + return this.client.rest.methods.sendMessage(this, content, true); + } } -function sendTTSMessage(content) { - return this.client.rest.methods.sendMessage(this, content, true); +function applyProp(structure, prop) { + structure.prototype[prop] = TextBasedChannel.prototype[prop]; } exports.applyToClass = structure => { - structure.prototype.sendMessage = sendMessage; - structure.prototype.sendTTSMessage = sendTTSMessage; + for (const prop of ['sendMessage', 'sendTTSMessage']) { + applyProp(structure, prop); + } };