Update channel improvements

Also documented two methods for voice connections. (pause and resume)
This commit is contained in:
Programmix
2016-05-23 12:28:17 -07:00
parent fae03042cb
commit 0f9741bb14
9 changed files with 166 additions and 232 deletions

View File

@@ -534,7 +534,7 @@ Sets the name and topic of a channel
- **error** - error if any occurred
setChannelUserLimit(channel, limit, `callback`)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sets the user limit of a voice channel
@@ -544,7 +544,7 @@ Sets the user limit of a voice channel
- **error** - error if any occurred
setChannelBitrate(channel, bitrate, `callback`)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Sets the bitrate of a voice channel
@@ -553,6 +553,21 @@ Sets the bitrate of a voice channel
- **callback** - `function` taking the following:
- **error** - error if any occurred
updateChannel(channel, data, `callback`)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Updates the settings of a channel
- **channel** - A `Channel Resolvable`_
- **details** - `object` containing any of the following:
- **name** - `String`, the new name of channel
- **topic** - `String`, the new topic of the channel (`TextChannel`_ only)
- **position** - `Number`, the new position of the channel
- **userLimit** - `Number`, the new user limit of the channel (`VoiceChannel`_ only)
- **bitrate** - `Number`, the new bitrate (in kb/s) of the channel (`VoiceChannel`_ only)
- **callback** - `function` taking the following:
- **error** - error if any occurred
startTyping(channel, `callback`)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -51,3 +51,9 @@ mention()
~~~~~~~~~
Returns a `string` that can be used in discord messages to mention a channel. `serverChannel.toString()` defaults to this.
update(data, `callback`)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| **Shortcut of** ``client.updateChannel(channel, data, callback)``
| **See** client.updateChannel_

View File

@@ -120,6 +120,16 @@ getVolume()
Returns the current volume. 1.0 is normal, 0.5 is half as loud, 2.0 is twice as loud.
pause()
~~~~~~~
Pauses the current connection's audio.
resume()
~~~~~~~~
Resumes the current connection's audio.
stopPlaying()
~~~~~~~~~~~~~