99use CSlant \TelegramGitNotifier \Exceptions \EntryNotFoundException ;
1010use CSlant \TelegramGitNotifier \Exceptions \MessageIsEmptyException ;
1111use Illuminate \Support \Facades \Config ;
12- use Telegram \Telegram as TelegramSDK ;
1312
1413class CommandService
1514{
@@ -41,7 +40,7 @@ private function sendStartMessage(): void
4140 $ firstName = $ this ->bot ->telegram ->FirstName () ?: 'there ' ;
4241 $ reply = view ("$ this ->viewNamespace ::tools.start " , ['first_name ' => $ firstName ]);
4342 $ imagePath = __DIR__ .'/../../resources/images/telegram-git-notifier-laravel.png ' ;
44-
43+
4544 $ this ->bot ->sendPhoto ($ imagePath , ['caption ' => $ reply ]);
4645 }
4746
@@ -57,11 +56,11 @@ public function handle(): void
5756 $ command = trim ($ text , '/ ' );
5857
5958 $ handlers = [
60- 'start ' => fn () => $ this ->handleStart (),
61- 'menu ' => fn () => $ this ->handleMenu (),
62- 'settings ' => fn () => $ this ->handleSettings (),
63- 'set_menu ' => fn () => $ this ->handleSetMenu (),
64- 'default ' => fn () => $ this ->handleDefault ($ command ),
59+ 'start ' => fn () => $ this ->handleStart (),
60+ 'menu ' => fn () => $ this ->handleMenu (),
61+ 'settings ' => fn () => $ this ->handleSettings (),
62+ 'set_menu ' => fn () => $ this ->handleSetMenu (),
63+ 'default ' => fn () => $ this ->handleDefault ($ command ),
6564 ];
6665
6766 $ handler = $ handlers [$ command ] ?? $ this ->handleToolCommand ($ command ) ?? $ handlers ['default ' ];
@@ -119,7 +118,7 @@ private function handleSetMenu(): void
119118 private function handleToolCommand (string $ command ): ?callable
120119 {
121120 $ toolCommands = ['token ' , 'id ' , 'usage ' , 'server ' ];
122-
121+
123122 if (!in_array ($ command , $ toolCommands , true )) {
124123 return null ;
125124 }
0 commit comments