Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

293
Views
No puedo obtener /scam para que mi bot de Telegram responda en el script de aplicaciones de Google

Estoy tratando de hacer un bot usando el script de aplicaciones de Google para mi grupo de Telegram para registrar contratos de estafa en las hojas de Google. No puedo obtener /scam 0xtest00000000 para hacer que el bot responda o registrarlo en mis hojas de Google. Puedo hacerlo con /^@/ y funciona bien, pero quiero usar comandos tg bot de estilo común. He intentado poner text = "", he intentado cortar, he intentado todo tipo de cosas. Cualquier ayuda sería apreciada.

 function getMe() { var response = UrlFetchApp.fetch(url + "/getMe"); Logger.log(response.getContentText()); } function setWebhook() { var response = UrlFetchApp.fetch(url + "/setWebhook?url=" + webAppUrl); Logger.log(response.getContentText()); } function sendText(chat_id, text) { let data = { method: "post", payload: { method: "sendMessage", chat_id: String(chat_id), text: text, parse_mode: "HTML" } }; UrlFetchApp.fetch(url + "/sendMessage?chat_id=" + chat_id + "$texts" + encodeURIComponent(text)); } function doGet(e) { return HtmlService.createHtmlOutput ("Hello" + JSON.stringify(e)); } function doPost(e) { try { let contents = JSON.parse(e.postData.contents); GmailApp.sendEmail(Session.getEffectiveUser().getEmail(), "Telegram Bot Update",JSON.stringify(contents,null,4)); let text = contents.message.text; let chat_id = contents.message.chat.id; let name = contents.message.from.first_name + " " + contents.message.from.last_name; let user_id = contents.message.from.id; let username = contents.message.from.username; let contract = text.slice(1).split(" ")[0]; // let item = text.split(" "); let scam = "/scam"; // let com1 = scam.split(' ')[0]; if(text == scam)) { SpreadsheetApp.openById(ssid).appendRow([new Date(),user_id,username,name,contract]); sendText(chat_id, "Contract address " + contract + " has been added to the list." ); } } catch(e) { sendText(lbsId,"Error" + JSON.stringify(e,null,4)); } }
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!