From: Daniel Karbach Date: Wed, 13 Apr 2022 13:40:03 +0000 (+0200) Subject: less verbose discord bot logger X-Git-Url: https://git.localhorst.tv/?a=commitdiff_plain;h=4622c1d4e89a5feac97fc19a62a2051a8484d364;p=alttp.git less verbose discord bot logger --- diff --git a/app/Console/Commands/DiscordBotCommand.php b/app/Console/Commands/DiscordBotCommand.php new file mode 100644 index 0000000..7d51cb9 --- /dev/null +++ b/app/Console/Commands/DiscordBotCommand.php @@ -0,0 +1,48 @@ +pushHandler(new StreamHandler('php://stdout', Logger::INFO)); + $discord = new Discord([ + 'logger' => $logger, + 'token' => config('discord.token'), + ]); + $discord->on('ready', function (Discord $discord) { + }); + $discord->getLoop()->addSignal(SIGINT, function() use ($discord) { + $discord->close(); + }); + $discord->run(); + return 0; + } +} diff --git a/app/Console/Commands/DiscortBotCommand.php b/app/Console/Commands/DiscortBotCommand.php deleted file mode 100644 index f400baa..0000000 --- a/app/Console/Commands/DiscortBotCommand.php +++ /dev/null @@ -1,43 +0,0 @@ - config('discord.token'), - ]); - $discord->on('ready', function (Discord $discord) { - }); - $discord->getLoop()->addSignal(SIGINT, function() use ($discord) { - $discord->close(); - }); - $discord->run(); - return 0; - } -}