Ts3audiobot: Add support to search and play song name instead of link

Created on 22 Jun 2017  路  14Comments  路  Source: Splamy/TS3AudioBot

is it possible to play/search song name instead of url/link of the song
so if you type in a name it will search youtube and it plays the first result it comes up with or it replies with top 3 results and you can choose which one you want

enhancement

All 14 comments

I would say no, since the library used Youtube-dl Doesn't have this functionality and Ts3Audiobot supports multiple different sources, not just youtube.

At the moment there is no such functionality.
Our AudioBot comes preconfigured with a youtube api key. This means we could use features like v3/youtube.search.list easily for a feature like that. I will add this idea to the backlog 馃憤

//TODO add a search for media playlists (see #329)

How do we do this, please help

Needed something relaxing to implement today, so I did this; have fun.
The raw commands works like !search from <factory> <search query>
It might seem a bit clunky, but that is by design as it is automatically generated for factories.

If you just want a !yt and !ytp command, simply add those two aliases:
!alias add yt "!search from youtube (!param 0)"
!alias add ytp "!x (!search from youtube (!param 0)) (!select 0)"

then you can use:

!yt rammstein sonne will display the found results

Found the following songs. Use "!select <number>" to play.
0: Rammstein - Sonne (Official Video)
1: Rammstein - Sonne (lyrics) HD
2: Rammstein - Sonne / PROSHOT(Download Festival 2016) HD [GER/ENG/RU/ES/FR]
   ...

!ytp rammstein sonne will search and automatically play the first result.

Oh and usually you'd have to add quotes (like "rammstein sonne") around stuff with spaces, but i also added another feature in the last patch, which will just take everything if there is only parameter. This should make a lot of calls more convenient.

Needed something relaxing to implement today, so I did this; have fun.
The raw commands works like !search from <factory> <search query>
It might seem a bit clunky, but that is by design as it is automatically generated for factories.

If you just want a !yt and !ytp command, simply add those two aliases:
!alias add yt "!search from youtube (!param 0)"
!alias add ytp "!x (!search from youtube (!param 0)) (!select 0)"

then you can use:

!yt rammstein sonne will display the found results

Found the following songs. Use "!select <number>" to play.
0: Rammstein - Sonne (Official Video)
1: Rammstein - Sonne (lyrics) HD
2: Rammstein - Sonne / PROSHOT(Download Festival 2016) HD [GER/ENG/RU/ES/FR]
   ...

!ytp rammstein sonne will search and automatically play the first result.

Oh and usually you'd have to add quotes (like "rammstein sonne") around stuff with spaces, but i also added another feature in the last patch, which will just take everything if there is only parameter. This should make a lot of calls more convenient.

Do we have to set this to the files, is it set in your files?

Set what to what files? There is nothing set in any files.
Just download the latest dev version, execute both alias commands to create them, and you can use yt and ypt. Aliases will be saved in the config and loaded on startup

Set what to what files? There is nothing set in any files.
Just download the latest dev version, execute both alias commands to create them, and you can use yt and ypt. Aliases will be saved in the config and loaded on startup

Can you please give me a link to the latest version?

It's right in the readme: Download

It's right in the readme: Download

How do I install it on a ubuntu server? Is there an article about it?

You can also add to add song to queue beside !select

Almost forgot this...
yeah, I kinda want something too to add a song from the result list to the queue instead of directly playing. But I can't come up with a good name for a command that feels intuitive to use; maybe any of you have an idea.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bennetgallein picture bennetgallein  路  4Comments

iiAlphaWolf01 picture iiAlphaWolf01  路  4Comments

dalexhd picture dalexhd  路  5Comments

Adminio1 picture Adminio1  路  4Comments

TykooHagen picture TykooHagen  路  4Comments