Feature:
Polling and WebHook are mutually exclusive. Therefore, return an
error whenever the user tries to start polling, and the instance has
an open webhook, or user tries to open a webhook, and the instance
is already polling.
Feature:
The constructor option, 'filepath', allows us to remove
the TelegramBot's behaviour of allowing users to pass in
file-paths as arguments, as it involves some operations
that might be (are) strongly against what a programmer wishes
to achieve with the library.
Expect this to be documented better in the near future.
Implementation:
* Backwards compatible: The default behavior is not changed!
Feature:
The different mechanisms of fetching updates, i.e. polling
and webhook, have had their implementations improved:
* the TelegramBot instance needs to create the polling and
webhook instances once, and when necessary
* returning promises from TelegramBot#openWebHook() and
TelegramBot#startPolling() allows more precise control
Also,
* TelegramBot#initPolling() is being deprecated in favor of
TelegramBot#startPolling() to ensure consistency (as the
opposite action of TelegramBot#stopPolling())
Feature:
We shall allow passing more options to the HTTP server,
in `https.createServer()`.
We are using a new property, `https`, to avoid any namespace
collisions with our own options.
`options.key`, `options.cert` and `options.pfx` are convenient
options, in that they allow the user to provide paths to the
corresponding files, which are read automatically,
though synchronously!
Implementation:
* completely backwards-compatible
* all changes are being tested, except `options.pfx`
References:
* Pass `ca` prop to https.createServer(): https://github.com/yagop/node-telegram-bot-api/pull/17
Bug:
The library assumes signatures of methods to be, somewhat:
methodName(requiredParam1, requiredParam2, form = {})
where 'requiredParam1' ('requiredParam2', ..., 'requiredParamN')
are parameters that MUST be provided, and
'form' is an optional object allowing supplying any additional,
optional parameters that the Bot API allows.
This allows any new parameters added by Telegram to be
readily-supported by our library.
Also, the following have been included:
* Corresponding tests
* Documentation on the old, deprecated signatures
* Console-logging the deprecation notices
Feature:
Our tests are PASSING!
NOTE:
-----
Before running tests, provide the environment variable,
TEST_GAME_SHORT_NAME, whose value is the short name of a game
created for the test bot. It is used in testing methods for
games, such as TelegramBot#sendGame().