public static function resolve(TwitchBot $bot, TwitchBotCommand $cmd) {
switch ($cmd->command) {
+ case 'chat':
+ return new ChatCommand($bot, $cmd);
case 'join':
return new JoinCommand($bot, $cmd);
case 'part':
return new PartCommand($bot, $cmd);
default:
- throw new Exception('unrecognized command');
+ throw new \Exception('unrecognized command');
}
}