NAME

Whatbot::Controller - Command processor and dispatcher

SYNOPSIS

use Whatbot::Controller;

my $controller = Whatbot::Controller->new();
$controller->build_command_map();

...

my $messages = $controller->handle_message( $incoming_message );

DESCRIPTION

Whatbot::Controller is the master command dispatcher for whatbot. When whatbot is started, Controller builds the run paths based on the attributes in the Whatbot::Command namespace. When a message event is fired during runtime, Controller parses the message and directs the event to each appropriate command.

METHODS

handle_message( Whatbot::Message $message )

Run incoming message through commands, parse responses, and deliver back to IO.

handle_event( $event, $event_info )

Run incoming event through commands, parse responses, and delivery back to IO.

LICENSE/COPYRIGHT

Be excellent to each other and party on, dudes.