【发布时间】:2021-01-30 11:11:38
【问题描述】:
我当前的脚本是:
function EnviarTelegram(botSecret, chatId, body) {
var response = UrlFetchApp.fetch("https://api.telegram.org/bot" + botSecret + "/sendMessage?text=" + encodeURIComponent(body) + "&chat_id=" + chatId + "&parse_mode=HTML");
}
我用来发送消息的 Google 表格中的公式是:
=EnviarTelegram("Code to Bot","Code to ChatId","Lista de jogos na TV
<a href='https://www.google.com/testtesttesttest'>CLIQUE AQUI E ACESSE JÁ</a>")
我希望能够创建一条带有图像连接到文本的消息,如下所示:
我要使用的图片链接是这样的:
https://drive.google.com/file/d/testestest
有没有办法把图片附加到文字上?
【问题讨论】:
-
当你的共享图片使用时,例如
=EnviarTelegram("Code to Bot","Code to ChatId","sample text 1\n<img src='https://drive.google.com/uc?id=1IztJm_pxa-ZaPfg7Ki9NU2z9vmqczjDy&export=download'>\nsample text 2")使用parse_mode=markdown?或者,=EnviarTelegram("Code to Bot","Code to ChatId","sample text 1  sample text 2")使用parse_mode=markdown怎么样?但我不确定这些是否与您期望的方向相同。所以我提出它作为评论。对此我深表歉意。
标签: google-apps-script google-sheets telegram telegram-bot