TS3AudioBot icon indicating copy to clipboard operation
TS3AudioBot copied to clipboard

!yta & !ytp not working for API

Open kevingroeger opened this issue 5 years ago • 4 comments

Describe the bug When trying to use the API, the (alias) commands for !ytp and !yta don't work.

To Reproduce Enable api in ts3audiobot.toml and try to fetch http(s)://<url>:<port>/api/bot/use/0/(/yta/rammstein%20sonne

All other api commands are working fine.

Version Current develop branch

Platform dotnet 3.1, develop branch build, server is on Ubuntu 18.04

Log Instead I'm pasting the json response.

{
    "ErrorCode": 12,
    "ErrorName": "AmbiguousCall",
    "ErrorMessage": "The command contains the following subfunctions: whisper, xecute, list, next, param, pm, pause, play, plugin, previous, print, quiz, random, repeat, rights, rng, seek, search, server, settings, song, stop, subscribe, system, take, unsubscribe, version, volume, add, alias, api, bot, clear, command, data, eval, from, get, getmy, getuser, help, history, if, info, json, kickme, yt, ytp, yta, fivenumbers"
}

I love the fact that there is an API and wanted to use it for my own clientside App. Unfortunately these two commands are very important for my usecase.

kevingroeger avatar Apr 09 '20 19:04 kevingroeger

My current setup is broken since I'm rewoking some stuff. Until I can look into the exact problem of this a small workaround: You can simply just use the normal commands behind the ytp/yta alias, so: http(s)://<url>:<port>/api/bot/use/0/(/x(/search/from/youtube/rammstein%20sonne)/(/search/play/0)) (or replace the last /play/ with /add/)

Splamy avatar Apr 11 '20 00:04 Splamy

Thanks for your answer!

I already tried that, too. Doesn't work for me either.

{
    "ErrorCode": 12,
    "ErrorName": "AmbiguousCall",
    "ErrorMessage": "The command contains the following subfunctions: whisper, xecute, list, next, param, pm, pause, play, plugin, previous, print, quiz, random, repeat, rights, rng, seek, search, server, settings, song, stop, subscribe, system, take, unsubscribe, version, volume, add, alias, api, bot, clear, command, data, eval, from, get, getmy, getuser, help, history, if, info, json, kickme, yt, ytp, yta, fivenumbers"
}

kevingroeger avatar Apr 11 '20 11:04 kevingroeger

The command needs to be xecute instead of x. http(s)://<url>:<port>/api/bot/use/0/(/xecute/(/search/from/youtube/rammstein%20sonne)/(/search/play/0)) fails with the following error:

{
    "ErrorCode": 17,
    "ErrorMessage": "Command 'PropagiateSearch' missing execution context 'UserSession'",
    "ErrorName": "MissingContext",
    "HelpMessage": "Creating UserSessions via api is currently not implemented yet."
}

Flakebi avatar Apr 11 '20 11:04 Flakebi

Thanks @Flakebi

Hope it's getting implemented soon :)

kevingroeger avatar Apr 11 '20 11:04 kevingroeger