class Issola::Bot
Public Class Methods
new(token:)
click to toggle source
# File lib/issola/bot.rb, line 5 def initialize(token:) @bot = Discordrb::Bot.new( token: token, ) @command_handler = Command::Handler.new @bot.message(start_with: Config::Bot::COMMAND_PREFIX) do |event| @command_handler.handle(event) end end
Public Instance Methods
invite_url()
click to toggle source
# File lib/issola/bot.rb, line 17 def invite_url @bot.invite_url end
register(obj)
click to toggle source
# File lib/issola/bot.rb, line 21 def register(obj) obj.register(@command_handler) end
run()
click to toggle source
# File lib/issola/bot.rb, line 25 def run @bot.run end