File tree 2 files changed +3
-14
lines changed
2 files changed +3
-14
lines changed Original file line number Diff line number Diff line change @@ -12,16 +12,10 @@ public function bot(string $name = null): ?TelegramBot
12
12
{
13
13
$ name ??= config ('telepath.default ' );
14
14
15
- return static ::make ($ name )
16
- ?? throw new \InvalidArgumentException ('Invalid bot name provided. ' );
17
- }
18
-
19
- protected function make (string $ identifier ): ?TelegramBot
20
- {
21
15
try {
22
- return app ("telepath.bot. {$ identifier }" );
16
+ return app ("telepath.bot. {$ name }" );
23
17
} catch (BindingResolutionException ) {
24
- return null ;
18
+ throw new \ InvalidArgumentException ( ' Invalid bot name provided. ' ) ;
25
19
}
26
20
}
27
21
Original file line number Diff line number Diff line change 4
4
5
5
use Illuminate \Support \Facades \Route ;
6
6
use Illuminate \Support \ServiceProvider ;
7
+ use Symfony \Component \Cache \Adapter \ArrayAdapter ;
7
8
use Symfony \Component \Cache \Adapter \FilesystemAdapter ;
8
9
use Telepath \Laravel \Config \BotConfig ;
9
10
use Telepath \Laravel \Console \Commands \FetchCommand ;
@@ -33,12 +34,6 @@ public function register(): void
33
34
container: app (),
34
35
);
35
36
36
- $ bot ->enableCaching (
37
- new FilesystemAdapter (
38
- directory: storage_path ("telepath/cache/ {$ config ->name }" ),
39
- )
40
- );
41
-
42
37
$ bot ->discoverPsr4 (
43
38
$ config ->directory ?? app_path ('Telepath ' )
44
39
);
You can’t perform that action at this time.
0 commit comments