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 },
// );
};
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
October 23, 2023