-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.rb
More file actions
26 lines (24 loc) · 773 Bytes
/
index.rb
File metadata and controls
26 lines (24 loc) · 773 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true
require_relative './user-commands.rb'
require_relative './console-commands.rb'
require_relative './setup.rb'
class MainModule include CodeDoBo::BotModule
def initialize(app_class, module_manager)
@module_manager = module_manager
@app_class = app_class
send_message "\u001b[96mStarting main module..."
@language = CodeDoBo::Language.new module_manager.client, __dir__ + '/language'
setup
send_message "\u001b[32mSuccessfully started main module!"
end
def on_enable
register_console_commands
register_user_commands
end
def update_prefix
@module_manager.client[:main].each do |row|
serverID = row[:server_id]
@module_manager.bot.server_prefix[serverID] = row[:prefix]
end
end
end