From ea6ad0bde2c9ff56d547346f0d0a6999d0acceb2 Mon Sep 17 00:00:00 2001 From: Astoria Floyd Date: Sat, 30 Oct 2021 19:57:55 -0500 Subject: [PATCH] Revert "Delete 'pingbot.rb'" This reverts commit 97656bff08a999eee86d9b70534e56edfb3765ef. --- pingbot.rb | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 pingbot.rb diff --git a/pingbot.rb b/pingbot.rb new file mode 100755 index 0000000..0495dcc --- /dev/null +++ b/pingbot.rb @@ -0,0 +1,26 @@ +#!/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 \ No newline at end of file