Module: Rubot

Defined in:
lib/rubot.rb,
lib/rubot/version.rb,
lib/rubot/classes/event.rb,
lib/rubot/classes/client.rb,
lib/rubot/classes/command.rb,
lib/rubot/classes/manager.rb,
lib/rubot/utils/better_embed.rb,
lib/rubot/modules/application_command.rb

Defined Under Namespace

Modules: ApplicationCommand Classes: BetterEmbed, Client, Command, Event, Manager

Constant Summary collapse

VERSION =
"0.1.7"

Class Method Summary collapse

Class Method Details

.client ⇒ Rubot::Client

Returns:



16
17
18
19
20
# File 'lib/rubot.rb', line 16

def self.client
  return @client if @client

  raise "Rubot is not initialized. Call Rubot.new first."
end

.new(application_commands_path:, commands_path: nil, events_path: nil) ⇒ Object



8
9
10
11
12
13
# File 'lib/rubot.rb', line 8

def self.new(application_commands_path:, commands_path: nil, events_path: nil)
  raise "Rubot already initialized. Call Rubot.client to access client." if @client

  @client = Rubot::Client.new(application_commands_path: application_commands_path, commands_path: commands_path, events_path: events_path)
  @client
end