X-Git-Url: https://git.localhorst.tv/?a=blobdiff_plain;f=app%2FTwitchBot%2FChatCommand.php;h=f2e11b61dd4bda83c4eb89652eb9aed7aa4fb34e;hb=8645b77ea2dc402f0265e1c8022ba18302506ca1;hp=d03f7829e2704923f3b72780a8b3f1fd12596fb2;hpb=7fc357a5943bf280ce2fa9aa97ec516af61efd69;p=alttp.git diff --git a/app/TwitchBot/ChatCommand.php b/app/TwitchBot/ChatCommand.php index d03f782..f2e11b6 100644 --- a/app/TwitchBot/ChatCommand.php +++ b/app/TwitchBot/ChatCommand.php @@ -3,7 +3,6 @@ namespace App\TwitchBot; use App\Models\Channel; -use Illuminate\Support\Arr; abstract class ChatCommand { @@ -16,6 +15,9 @@ abstract class ChatCommand { case 'guessing-cancel': $cmd = new GuessingCancelCommand(); break; + case 'guessing-leaderboard': + $cmd = new GuessingLeaderboardCommand(); + break; case 'guessing-solve': $cmd = new GuessingSolveCommand(); break; @@ -59,10 +61,11 @@ abstract class ChatCommand { } protected function listAnd($entries) { - return Arr::join($entries, ', ', ' and '); + return $this->channel->listAnd($entries); } protected function messageChannel($str) { + if (empty($str)) return; $msg = IRCMessage::privmsg($this->channel->twitch_chat, $str); $this->bot->sendIRCMessage($msg); }