mirror of https://github.com/icedream/ts3bot.git
Implement "list"/"playlist" commands.
These commands make the bot print out the current playlist in the channel chat. The current track being played back is printed in bold green font.develop
parent
4eed972a23
commit
cc783d0bc0
10
app.iced
10
app.iced
|
@ -212,6 +212,16 @@ ts3clientService.on "started", (ts3proc) =>
|
||||||
when "empty", "clear"
|
when "empty", "clear"
|
||||||
vlc.playlist.clear()
|
vlc.playlist.clear()
|
||||||
ts3query.sendtextmessage args.targetmode, invoker.id, "Cleared the playlist."
|
ts3query.sendtextmessage args.targetmode, invoker.id, "Cleared the playlist."
|
||||||
|
when "list", "playlist"
|
||||||
|
message = "Currently these tracks are in the playlist:\n"
|
||||||
|
for i in [ 0 .. vlc.playlist.items.count ]
|
||||||
|
if vlc.playlist.currentItem == i
|
||||||
|
message += "[COLOR=green][B]"
|
||||||
|
info = vlcMediaInfo[vlc.playlist.items[i].mrl]
|
||||||
|
message += "#{i + 1}. [URL=#{info.originalUrl}]#{info.title}[/URL]"
|
||||||
|
if vlc.playlist.currentItem == i
|
||||||
|
message += "[/B][/COLOR]"
|
||||||
|
ts3query.sendtextmessage args.targetmode, invoker.id, message
|
||||||
when "enqueue", "add", "append"
|
when "enqueue", "add", "append"
|
||||||
inputBB = paramline.trim()
|
inputBB = paramline.trim()
|
||||||
input = (removeBB paramline).trim()
|
input = (removeBB paramline).trim()
|
||||||
|
|
Loading…
Reference in New Issue