Voice Client¶
Get State¶
> Example getState¶
{
"op": "getState",
"d": {
"guild_id": "guild_id"
}
}
< Example getState response¶
{
"op": "getState",
"d": {
"id": "VoiceClient ID",
"guild_id": "Guild ID",
"channel_id": "Voice Channel ID",
"state": "Current Player State",
"current": "Current AudioSource Object",
"duration": "Current source duration",
"position": "Current source position",
"remain": "Current source remain",
"remainQueue": "Queue length",
"options": {
"autoplay": "autoplay boolean",
"volume": "volume float",
"crossfade": "crossfade float",
"filter": {}
},
"context": {}
}
}
Get Context¶
- GET /context¶
Get context of the voice client
Example response:
{ // context }
- Request Headers
Authorization – Password for discodo server
User-ID – the bot user id
?Shard-ID – the bot shard id
Guild-ID – the guild id of queue
VoiceClient-ID – the voiceclient id
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found
Set Context¶
- POST /context¶
Set context of the voice client
Example response:
{ // context }
- Request Headers
Authorization – Password for discodo server
User-ID – the bot user id
?Shard-ID – the bot shard id
Guild-ID – the guild id of queue
VoiceClient-ID – the voiceclient id
- JSON Parameters
context (json) – context to set
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found
Put Source¶
- POST /putSource¶
Put the source object on Queue
Example response:
{ "source": { // source object } }
- Request Headers
Authorization – Password for discodo server
User-ID – the bot user id
?Shard-ID – the bot shard id
Guild-ID – the guild id of queue
VoiceClient-ID – the voiceclient id
- JSON Parameters
source (json) – the source object to put
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found
Load Source¶
- POST /loadSource¶
Search query and put it on Queue
Example response:
{ "source": { // source object } }
- Request Headers
Authorization – Password for discodo server
User-ID – the bot user id
?Shard-ID – the bot shard id
Guild-ID – the guild id of queue
VoiceClient-ID – the voiceclient id
- JSON Parameters
query (string) – query to search
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found
Get Options¶
- GET /options¶
Get options of the voice_client
Example response:
{ "autoplay": True, "volume": 1.0, "crossfade": 10.0, "filter": {} }
- Request Headers
Authorization – Password for discodo server
User-ID – the bot user id
?Shard-ID – the bot shard id
Guild-ID – the guild id of queue
VoiceClient-ID – the voiceclient id
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found
Set Options¶
- POST /options¶
Set options of the voice_client
Example response:
{ "autoplay": True, "volume": 1.0, "crossfade": 10.0, "filter": {} }
- Request Headers
Authorization – Password for discodo server
User-ID – the bot user id
?Shard-ID – the bot shard id
Guild-ID – the guild id of queue
VoiceClient-ID – the voiceclient id
- JSON Parameters
?volume (float) – volume value
?crossafde (float) – crossfade value
?autoplay (boolean) – autoplay value
?filter (json) – filter value
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found
Get Position¶
- GET /seek¶
Get position of the voice_client
Example response:
{ "duration": 300.0, "position": 200.0, "remain": 100.0 }
- Request Headers
Authorization – Password for discodo server
User-ID – the bot user id
?Shard-ID – the bot shard id
Guild-ID – the guild id of queue
VoiceClient-ID – the voiceclient id
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found
Set Position (Seek)¶
- POST /seek¶
Set position of the voice_client
- Request Headers
Authorization – Password for discodo server
User-ID – the bot user id
?Shard-ID – the bot shard id
Guild-ID – the guild id of queue
VoiceClient-ID – the voiceclient id
- JSON Parameters
offset (float) – position to seek
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found
Skip Current¶
- POST /skip¶
Skip current of the voice_client
- Request Headers
Authorization – Password for discodo server
User-ID – the bot user id
?Shard-ID – the bot shard id
Guild-ID – the guild id of queue
VoiceClient-ID – the voiceclient id
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found
Pause¶
- POST /pause¶
Pause current of the voice_client
- Request Headers
Authorization – Password for discodo server
User-ID – the bot user id
?Shard-ID – the bot shard id
Guild-ID – the guild id of queue
VoiceClient-ID – the voiceclient id
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found
Resume¶
- POST /resume¶
Resume current of the voice_client
- Request Headers
Authorization – Password for discodo server
User-ID – the bot user id
?Shard-ID – the bot shard id
Guild-ID – the guild id of queue
VoiceClient-ID – the voiceclient id
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found
Shuffle Queue¶
- POST /shuffle¶
Shuffle the queue of the voice_client
Example response:
{ "entries": [ // source object ] }
- Request Headers
Authorization – Password for discodo server
User-ID – the bot user id
?Shard-ID – the bot shard id
Guild-ID – the guild id of queue
VoiceClient-ID – the voiceclient id
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found
Get Queue¶
- GET /queue¶
Get the queue of the voice_client
Example response:
{ "entries": [ // source object ] }
- Request Headers
Authorization – Password for discodo server
User-ID – the bot user id
?Shard-ID – the bot shard id
Guild-ID – the guild id of queue
VoiceClient-ID – the voiceclient id
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found