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

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

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

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

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

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

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

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

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

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

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

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

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