voiceStateUpdate stored per-server, some docs

This commit is contained in:
abalabahaha
2016-01-30 14:11:21 -08:00
parent 46807bf1c1
commit cd25848bdc
12 changed files with 134 additions and 95 deletions

View File

@@ -48,4 +48,9 @@ Updates an old object in the Cache (if it exists) with the new one.
remove(data)
~~~~~~~~~~~~
Removes an object from the cache if it exists.
Removes an object from the cache if it exists.
random()
~~~~~~~~~~~~
Get a random object from the cache.

View File

@@ -26,3 +26,13 @@ isPrivate
~~~~~~~~~
Indicates whether the channel is PM channel, is `Boolean`.
--------
Functions
---------
delete()
~~~~~~~~~~~~~~~
Deletes the channel.

View File

@@ -140,7 +140,7 @@ sendFile(channel, attachment, name, `callback`)
Sends a file to the specified channel.
- **channel** - a `Channel Resolvable`_
- **attachment** - A ReadableStream, String or Buffer
- **attachment** - A `File Resolvable`_
- **name** - (Optional) `String`, name of the file containing the extension
- **callback** - `function` taking the following:
- **error** - error if any occurred
@@ -520,21 +520,19 @@ addMemberToRole(member, role, `callback`)
Adds a member of a server to a role in the server
- **member** - A `User Resolvable`_
- **role** - A Role_
- **role** - A `Role Resolvable`_ or an array of `Role Resolvable`_
- **callback** - `function` that takes the following:
- **error** - error if any occurred
addMemberToRoles(member, roles, `callback`)
memberHasRole(member, role)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
**Aliases** : `addUserToRole`
**Aliases** : `userHasRole`
Adds a member of a server to a role in the server
Returns if a user has a role
- **member** - A `User Resolvable`_
- **roles** - An array of Role_ objects
- **callback** - `function` that takes the following:
- **error** - error if any occurred
- **role** - A `Role Resolvable`_ or an array of `Role Resolvable`_
removeMemberFromRole(member, role, `callback`)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -544,19 +542,7 @@ removeMemberFromRole(member, role, `callback`)
Removes a member of a server from a role in the server
- **member** - A `User Resolvable`_
- **role** - A Role_
- **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
- **role** - A `Role Resolvable`_ or an array of `Role Resolvable`_
- **callback** - `function` that takes the following:
- **error** - error if any occurred
@@ -716,9 +702,14 @@ Emitted when a user is unbanned from a server. Supplies two parameters, a User_
voiceJoin
~~~~~~~~
Emitted when a user joins a voice channel, supplies a User_ and a VoiceChannel_
Emitted when a user joins a voice channel, supplies a VoiceChannel_ and a User_
voiceLeave
~~~~~~~~~~
Emitted when a user leaves a voice channel, supplies a User_ and a VoiceChannel_
Emitted when a user leaves a voice channel, supplies a VoiceChannel_ and a User_
voiceStateUpdate
~~~~~~~~~~
Emitted when a user mutes/deafens, supplies a VoiceChannel_, User_, an object containing the old mute/self_mute/deaf/self_deaf properties, and an object containing the new mute/self_mute/deaf/self_deaf properties

View File

@@ -69,6 +69,11 @@ content
`String`, content of the message.
cleanContent
~~~~~~~
`String`, content of the message with valid user mentions (<@123>) replaced with "@username".
mentions
~~~~~~~~

View File

@@ -18,6 +18,23 @@ A Channel Resolvable allows:
- User_ (in some instances)
- String of Channel ID
File Resolvable
------------------
A File Resolvable allows:
- URL
- Local file path
- Readable stream
Role Resolvable
------------------
A Role Resolvable allows:
- Role ID
- Role_
Voice Channel Resolvable
------------------------

View File

@@ -85,16 +85,21 @@ Functions
rolesOfUser(user)
~~~~~~~~~~~~~~~~~
**Aliases**: `rolesOf`
**Aliases**: `rolesOf`, `rolesOfMember`
Returns an array of the roles affecting a user server-wide.
------
usersWithRole(user, role)
~~~~~~~~~~~~~~~~~
**Aliases**: `membersWithRole`
Returns an array of users that have the specified role.
detailsOfUser(user)
~~~~~~~~~~~~~~~~~~~
**Aliases** `detailsOf`
**Aliases** `detailsOf`, `detailsOfMember`
Returns an object containing metadata of a user within the server, containing a structure similar to the following:
@@ -102,12 +107,13 @@ Returns an object containing metadata of a user within the server, containing a
{
joinedAt : 1449339323747,
mute : false,
deaf : false
roles: [],
mute : false,
self_mute : false,
deaf : false,
self_deaf : false
}
----------
leave()
~~~~~~~
@@ -115,45 +121,29 @@ leave()
| **Aliases** `delete`
| **See** client.leaveServer_
------
|
createInvite(`options`, `callback`)
~~~~~~~
| **Shortcut of** ``client.createInvite(server, options, callback)``
| **See** client.createInvite_
|
------
createRole(`data`, `callback`)
~~~~~~~
| **Shortcut of** ``client.createRole(server, data, callback)``
| **See** client.createRole_
|
------
createChannel(name, `type`, `callback`)
~~~~~~~
| **Shortcut of** ``client.createChannel(server, name, type, callback)``
| **See** client.createChannel_
|
------
getBans(`callback`)
~~~~~~~~~~~~~~~~~~~
| **Shortcut of** ``client.getBans(server, callback)``
| **See** client.getBans_
|
------
banMember(user, `length`, `callback`)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -161,9 +151,6 @@ banMember(user, `length`, `callback`)
| **Shortcut of** ``client.banMember(member, server, length, callback)``
| **Aliases** `banUser, ban`
| **See** client.banMember_
|
------
unbanMember(user, `callback`)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -171,9 +158,6 @@ unbanMember(user, `callback`)
| **Shortcut of** ``client.unbanMember(member, server, callback)``
| **Aliases** `unbanUser, unban`
| **See** client.unbanMember_
|
------
kickMember(user, `callback`)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -181,9 +165,6 @@ kickMember(user, `callback`)
| **Shortcut of** ``client.kickMember(member, server, callback)``
| **Aliases** `kickUser, kick`
| **See** client.kickMember_
|
------
.. _client.leaveServer : ./docs_client.html#leaveserver-server-callback
.. _client.createInvite : ./docs_client.html#createinvite-channel-options-callback