99use CSlant \TelegramGitNotifier \Exceptions \EntryNotFoundException ;
1010use CSlant \TelegramGitNotifier \Exceptions \MessageIsEmptyException ;
1111use Illuminate \Support \Facades \Config ;
12+ use Telegram \Telegram as TelegramSDK ;
1213
1314class CommandService
1415{
@@ -40,7 +41,7 @@ private function sendStartMessage(): void
4041 $ firstName = $ this ->bot ->telegram ->FirstName () ?: 'there ' ;
4142 $ reply = view ("$ this ->viewNamespace ::tools.start " , ['first_name ' => $ firstName ]);
4243 $ imagePath = __DIR__ .'/../../resources/images/telegram-git-notifier-laravel.png ' ;
43-
44+
4445 $ this ->bot ->sendPhoto ($ imagePath , ['caption ' => $ reply ]);
4546 }
4647
@@ -56,11 +57,11 @@ public function handle(): void
5657 $ command = trim ($ text , '/ ' );
5758
5859 $ handlers = [
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 ),
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 ),
6465 ];
6566
6667 $ handler = $ handlers [$ command ] ?? $ this ->handleToolCommand ($ command ) ?? $ handlers ['default ' ];
@@ -118,7 +119,7 @@ private function handleSetMenu(): void
118119 private function handleToolCommand (string $ command ): ?callable
119120 {
120121 $ toolCommands = ['token ' , 'id ' , 'usage ' , 'server ' ];
121-
122+
122123 if (!in_array ($ command , $ toolCommands , true )) {
123124 return null ;
124125 }
0 commit comments