Skip to content

Commit

Permalink
quick update
Browse files Browse the repository at this point in the history
  • Loading branch information
sergix44 committed Jun 1, 2024
1 parent d950d0c commit e17e5fa
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 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\Contracts\Container\Container;
use Illuminate\Support\Facades\App;
use SergiX44\Nutgram\Nutgram;
use SergiX44\Nutgram\RunningMode\SingleUpdate;
Expand All @@ -14,11 +13,11 @@ class ListenCommand extends Command

protected $description = 'Start the bot for development and reloads after every update.';

public function handle(Container $container): void
public function handle(): void
{
while (true) {
App::forgetInstance(Nutgram::class);
$bot = App::make(Nutgram::class);
$app = App::configure(base_path())->create();
$bot = $app->make(Nutgram::class);
$bot->setRunningMode(SingleUpdate::class);
$bot->run();
}
Expand Down

0 comments on commit e17e5fa

Please sign in to comment.