telegram-bot-gscript
telegram-bot-gscript copied to clipboard
Example script for Google Scripts, to send messages to your Telegram bot.
Has a exception in `doPost` ``` Exception: Request failed for https://api.telegram.org returned code 400. Truncated server response: {"ok":false,"error_code":400,"description":"Bad Request: chat not found"} (use muteHttpExceptions option to examine full response). at...
{ "items": [ { "unique_id": "idx1", // [可选] 唯一编号,防止重复下单 "name": "充值100", "amount": 100, "auto_renew": true }, { "unique_id": "idx2", // [可选] 唯一编号,防止重复下单 "name": "充值200", "amount": 200, "auto_renew": false }, {...
function doPost(e){ var estringa = JSON.parse(e.postData.contents); var payload = identificar(estringa); var data = { "method": "post", "payload": payload } UrlFetchApp.fetch("https://api.telegram.org/botYOUR-API-HERE/", data);} function identificar(e){ if (e.message.text){ var mensaje = { "method":...
``` TypeError: Cannot read property 'message' of undefined identificar @ main.gs:12 ```