]> git.localhorst.tv Git - alttp.git/blobdiff - app/Models/TwitchBotCommand.php
adlib chat
[alttp.git] / app / Models / TwitchBotCommand.php
index 6dc5a218087a8530103a4f998b9ed42fcc32a91e..e232bdf9a7a1aebdb079fbc7915928469ded9281 100644 (file)
@@ -11,6 +11,18 @@ class TwitchBotCommand extends Model
 {
        use HasFactory;
 
+       public static function adlibChat(Channel $channel, User $user = null) {
+               $cmd = new TwitchBotCommand();
+               $cmd->command = 'adlib-chat';
+               $cmd->parameters = [
+                       'channel' => $channel->id,
+               ];
+               $cmd->status = 'pending';
+               $cmd->user()->associate($user);
+               $cmd->bot_nick = 'horstiebot';
+               $cmd->save();
+       }
+
        public static function chat($channel, $text, User $user = null, $nick = 'localhorsttv') {
                $cmd = new TwitchBotCommand();
                $cmd->command = 'chat';