【问题标题】:Connecting Telegraf to a Local Bot API Server?将 Telegraf 连接到本地 Bot API 服务器?
【发布时间】:2021-02-25 03:30:40
【问题描述】:

谁能告诉我如何将电报使用的服务器从“https://api.telegram.org/”更改为我的服务器?

我已经成功安装了服务器,它工作正常,但不知道如何将它连接到电报。

我的意思是这个服务器: Telegram Bot Api Local Server

【问题讨论】:

    标签: telegram telegram-bot python-telegram-bot telegraf telegram-webhook


    【解决方案1】:

    您可以在 Telegraf 选项中更改 apiRoot 选项:

    let bot = new Telegraf(process.env.TOKEN, {
      telegram: {
        apiRoot: 'http://127.0.0.1:8080'
      }
    }) 
    

    【讨论】:

    • 非常感谢
    猜你喜欢
    • 2017-01-27
    • 2020-05-15
    • 2017-04-20
    • 2021-11-12
    • 2019-03-02
    • 2020-01-04
    • 2018-10-09
    • 2015-03-13
    相关资源
    最近更新 更多