telegramBot
Script
v14
Fork
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
export
const
telegramBot
=
async
(
req
:
express
.
Request
,
res
:
express
.
Response
)
=>
{
// if (
// req.get("x-telegram-bot-api-secret-token") !==
// @me.secrets.telegram_webhook_token
// ) {
// return res.status(401);
// }
// const chatId: number = req.body.message.chat.id;
// if (chatId.toString() !== @me.secrets.telegram_chat_id) {
// return res.status(401);
// }
// const text: string = await @me.gptChat(req.body.message.text);
// @vtdocs.telegramSendMessage(
// @me.secrets.telegram_api_token,
// { chat_id: chatId, text },
// );
}
;