diff --git a/docs/docs_cache.rst b/docs/docs_cache.rst index 184075dbb..c5fd669e3 100644 --- a/docs/docs_cache.rst +++ b/docs/docs_cache.rst @@ -12,7 +12,7 @@ A Cache object extends an Array (so it can be used like a regular array) but int .. code-block:: js client.users.get("id", 11238414); - + client.channels.getAll("name", "general"); -------- diff --git a/docs/docs_channelpermissions.rst b/docs/docs_channelpermissions.rst index 505b7cc2a..a7bf5da5a 100644 --- a/docs/docs_channelpermissions.rst +++ b/docs/docs_channelpermissions.rst @@ -10,7 +10,7 @@ ChannelPermissions is used to represent the final permissions of a user in a cha .. code-block:: js var user_permissions = channel.permissionsOf(user); - + var can_mention_everyone = user_permissions.hasPermission("mentionEveryone"); -------- diff --git a/docs/docs_client.rst b/docs/docs_client.rst index cfcef230e..8a8ad5d27 100644 --- a/docs/docs_client.rst +++ b/docs/docs_client.rst @@ -141,7 +141,7 @@ Sends a file to the specified channel. - **channel** - a `Channel Resolvable`_ - **attachment** - A ReadableStream, String or Buffer -- **name** - `String`, name of the file containing the extension +- **name** - (Optional) `String`, name of the file containing the extension - **callback** - `function` taking the following: - **error** - error if any occurred - **message** - the sent Message_ @@ -189,7 +189,7 @@ getChannelLogs(channel, `limit`, `options`, `callback`) Gets a list of previously sent messages in a channel. - **channel** - The Channel_ to get messages from -- **limit** - The maximum amount of messages to retrieve - defaults to 500. A `Number` +- **limit** - The maximum amount of messages to retrieve - defaults to 50. A `Number` - **options** - An `object` containing either of the following: - **before** - A `Message Resolvable`_ - gets messages before this message. - **after** - A `Message Resolvable`_ - gets messages after this message. @@ -304,6 +304,16 @@ Creates an invite for the specified channel (or server) - **error** - error if any occurred - **invite** - the created Invite_ +getInvite(invite, `callback`) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Gets more info on a specific invite + +- **invite** - An `Invite Resolvable`_ +- **callback** - `function` taking the following: + - **error** - error if any occurred + - **invite** - an Invite_ object + deleteInvite(invite, `callback`) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -504,6 +514,18 @@ Adds a member of a server to a role in the server - **callback** - `function` that takes the following: - **error** - error if any occurred +addMemberToRoles(member, roles, `callback`) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**Aliases** : `addUserToRole` + +Adds a member of a server to a role in the server + +- **member** - A `User Resolvable`_ +- **roles** - An array of Role_ objects +- **callback** - `function` that takes the following: + - **error** - error if any occurred + removeMemberFromRole(member, role, `callback`) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -516,6 +538,18 @@ Removes a member of a server from a role in the server - **callback** - `function` that takes the following: - **error** - error if any occurred +removeMemberFromRoles(member, roles, `callback`) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**Aliases** : `removeUserFromRole` + +Removes a member of a server from a role in the server + +- **member** - A `User Resolvable`_ +- **role** - A array of Role_ objects +- **callback** - `function` that takes the following: + - **error** - error if any occurred + overwritePermissions(channel, roleOrUser, options, `callback`) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -567,7 +601,7 @@ Emitted when a message has been deleted and the Client finds out, supplies a Mes messageUpdated ~~~~~~~~~~~~~~ -Emitted when a message has been updated and the client finds out. Supplies two Message_ objects, the first being the new updated messages, the latter being the old message. +Emitted when a message has been updated and the client finds out. Supplies two Message_ objects, the first being the message before the update, the second being the new, updated message. disconnected ~~~~~~~~~~~~ @@ -647,12 +681,7 @@ Emitted when a member in a server is updated. Supplies a Server_ object and a Us presence ~~~~~~~~ -Emitted when a user goes online/offline/idle or starts/stops playing a game. Supplies 3 parameters, the first being the User_ object, the second being the status, the third being the game ID they are playing. - -userUpdated -~~~~~~~~~~~ - -Emitted when a user changes their name, avatar or similar. Supplies two User_ objects, the first being the user before being updated, the second being the updated user. +Emitted when a user goes online/offline/idle, starts/stops playing a game, or changes their username/avatar/similar. Supplies 2 User_ objects, the first being the old user, the second being the new, updated user. userTypingStarted ~~~~~~~~~~~~~~~ diff --git a/docs/docs_equality.rst b/docs/docs_equality.rst index 1f45f1d85..1e5719ebd 100644 --- a/docs/docs_equality.rst +++ b/docs/docs_equality.rst @@ -10,7 +10,7 @@ If any class in Discord extends equality, it means you should never the default .. code-block:: js object1.equals(object2); // GOOD ✓ - + object1 == object2; // BAD ✖ --------