From af4f2e9450392e41e4a0bfb3247fe3b4435f03c7 Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Fri, 28 Jun 2024 17:27:24 +0200 Subject: [PATCH] whispers --- app/Console/Commands/TwitchAuth.php | 2 +- app/Models/ChatLog.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Console/Commands/TwitchAuth.php b/app/Console/Commands/TwitchAuth.php index e46c118..4b185c6 100644 --- a/app/Console/Commands/TwitchAuth.php +++ b/app/Console/Commands/TwitchAuth.php @@ -33,7 +33,7 @@ class TwitchAuth extends Command { if (!$token) { $token = new TwitchToken(); $token->nick = $this->argument('nick'); - $token->scope = ['chat:read', 'chat:edit']; + $token->scope = ['chat:read', 'chat:edit', 'whispers:read', 'whispers:edit']; } $url = $token->getAuthUrl(); $this->line('Please visit '.$url); diff --git a/app/Models/ChatLog.php b/app/Models/ChatLog.php index cad1bfe..49a57c2 100644 --- a/app/Models/ChatLog.php +++ b/app/Models/ChatLog.php @@ -77,7 +77,7 @@ class ChatLog extends Model { return; } - if ($this->command == 'PRIVMSG') { + if ($this->command == 'PRIVMSG' || $this->command == 'WHISPER') { if (static::isKnownBot($this->nick)) { $this->type = 'bot'; } else if (substr($this->params[0], 0, 1) == '#') { -- 2.39.2