Skip to content

Commit df01409

Browse files
committed
test
1 parent 46f10bf commit df01409

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/Console/ListenCommand.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,15 @@
88

99
class ListenCommand extends Command
1010
{
11-
protected $signature = 'nutgram:listen {--pollingTimeout=1}';
11+
protected $signature = 'nutgram:listen {--pollingTimeout=5}';
1212

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

1515
public function handle(): void
1616
{
1717
$this->warn('This running mode is very inefficient and only suitable for development purposes. DO NOT USE IN PRODUCTION!');
1818
$this->info('Listening...');
19-
20-
$pollingTimeout = $this->option('pollingTimeout') ?: 1;
21-
config()?->set('nutgram.config.polling.timeout', $pollingTimeout);
19+
config()?->set('nutgram.config.polling.timeout', $this->option('pollingTimeout'));
2220
while (true) {
2321
if (function_exists('opcache_reset')) {
2422
opcache_reset();

src/NutgramServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ public function register()
8282
});
8383

8484
$this->app->alias(Nutgram::class, 'nutgram');
85+
$this->app->alias(Nutgram::class, 'telegram');
8586
$this->app->alias(Nutgram::class, FakeNutgram::class);
86-
$this->app->singleton('telegram', fn (Application $app) => $app->get(Nutgram::class));
8787

8888
if (config('nutgram.mixins', false)) {
8989
Nutgram::mixin(new Mixins\NutgramMixin());

0 commit comments

Comments
 (0)