jehy / telegram-test-api

Simple implimentation of telegram API which can be used for testing telegram bots
MIT License
98 stars 24 forks source link

Add deleteWebhook dummi API command #22

Closed pipex closed 5 years ago

pipex commented 5 years ago

This is necessary for compatibility with the telegraf-js bot framework.

Telegraf bots on launch, when configured for polling, will first delete any Webhooks that are remotely setup, which prevents their use with telegram-test-api.

A dummy deleteWebhook API method implementation is provided in this PR

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.4%) to 85.609% when pulling 9466bc31aee1e387187a8e94d5131688910679a3 on pipex:webhook into b066c6bae78092d1e19c173717a2a84d57c8358d on jehy:master.

pipex commented 5 years ago

I just realized it is possible to launch a Telegraf bot using startPolling() (as you do in telegraf-test.js).

Nevertheless it can be convenient to use the launch() method which also automatically retrieves the bot name (using getMe) from the server.

jehy commented 5 years ago

Great, thanks! Published as 2.3.0.