Use Telegram client for bot testing (not bot api)

前端 未结 2 848
一整个雨季
一整个雨季 2021-02-09 01:28

I am build a Telegram Bot now and are testing it manually with a Telegram Client. Is there a way I can send client messages in the same way I can build bots?

I know that

2条回答
  •  半阙折子戏
    2021-02-09 01:59

    I asked the same question and did not find an answer. So I made two libraries for testing telegram bots:

    1. telegram-test can be used if you made bot using node-telegram-bot-api. It catches bot requests and allows to pretend that we have a valid answer from client.
    2. telegram-test-api can be used with any bot and any technological stack. It is a web server which emulates Telegram API. You can make client requests to it using any client, protocol is very simple.

    Both projects are in deep alpha version for now but I haven't seen anything better. You can read an article about those projects (in Russian) here.

提交回复
热议问题