Finished writing the main function. Detects cheese keywords in messages and added user/server blacklist/whitelist.
This commit is contained in:
17
src/bot.rb
17
src/bot.rb
@@ -16,18 +16,31 @@
|
||||
|
||||
require 'discordrb'
|
||||
require 'securerandom'
|
||||
require_relative 'events/message_check'
|
||||
|
||||
class CheeseBot
|
||||
def initialize
|
||||
puts "Initializing bot..."
|
||||
@bot = Discordrb::Bot.new(
|
||||
token: ENV['BOT_TOKEN'],
|
||||
intents: [:servers, :server_messages]
|
||||
intents: [:servers, :server_messages],
|
||||
)
|
||||
|
||||
|
||||
puts "Registering the Message Checker..."
|
||||
MessageCheck.register(@bot)
|
||||
|
||||
puts "Initializing database..."
|
||||
Database.setup
|
||||
|
||||
puts "Loading commands..."
|
||||
load_commands
|
||||
|
||||
puts "Starting bot..."
|
||||
start_bot
|
||||
end
|
||||
|
||||
|
||||
|
||||
def run
|
||||
@bot.run
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user