|
@@ -115,7 +115,7 @@ class Home extends Controller
|
|
public function setWebHook()
|
|
public function setWebHook()
|
|
{
|
|
{
|
|
$this->setMyCommands();
|
|
$this->setMyCommands();
|
|
- try {
|
|
|
|
|
|
+ // try {
|
|
$telegram = new Api(config('services.telegram.token'));
|
|
$telegram = new Api(config('services.telegram.token'));
|
|
// 设置 Webhook
|
|
// 设置 Webhook
|
|
$webhookUrl = url('/api/onMessage'); // Webhook URL,指向刚才定义的路由
|
|
$webhookUrl = url('/api/onMessage'); // Webhook URL,指向刚才定义的路由
|
|
@@ -131,9 +131,9 @@ class Home extends Controller
|
|
|
|
|
|
var_dump($res);
|
|
var_dump($res);
|
|
|
|
|
|
- } catch (TelegramSDKException $e) {
|
|
|
|
- return $this->error($e->getCode(), $e->getMessage());
|
|
|
|
- }
|
|
|
|
|
|
+ // } catch (TelegramSDKException $e) {
|
|
|
|
+ // return $this->error($e->getCode(), $e->getMessage());
|
|
|
|
+ // }
|
|
|
|
|
|
return $this->success($res);
|
|
return $this->success($res);
|
|
}
|
|
}
|