X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FTwitchBotCommands%2FBaseCommand.php;h=e2df728d0eb76a59970dff23aca17ed0a13705e3;hb=2d1c02504d80ad0e2c754f31f3b17d8c9ea60682;hp=8cdc0ee61f01020790f5a0aa89a630ced86781ac;hpb=51a752c7cce2465043dfb3d63a0152b64765b167;p=alttp.git diff --git a/app/TwitchBotCommands/BaseCommand.php b/app/TwitchBotCommands/BaseCommand.php index 8cdc0ee..e2df728 100644 --- a/app/TwitchBotCommands/BaseCommand.php +++ b/app/TwitchBotCommands/BaseCommand.php @@ -16,6 +16,8 @@ abstract class BaseCommand { return new JoinCommand($bot, $cmd); case 'part': return new PartCommand($bot, $cmd); + case 'random-chat': + return new RandomChatCommand($bot, $cmd); default: throw new \Exception('unrecognized command'); } @@ -42,6 +44,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); }