Skip to content

Commit

Permalink
fix #2
Browse files Browse the repository at this point in the history
  • Loading branch information
sergix44 committed Jun 1, 2024
1 parent 3c4132b commit 3b4a674
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/Console/ListenCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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();
}
Expand Down

0 comments on commit 3b4a674

Please sign in to comment.