]> git.localhorst.tv Git - alttp.git/blobdiff - app/TwitchBot/ChatCommand.php
track twitch category where chats were sent in
[alttp.git] / app / TwitchBot / ChatCommand.php
index 8e6fbe1e7f1fa9c7b1c09b2e6e1552417c9079df..f2e11b61dd4bda83c4eb89652eb9aed7aa4fb34e 100644 (file)
@@ -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,11 +61,7 @@ abstract class ChatCommand {
        }
 
        protected function listAnd($entries) {
-               $lang = empty($this->channels->languages) ? 'en' : $this->channel->languages[0];
-               if ($lang == 'de') {
-                       return Arr::join($entries, ', ', ' und ');
-               }
-               return Arr::join($entries, ', ', ' and ');
+               return $this->channel->listAnd($entries);
        }
 
        protected function messageChannel($str) {