X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FModels%2FTwitchBotCommand.php;h=e232bdf9a7a1aebdb079fbc7915928469ded9281;hb=f0d1a566f5afd76ab7a56b295b71d5756dfd2bc3;hp=6dc5a218087a8530103a4f998b9ed42fcc32a91e;hpb=ebdf8e5f6761de2abd85b01096a67dee62d7d4aa;p=alttp.git diff --git a/app/Models/TwitchBotCommand.php b/app/Models/TwitchBotCommand.php index 6dc5a21..e232bdf 100644 --- a/app/Models/TwitchBotCommand.php +++ b/app/Models/TwitchBotCommand.php @@ -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';