AudioData¶
AudioData Object¶
AudioData Structure¶
Field |
Type |
Description |
_type |
string |
fixed value |
tag |
string |
object tag (uuid) |
id |
string |
source id |
title |
?string |
source title |
webpage_url |
?string |
source webpage url |
thumbnail |
?string |
source thumbnail |
url |
?string |
source stream url |
duration |
?integer |
source duration |
is_live |
boolean |
source live state |
uploader |
?string |
source uploader |
description |
?string |
source description |
subtitles |
json |
source subtitles (Mostly SRV1) |
chapters |
json |
source chapters (Only in youtube) |
related |
boolean |
related playing state |
context |
json |
object context |
start_position |
float |
source start position |
AudioSource Object¶
AudioSource Structure¶
Field |
Type |
Description |
_type |
string |
fixed value |
tag |
string |
object tag (uuid) |
id |
string |
source id |
title |
?string |
source title |
webpage_url |
?string |
source webpage url |
thumbnail |
?string |
source thumbnail |
url |
?string |
source stream url |
duration |
integer |
source duration |
is_live |
boolean |
source live state |
uploader |
?string |
source uploader |
description |
?string |
source description |
subtitles |
json |
source subtitles (Mostly SRV1) |
chapters |
json |
source chapters (Only in youtube) |
related |
boolean |
related playing state |
context |
json |
object context |
start_position |
float |
start position |
seekable |
boolean |
seekable state |
position |
?float |
source current position |
Get Current¶
- GET /current¶
The source object that is currently playing
Example response:
{ // 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 From The Queue¶
- GET /queue/{tag_or_index}¶
The source object in queue
Example response:
{ // source object }
- Parameters
tag_or_index (int or str) – the tag or index of 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
Edit Current¶
- POST /current¶
Edit the source object that is currently playing
Example response:
{ // 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
?context (json) – context to save on the object
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found
Edit From The Queue¶
- POST /queue/{tag_or_index}¶
Edit the source object in queue
Example response:
{ // edited source object }
- Parameters
tag_or_index (int or str) – the tag or index of 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
?index (integer) – index to move the source in queue
?context (json) – context to save on the object
?start_position (float) – position to start on (only in AudioData)
- Status Codes
200 OK – no error
403 Forbidden – authorization failed or VoiceClient-ID mismatched
404 Not Found – ClientManager or VoiceClient not found
Remove From The Queue¶
- DELETE /queue/{tag_or_index}¶
Remove the source object in queue
Example response:
{ "removed": { // removed source object }, "entries": [ // list of source in queue ] }
- Parameters
tag_or_index (int or str) – the tag or index of 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