This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install libsodium (python3-nacl and libsodium-dev worked for me), libopus (libopusfile0 and libopus0 worked for me), ffmpeg | |
#Install https://github.com/rg3/youtube-dl | |
require 'discordrb' | |
$isplaying = 0 | |
bot = Discordrb::Commands::CommandBot.new token: token, client_id: clientid, prefix: '.' | |
bot.command(:play) do |event, songlink| | |
if $isplaying == 1 | |
event.message.delete | |
event.respond 'Already playing music' | |
break |