Pass chat to respond to as param
authorCameron Ball <cameron@cameron1729.xyz>
Sun, 5 May 2019 07:56:40 +0000 (15:56 +0800)
committerCameron Ball <cameron@cameron1729.xyz>
Sun, 5 May 2019 07:56:40 +0000 (15:56 +0800)
src/gnb.php

index debfb55..6ec42c6 100644 (file)
@@ -80,8 +80,8 @@ getTelegram()->addCommand(
                     'text' => "Building songs hash list... This will take a while."
                 ]
             );
-
-            exec('/root/hashghen.sh notify > /dev/null &');
+            $chatid = getTelegram()->getWebhookUpdates()->get('message')->get('chat')->get('id');
+            exec('/opt/hashgen.sh notify ' . $chatid . ' > /dev/null &');
         }
     }
 );