首先在 telegram 中搜索 botfather,并和 botfather 开始对话:
按下 "/start" 之后,botfather 会回复如下信息:
紧接着回复 "/newbot" 开始创建你的 bot,botfather 会要求你输入 bot 的名字和 bot 用户名,bot 名会显示在搜索界面,而 bot 的 username 在搜索 bot 和添加 bot 入 group 的时候会起作用(你无法通过搜索 bot 名来添加 bot 如群组)。username 必须以 bot 或者_bot(不区分大小写)结尾:如 ABCBot,ABC_bot。
完成了这两项后,botfather 会给你 bot 专属的 token:
搜索添加机器人:@getidsbot
点击/start
获取ID,ID后面的一串红色数字,就是你的ID
[notify.telegram_push]
name = 'Telegram通知'
telegram_token = '前文获取的TOKEN'
telegram_chat_id = '前文获取的ID'
[notify.telegram_push.proxy]
http = '你的代理地址'
https = '你的代理地址'