+ public static function chat($channel, $text, User $user = null, $nick = 'localhorsttv') {
+ $cmd = new TwitchBotCommand();
+ $cmd->command = 'chat';
+ $cmd->parameters = [
+ 'channel' => $channel,
+ 'text' => $text,
+ ];
+ $cmd->status = 'pending';
+ $cmd->user()->associate($user);
+ $cmd->bot_nick = $nick;
+ $cmd->save();
+ }
+
+ public static function join($channel, User $user = null, $nick = 'localhorsttv') {