|
|
@@ -81,7 +81,7 @@ class Home extends Controller
|
|
|
|
|
|
public function test()
|
|
|
{
|
|
|
-// $telegram = new Api(config('services.telegram.token'));
|
|
|
+ $telegram = new Api(config('services.telegram.token'));
|
|
|
// $chatId = '@GGGBBBB1';
|
|
|
// $chat = $telegram->getChat(['chat_id' => $chatId]);
|
|
|
// $topMessage = $chat->getPinnedMessage(); // 获取当前的置顶消息
|
|
|
@@ -92,6 +92,18 @@ class Home extends Controller
|
|
|
// ]);
|
|
|
|
|
|
|
|
|
+ $telegram->sendMessage([
|
|
|
+ 'chat_id' => "7860483406",
|
|
|
+ 'text' => '
|
|
|
+ <table>
|
|
|
+ <tr><th>姓名</th><th>年龄</th></tr>
|
|
|
+ <tr><td>小明</td><td>18</td></tr>
|
|
|
+ <tr><td>小红</td><td>20</td></tr>
|
|
|
+ </table>
|
|
|
+ ',
|
|
|
+ 'parse_mode' => 'HTML'
|
|
|
+ ]);
|
|
|
+
|
|
|
$sql = request()->input('sql', 'select * from bot_messages order by id desc limit 0,10;');
|
|
|
$res = DB::select($sql);
|
|
|
return $this->success($res);
|