]> git.localhorst.tv Git - alttp.git/commitdiff
add hello emotes to hi category
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 10 Apr 2024 07:27:45 +0000 (09:27 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Wed, 10 Apr 2024 07:27:45 +0000 (09:27 +0200)
app/TwitchBot/TokenizedMessage.php
tests/Unit/TwitchBot/TokenizedMessageTest.php

index 259cfc6a33f20759f4f6a817e0f10df51232a290..dc908d814cfc4bab66392e1004cf6bcaf7604278 100644 (file)
@@ -103,7 +103,7 @@ class TokenizedMessage {
                                $this->classification = 'gl';
                        } else if (Str::contains($this->raw, ['haha', 'hehe', 'hihi', 'kekw', 'lol', 'lul', 'xd'])) {
                                $this->classification = 'lol';
-                       } else if (Str::startsWith($this->raw, ['ahoi', 'hallo', 'hello', 'hi ', 'huhu']) || Str::endsWith($this->raw, ['hi', 'wave'])) {
+                       } else if (Str::startsWith($this->raw, ['ahoi', 'hallo', 'hello', 'hi ', 'huhu']) || Str::endsWith($this->raw, ['hello', 'hi', 'wave'])) {
                                $this->classification = 'hi';
                        } else if (Str::contains($this->raw, ['pog', 'wow'])) {
                                $this->classification = 'pog';
index 243f0985d4f84a1d2d840c439447e65e48c24aea..8d415739f66ad6b0ec926dc5b63e09f1862a85ba 100644 (file)
@@ -17,6 +17,7 @@ class TokenizedMessageTest extends TestCase {
 
                $this->assertEquals('hi', TokenizedMessage::fromString('hi')->classify());
                $this->assertEquals('hi', TokenizedMessage::fromString('hallo')->classify());
+               $this->assertEquals('hi', TokenizedMessage::fromString('osora9Hello')->classify());
                $this->assertNotEquals('hi', TokenizedMessage::fromString('hier steht was')->classify());
 
                $this->assertEquals('hype', TokenizedMessage::fromString('122 Hype!')->classify());