TS3AudioBot
TS3AudioBot copied to clipboard
!yta & !ytp not working for API
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.
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/)
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"
}
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."
}
Thanks @Flakebi
Hope it's getting implemented soon :)