Herald Tech Notes
built
  • Home
  • Favorite
  • About
  • Search
Subscribe
Tagged

Telegram

A collection of 1 post

Telegram

Telegram Bot

我想用电报机器人实现一个每日天气预报和农历提醒,这里备忘相关资料。 创建机器人 和官方的 BotFather 互动一下,就可以创建自己的机器人。 拿到 token 就可以开始和 API 互动。 发个消息 获取 chat_id 用自己的账号和新建的 bot 互动一下,然后通过 API 查看 Chat ID。 $ curl -s https://api.telegram.org/bot$tg_key/getUpdates 其中 $tg_key 是机器人的 token 在返回的 JSON 中,chat 的 ID 就是需要的 chat_id。 发送消息 $ curl

  • Herald Yu
Herald Yu May 5, 2019 • 1 min read
Herald Tech Notes © 2022
Powered by Ghost