]> git.localhorst.tv Git - alttp.git/blobdiff - app/Console/Commands/ReevaluateChatCommand.php
also reevaluate error chats
[alttp.git] / app / Console / Commands / ReevaluateChatCommand.php
index 69a8374c73d4da917075e2a1f9978daee97205dc..b289bd0bde84b9a36ae92c9a75196f96cc547497 100644 (file)
@@ -5,7 +5,7 @@ namespace App\Console\Commands;
 use App\Models\ChatLog;
 use Illuminate\Console\Command;
 
-class EvaluateChatCommand extends Command {
+class ReevaluateChatCommand extends Command {
 
        /**
         * The name and signature of the console command.
@@ -29,7 +29,7 @@ class EvaluateChatCommand extends Command {
        public function handle() {
                $good = 0;
                $bad = 0;
-               ChatLog::where('type', '=', 'chat')
+               ChatLog::whereIn('type', ['chat', 'error'])
                        ->where('banned', false)
                        ->orderBy('created_at')
                        ->chunk(10000, function ($logs) use (&$good, &$bad) {