]> git.localhorst.tv Git - alttp.git/blobdiff - app/TwitchBotCommands/BaseCommand.php
respond to whispers
[alttp.git] / app / TwitchBotCommands / BaseCommand.php
index d803fb739defe022977c6b4cda7c017797695507..32ef41d19d5959fd3b2cca8a30cb1099906250ab 100644 (file)
@@ -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);
        }