Minor changes
This commit is contained in:
parent
4506801b39
commit
dc1d07b850
|
@ -1,7 +1,9 @@
|
||||||
# MumbleDJ v2
|
# MumbleDJ v2
|
||||||
# By Matthieu Grieger
|
# By Matthieu Grieger
|
||||||
|
# mumbledj.rb
|
||||||
|
|
||||||
require "mumble-ruby"
|
require "mumble-ruby"
|
||||||
|
require_relative "config"
|
||||||
|
|
||||||
# Class that defines MumbleDJ behavior.
|
# Class that defines MumbleDJ behavior.
|
||||||
class MumbleDJ
|
class MumbleDJ
|
||||||
|
@ -51,10 +53,16 @@ class MumbleDJ
|
||||||
# Sets various callbacks that can be triggered during the connection.
|
# Sets various callbacks that can be triggered during the connection.
|
||||||
def set_callbacks
|
def set_callbacks
|
||||||
@client.on_text_message do |message|
|
@client.on_text_message do |message|
|
||||||
# TODO: Call message parser here
|
self.parse_message(message)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Parses messages looking for commands, and calls the appropriate
|
||||||
|
# methods to complete each requested command.
|
||||||
|
def parse_message(message)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
# Safely disconnects the bot from the server.
|
# Safely disconnects the bot from the server.
|
||||||
def disconnect
|
def disconnect
|
||||||
@client.disconnect
|
@client.disconnect
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
# MumbleDJ
|
||||||
|
# By Matthieu Grieger
|
||||||
|
# run_bot.rb
|
||||||
|
|
||||||
require_relative "mumbledj"
|
require_relative "mumbledj"
|
||||||
require 'thread'
|
require 'thread'
|
||||||
|
|
||||||
|
|
Reference in a new issue