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.
26 lines
513 B
Ruby
26 lines
513 B
Ruby
#!/usr/bin/env ruby
|
|
|
|
require 'discordrb'
|
|
require 'tmpdir'
|
|
#require 'toml'
|
|
|
|
#$config = TOML.load_file("./config.toml")
|
|
|
|
bot = Discordrb::Bot.new token: 'ODc0MDMzNjc4Mjc4MzQ0NzY0.YRBFSw.N_rTx8xQL7cn5E9tSj2IlieTNlk'
|
|
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 |