Add !queue command to show next items in the queue
This commit is contained in:
		@@ -26,6 +26,7 @@ volume = v
 | 
			
		||||
kill = kill
 | 
			
		||||
stop_and_getout = oust
 | 
			
		||||
joinme = joinme
 | 
			
		||||
queue = queue
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
[strings]
 | 
			
		||||
@@ -38,11 +39,15 @@ bad_file = Bad file asked
 | 
			
		||||
no_file = Not file here
 | 
			
		||||
bad_url = Bad URL asked
 | 
			
		||||
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:
 | 
			
		||||
       <br />!play_file <path>
 | 
			
		||||
       <br />!play_url <url> - youtube or soundcloud
 | 
			
		||||
       <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 />!stop - stop and clear the playlist
 | 
			
		||||
       <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))
 | 
			
		||||
                else :
 | 
			
		||||
                     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:
 | 
			
		||||
                self.mumble.users[text.actor].send_message(self.config.get('strings', 'bad_command'))
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user