X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FTwitchBot%2FIRCMessage.php;h=1e64bd9b6de7c12c0674ce7966e06adbd914f0b0;hb=8fd3830c342ed7734280407b03cc7ced6e116b10;hp=d127f9f5d57425e850512640d6ae470c2f0c1bc3;hpb=31127000e16c18389129546b9aa652de565683fb;p=alttp.git diff --git a/app/TwitchBot/IRCMessage.php b/app/TwitchBot/IRCMessage.php index d127f9f..1e64bd9 100644 --- a/app/TwitchBot/IRCMessage.php +++ b/app/TwitchBot/IRCMessage.php @@ -2,6 +2,8 @@ namespace App\TwitchBot; +use App\Models\ChatLog; + class IRCMessage { public $command = null; @@ -125,6 +127,15 @@ class IRCMessage { return $str; } + public function log() { + ChatLog::create([ + 'command' => $this->command, + 'nick' => $this->nick, + 'params' => $this->params, + 'tags' => $this->tags, + ]); + } + public static function join($channels) { $msg = new IRCMessage(); $msg->command = 'JOIN';