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
433 B
Ruby

#!/usr/bin/env ruby
require 'discordrb'
require 'tmpdir'
token = File.read("token.txt")
bot = Discordrb::Bot.new token: "#{token}"
bang = '!'
def loadCommands(bot, bang)
File.foreach("modules/modules.txt", chop: true) { |line|
mod = "./modules/" + line + "/main.rb"
require mod.delete("\n")
send("#{line.delete("\n")}", bot, bang)
}
end
loadCommands(bot, bang)
#require './pingcommand.rb'
#main(bot)
#tomlTest()
bot.run