Class: BaseClient

Inherits:
Discordrb::Bot
  • Object
show all
Defined in:
lib/advanced_ruby_command_handler/base.rb

Direct Known Subclasses

AdvancedRubyCommandHandler::Client

Instance Method Summary collapse

Constructor Details

#initializeBaseClient

Returns a new instance of BaseClient.



23
24
25
26
27
28
# File 'lib/advanced_ruby_command_handler/base.rb', line 23

def initialize
  %w[BOT_TOKEN BOT_BASE_PREFIX BOT_OWNER].each do |environment_variable|
    raise Errors::MissingEnvironmentVariable.new(environment_variable, "Environment variable '#{environment_variable}' missing in your .env file") unless ENV[environment_variable]
  end
  super(:token => ENV["BOT_TOKEN"], :ignore_bots => true)
end