From 3b4a674171021a6bf5fd3aba1a7dd6790e42c716 Mon Sep 17 00:00:00 2001 From: Sergio Brighenti Date: Sat, 1 Jun 2024 21:48:09 +0200 Subject: [PATCH] fix #2 --- src/Console/ListenCommand.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Console/ListenCommand.php b/src/Console/ListenCommand.php index 38f233d..c4e1d28 100644 --- a/src/Console/ListenCommand.php +++ b/src/Console/ListenCommand.php @@ -3,7 +3,6 @@ namespace Nutgram\Laravel\Console; use Illuminate\Console\Command; -use Illuminate\Support\Facades\App; use SergiX44\Nutgram\Nutgram; use SergiX44\Nutgram\RunningMode\SingleUpdate; @@ -17,8 +16,8 @@ public function handle(): void { $this->info('Listening...'); while (true) { - $app = App::configure(base_path())->create(); - $bot = $app->make(Nutgram::class); + app()->forgetInstance(Nutgram::class); + $bot = app(Nutgram::class); $bot->setRunningMode(SingleUpdate::class); $bot->run(); }