You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
613 B
Ruby
28 lines
613 B
Ruby
3 years ago
|
def listQueue_getCommand()
|
||
|
return ["list", "listQueue_main"]
|
||
|
end
|
||
|
|
||
|
def listQueue_main(event)
|
||
|
voice_channel = event.author.voice_channel.id
|
||
|
if ENV["#{voice_channel}"] == 'playing'
|
||
|
if $queue.key?(voice_channel)
|
||
|
if $queue[voice_channel][0] != nil
|
||
|
x = $queue[voice_channel].length()
|
||
|
y = 0
|
||
|
qlist = ''
|
||
|
while x >= 1
|
||
|
qlist = qlist + "#{$queue[voice_channel][y].lstrip}\n"
|
||
|
y = y + 1
|
||
|
x= x - 1
|
||
|
end
|
||
|
event.respond "Current queue is:\n" + qlist
|
||
|
else
|
||
|
event.respond "No queue!"
|
||
|
end
|
||
|
else
|
||
|
event.respond "No queue!"
|
||
|
end
|
||
|
else
|
||
|
event.respond "Bot not playing!"
|
||
|
end
|
||
|
end
|