X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FTwitchBotCommands%2FBaseCommand.php;h=32ef41d19d5959fd3b2cca8a30cb1099906250ab;hb=f0d1a566f5afd76ab7a56b295b71d5756dfd2bc3;hp=d803fb739defe022977c6b4cda7c017797695507;hpb=ebdf8e5f6761de2abd85b01096a67dee62d7d4aa;p=alttp.git diff --git a/app/TwitchBotCommands/BaseCommand.php b/app/TwitchBotCommands/BaseCommand.php index d803fb7..32ef41d 100644 --- a/app/TwitchBotCommands/BaseCommand.php +++ b/app/TwitchBotCommands/BaseCommand.php @@ -10,6 +10,8 @@ abstract class BaseCommand { public static function resolve(TwitchBot $bot, TwitchBotCommand $cmd) { switch ($cmd->command) { + case 'adlib-chat': + return new AdlibChatCommand($bot, $cmd); case 'chat': return new ChatCommand($bot, $cmd); case 'join': @@ -44,6 +46,10 @@ abstract class BaseCommand { return User::findOrFail($this->getParameter('user')); } + protected function getExecutingUser() { + return $this->command->user; + } + protected function hasParameter($name) { return array_key_exists($name, $this->command->parameters); }