Add !queue command to show next items in the queue
This commit is contained in:
parent
53b35df4e4
commit
fa5495a341
@ -26,6 +26,7 @@ volume = v
|
|||||||
kill = kill
|
kill = kill
|
||||||
stop_and_getout = oust
|
stop_and_getout = oust
|
||||||
joinme = joinme
|
joinme = joinme
|
||||||
|
queue = queue
|
||||||
|
|
||||||
|
|
||||||
[strings]
|
[strings]
|
||||||
@ -38,11 +39,15 @@ bad_file = Bad file asked
|
|||||||
no_file = Not file here
|
no_file = Not file here
|
||||||
bad_url = Bad URL asked
|
bad_url = Bad URL asked
|
||||||
multiple_matches = Track not found! Possible candidates:
|
multiple_matches = Track not found! Possible candidates:
|
||||||
|
queue_contents = The next items in the queue are:
|
||||||
|
queue_empty = The queue is empty!
|
||||||
|
|
||||||
help = Command available:
|
help = Command available:
|
||||||
<br />!play_file <path>
|
<br />!play_file <path>
|
||||||
<br />!play_url <url> - youtube or soundcloud
|
<br />!play_url <url> - youtube or soundcloud
|
||||||
<br />!play_radio <url> - url of a stream
|
<br />!play_radio <url> - url of a stream
|
||||||
|
<br />!list - display list of available tracks
|
||||||
|
<br />!queue - display items in queue
|
||||||
<br />!next - jump to the next music of the playlist
|
<br />!next - jump to the next music of the playlist
|
||||||
<br />!stop - stop and clear the playlist
|
<br />!stop - stop and clear the playlist
|
||||||
<br />!oust - stop + Go to default channel
|
<br />!oust - stop + Go to default channel
|
||||||
|
10
mumbleBot.py
10
mumbleBot.py
@ -188,6 +188,16 @@ class MumbleBot:
|
|||||||
self.mumble.users[text.actor].send_message('<br>'.join(files))
|
self.mumble.users[text.actor].send_message('<br>'.join(files))
|
||||||
else :
|
else :
|
||||||
self.mumble.users[text.actor].send_message(self.config.get('strings', 'no_file'))
|
self.mumble.users[text.actor].send_message(self.config.get('strings', 'no_file'))
|
||||||
|
|
||||||
|
elif command == self.config.get('command', 'queue'):
|
||||||
|
if len(var.playlist) == 0:
|
||||||
|
msg = self.config.get('strings', 'queue_empty')
|
||||||
|
else:
|
||||||
|
msg = self.config.get('strings', 'queue_contents') + '<br />'
|
||||||
|
for (type, path) in var.playlist:
|
||||||
|
msg += '({}) {}<br />'.format(type, path)
|
||||||
|
|
||||||
|
self.send_msg_channel(msg)
|
||||||
else:
|
else:
|
||||||
self.mumble.users[text.actor].send_message(self.config.get('strings', 'bad_command'))
|
self.mumble.users[text.actor].send_message(self.config.get('strings', 'bad_command'))
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user