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.
24 lines
485 B
Ruby
24 lines
485 B
Ruby
def stopMusic_getName()
|
|
return "stop"
|
|
end
|
|
|
|
def stopMusic_getCommand()
|
|
return "stopMusic_main"
|
|
end
|
|
|
|
|
|
def stopMusic_main(event)
|
|
voice_channel = event.author.voice_channel.id
|
|
if ENV["#{voice_channel}"] == 'playing'
|
|
event.respond "Stopping music"
|
|
while $queue[voice_channel][0] != nil
|
|
puts "Stop 2"
|
|
$queue[voice_channel].pop
|
|
end
|
|
voiceBot = $voicebots[voice_channel]
|
|
voiceBot.destroy()
|
|
ENV["#{voice_channel}"] = 'open'
|
|
else
|
|
event.respond "Bot not playing!"
|
|
end
|
|
end |