mirror of https://github.com/icedream/ts3bot.git
Implement some easy checks for "next" and "prev" commands.
parent
b238a655b9
commit
a5a8ae1046
6
app.iced
6
app.iced
|
@ -227,8 +227,14 @@ ts3clientService.on "started", (ts3proc) =>
|
|||
ts3query.sendtextmessage args.targetmode, invoker.id, "[B]#{name} on|off[/B] - Turns playlist looping on or off"
|
||||
return
|
||||
when "next"
|
||||
if vlc.playlist.mode != vlc.playlist.Loop and vlc.playlist.currentItem == vlc.playlist.items.count - 1
|
||||
ts3query.sendtextmessage args.targetmode, invoker.id, "Can't jump to next playlist item, this is the last one!"
|
||||
return
|
||||
vlc.playlist.next()
|
||||
when "prev", "previous"
|
||||
if vlc.playlist.mode != vlc.playlist.Loop and vlc.playlist.currentItem == 0
|
||||
ts3query.sendtextmessage args.targetmode, invoker.id, "Can't jump to previous playlist item, this is the first one!"
|
||||
return
|
||||
vlc.playlist.prev()
|
||||
when "empty", "clear"
|
||||
vlc.playlist.clear()
|
||||
|
|
Loading…
Reference in New Issue