Fix documentations that were incorrect or missing (#1837)

* Fix docs for Guild#pruneMembers

* ClientApplication returns

* Guild#deleteEmoji

* Guild#setRolePosition takes RoleResolvable

* Client#fetchApplication returns ClientApplication not Oauth2Application

* ClientDataResolver#resolveImage can return null

* ClientApplication#toString small example

* Guild#allowDMs now has a only for user accounts warning

* ClientUserSettings#patch is private and setGuildPosition has a user account warning

* Role#setPermissions can take PermissionResolvable, not just String

* ChannelCreationOverwrites is for a role or a member, not for a "group"

* Fix ChannelData#userlimit string being wrong
"The user limit of voice the channel" :lul:

* ChannelResolvable is only for Channel or Snowflake

* EmojiIdentifierResolvable supports Snowflakes

* UserResolvable doesn't take a guild

* Make patch functions private

* Remove examples

* Webhoox#edit options.name defaults to the webhook name

* Make VoiceConnection functions private

* Am dum
The whole ClientUserSettings category is only for self bots soo

* Value for update functions is *

* Make update functions be private

* Fix GuildEditData missing Ssytemchannel property

* PermissionOverwriteOptions can accept null as an option
(Why did no-one document this?)
This commit is contained in:
Frangu Vlad
2017-08-31 10:16:27 +03:00
committed by Crawl
parent 5121a02f13
commit 7b6190da01
11 changed files with 30 additions and 17 deletions

View File

@@ -394,7 +394,7 @@ class Client extends EventEmitter {
/**
* Obtains the OAuth Application of the bot from Discord.
* @param {Snowflake} [id='@me'] ID of application to fetch
* @returns {Promise<OAuth2Application>}
* @returns {Promise<ClientApplication>}
*/
fetchApplication(id = '@me') {
return this.api.oauth2.applications(id).get()

View File

@@ -32,7 +32,7 @@ class ClientDataResolver {
* * A Snowflake
* * A Message object (resolves to the message author)
* * A GuildMember object
* @typedef {User|Snowflake|Message|Guild|GuildMember} UserResolvable
* @typedef {User|Snowflake|Message|GuildMember} UserResolvable
*/
/**
@@ -124,7 +124,7 @@ class ClientDataResolver {
* Data that can be resolved to give a Channel object. This can be:
* * A Channel object
* * A Snowflake
* @typedef {Channel|Guild|Message|Snowflake} ChannelResolvable
* @typedef {Channel|Snowflake} ChannelResolvable
*/
/**
@@ -171,7 +171,7 @@ class ClientDataResolver {
/**
* Resolves a Base64Resolvable, a string, or a BufferResolvable to a Base 64 image.
* @param {BufferResolvable|Base64Resolvable} image The image to be resolved
* @returns {Promise<string>}
* @returns {Promise<?string>}
*/
async resolveImage(image) {
if (!image) return null;
@@ -260,7 +260,7 @@ class ClientDataResolver {
* * A custom emoji ID
* * An Emoji object
* * A ReactionEmoji object
* @typedef {string|Emoji|ReactionEmoji} EmojiIdentifierResolvable
* @typedef {string|Snowflake|Emoji|ReactionEmoji} EmojiIdentifierResolvable
*/
/**

View File

@@ -150,6 +150,7 @@ class VoiceConnection extends EventEmitter {
/**
* Sends a request to the main gateway to join a voice channel.
* @param {Object} [options] The options to provide
* @private
*/
sendVoiceStateUpdate(options = {}) {
options = Util.mergeDefault({
@@ -169,6 +170,7 @@ class VoiceConnection extends EventEmitter {
* Set the token and endpoint required to connect to the voice servers.
* @param {string} token The voice token
* @param {string} endpoint The voice endpoint
* @private
* @returns {void}
*/
setTokenAndEndpoint(token, endpoint) {
@@ -201,6 +203,7 @@ class VoiceConnection extends EventEmitter {
/**
* Sets the Session ID for the connection.
* @param {string} sessionID The voice session ID
* @private
*/
setSessionID(sessionID) {
if (!sessionID) {