2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-30 13:58:27 +00:00
Commit Graph

478 Commits

Author SHA1 Message Date
Mohammed Sohail
177c951340 src/telegram: Add API v3 new update types and message sub-types (#333)
References:

    * API changelog: https://core.telegram.org/bots/api-changelog#may-18-2017
    * PR: https://github.com/yagop/node-telegram-bot-api/pull/333
    * PR-by: @kamikazechaser 
    * API v3: https://github.com/yagop/node-telegram-bot-api/issues/332
2017-05-26 16:46:26 +03:00
GochoMugo
cda9d8d597 src/telegram: Add deleteMessage method
References:

  * API deleteMessage method: https://core.telegram.org/bots/api#deleteMessage
  * PR: https://github.com/yagop/node-telegram-bot-api/pull/324
  * PR-by: @JonasFowl
  * API v3: https://github.com/yagop/node-telegram-bot-api/issues/332
2017-05-26 16:29:02 +03:00
Mohammed Sohail
942fc4854b src/telegram: Add sendVideoNote method (#330)
References:

    * API sendVideoNote method: https://core.telegram.org/bots/api#sendvideonote
    * PR: https://github.com/yagop/node-telegram-bot-api/pull/330
    * PR-by: @kamikazechaser 
    * API v3: https://github.com/yagop/node-telegram-bot-api/issues/332
2017-05-26 16:25:34 +03:00
Guidone
4653bb1b38 doc: Add RedBot to list of projects using telegram-bot-api (#341) 2017-05-26 10:36:34 +03:00
GochoMugo
64bbefd898 test: Fix tests for 'TelegramBot#onText()'
Bug:

  The registered listeners remain in effect even after
  the suite is completed; allowing other suites to trigger
  the listeners.

Fix:

  Perform clean-up before moving to next suite.
2017-05-13 11:34:14 +03:00
GochoMugo
11bcdd3b6a src/telegram: Add TelegramBot#removeTextListener()
Feature:

  This is the opposite action to `TelegramBot#onText()`.
  It allows removing any previously-registered listeners.

  It is similar to `TelegramBot#removeReplyListener()`.
2017-05-13 11:28:04 +03:00
Fabio Zuber
9f3107b5ab src/telegram: reset state of global regexp (#326)
References:

  * BR: https://github.com/yagop/node-telegram-bot-api/issues/325
  * BR-by: @Sirius-A
  * PR: https://github.com/yagop/node-telegram-bot-api/pull/326
  * PR-by: @Sirius-A
2017-05-13 10:53:21 +03:00
GochoMugo
3d4d10f9b3 doc: Add docs on experimental features 2017-05-13 10:34:07 +03:00
GochoMugo
a15e273bb9 doc: List 'bot-brother' in community section
References:

  * PR #315: https://github.com/yagop/node-telegram-bot-api/pull/315
  * PR-by: @saeedhei
2017-04-28 12:26:43 +03:00
GochoMugo
e250d65cb9 docs: Update changelog v0.27.1 2017-04-10 08:51:19 +03:00
GochoMugo
57e7d8e3b9 pkg: Bump patch version (0.27.0 -> 0.27.1) 2017-04-07 11:13:11 +03:00
GochoMugo
e63a61f232 docs: Update changelog 2017-04-07 11:11:59 +03:00
Yago
230cd20828 Merge pull request #307 from JaakkoLipsanen/patch-1
Fix badge links in README
2017-03-23 14:15:09 +01:00
Jaakko Lipsanen
221cbcbbc4 Fix badge links in README 2017-03-23 14:52:54 +02:00
Evgeny Bondarenko
c1fc486225 src: Load transpiled code for Node 5
References:
  * Bug-Report #297: https://github.com/yagop/node-telegram-bot-api/issues/297
  * Bug-Report-by: @jehy
  * PR  #298: https://github.com/yagop/node-telegram-bot-api/pull/298
  * PR-by: @jehy
2017-03-09 17:17:03 +03:00
GochoMugo
607a39ed5e src/polling: Fix defaulting value of 'options.polling.params.timeout' 2017-02-16 11:47:55 +03:00
GochoMugo
e9106a3d0e doc: Fix typos in Github issue template
References:

  * Reported-by: @GingerPlusPlus
2017-02-16 11:47:22 +03:00
Mohammed Sohail
9c60068122 examples: Express webhook (#287)
Feature:

  A webhook integration with an express app.

References:

  * Feature request: https://github.com/yagop/node-telegram-bot-api/issues/282
  * PR: https://github.com/yagop/node-telegram-bot-api/pull/287
  * Requested-by: @kamikazechaser 
  * PR-by: @kamikazechaser
2017-02-15 08:17:55 +03:00
Plusb Preco
a44eb7f1ee docs: Docs improvements (#291)
Feature:

  * Add notes about events in `api` document
  * Update copyright year
  * Cleanup docs

References:

  * Feature request: https://github.com/yagop/node-telegram-bot-api/issues/289
  * PR: https://github.com/yagop/node-telegram-bot-api/pull/291
  * Requested-by: @preco21 
  * PR-by: @preco21
2017-02-15 07:59:56 +03:00
GochoMugo
b2afdeb6a8 doc: Prepare for release v0.27.0 2017-02-10 17:50:50 +03:00
GochoMugo
3edb6d9b6e doc: Update changelog 2017-02-10 17:45:55 +03:00
GochoMugo
130f6940ce src/polling: Fix bug #284
Bug:

  During polling, deleting the already-set webhook, caused
  the `TelegramBotPolling#_getUpdates()` return an unexpected
  value.

  We expect the method to return an array (in the `.then()` clause).
  However, deleting the webhook returns its value, which is an object,
  from the method `_getUpdates()`.

Fix:

  Simply retry the polling request and return the promise.

Notes:

  Should we use recursion? I do not think so.
  Why? The chances of getting the error (having a webhook set) AGAIN
  is quite rare. And if it happens, there must be some problem with
  different instances invoking polling and webhook simultaneously.
  In that case, we wont struggle to recover from such a scenario.
  User is on their own! Isht!

References:

  * Bug report:   https://github.com/yagop/node-telegram-bot-api/issues/284
  * Reported by:  @dcparga
2017-02-10 12:40:47 +03:00
GochoMugo
9a9dfa9560 src: Minor fixes 2017-02-09 19:06:38 +03:00
GochoMugo
e75d51ca8f src/polling: Add constructor option 'options.polling.params'
Feature:

  Please see the updated API reference for more information on this
  new option.

Side-effects:

  * `options.timeout` is deprecated!

References:

  * "Feature request": https://github.com/yagop/node-telegram-bot-api/issues/243
2017-02-09 17:24:11 +03:00
Gocho Mugo
eed7c1e4d0 src: Add proper error handling (#283)
Feature:

    Please see `doc/usage.md` for more information on error-handling.
2017-02-09 16:12:22 +03:00
GochoMugo
6f5dad6e5b src/telegram: Add shim for Array#findIndex()
Bug:

  Array#findIndex() is unavailable in Node.js v0.x.
  Since we are deprecating Node.js v0.x already, we
  can use a shim in the mean time.

  Once we stop supporting that version range, we can
  drop the shim entirely.

tags: deprecate/node-v0.x
2017-02-09 15:25:38 +03:00
GochoMugo
79de62a96e src/telegram: Add TelegramBot#removeReplyListener()
Feature:

  Please see the updated API Reference.

References:

  * Author: @githugger (Frederic Schneider <fschneider1992@gmail.com>)
  * Original PR: https://github.com/yagop/node-telegram-bot-api/pull/74
2017-02-09 15:07:08 +03:00
GochoMugo
0441c99b97 examples: Add webhook example for Zeit Now
References:

  * Original PR #274: https://github.com/yagop/node-telegram-bot-api/pull/274
  * PR-by: @Ferrari
2017-02-08 13:27:23 +03:00
GochoMugo
d4a469df6b pkg: Fix bug #275
Bug:

  Node.js v4 does not support the ES6 syntax fully, thus we
  get the error:

    Block scoped declarations (let, const, function,class) not yet
    supported outside strict mode

Fix:

  * Load transpiled code
  * Deprecate support for Node.js v4.x

References:

  * Bug report: https://github.com/yagop/node-telegram-bot-api/issues/275
  * PR: https://github.com/yagop/node-telegram-bot-api/pull/280
  * Reported-by: @crazyabdul
  * PR-by: @crazyabdul
2017-02-08 12:16:51 +03:00
GochoMugo
7e4cadb514 src/polling: Fix bug #281
Bug:

  On certain errors, during polling, cause the following error to be
  thrown:

    TypeError: Cannot read property 'statusCode' of undefined

  This is caused when we try to access the 'response' property on
  the error object in the error handler (`catch(error)`). It goes
  missing when the error was fatal, for example, network error, thus
  no server response available.

References:

  * Issue #281:  https://github.com/yagop/node-telegram-bot-api/issues/281
  * Reported-by: @dimawebmaker
2017-02-08 11:44:42 +03:00
GochoMugo
3221d647cc src/polling: Fix bug #276
Bug:

  With environment variable, `NODE_ENV`, is set to 'development',
  'request-promise' emits the process warning:

  Warning: a promise was created in a handler, but was not returned from
  it

  > If you know what you're doing and don't want to silence all
  > warnings, you can create runaway promises without causing this
  > warning by returning e.g. null:
  >
  > — http://bluebirdjs.com/docs/warning-explanations.html#warning-a-promise-was-created-in-a-handler-but-was-not-returned-from-it

  We believe we know what we are doing.

References:

  * Issue #276: https://github.com/yagop/node-telegram-bot-api/issues/276
2017-02-08 11:33:08 +03:00
GochoMugo
14f37c7181 test: Add test for TelegramBot#sendDocument() using 'fileOpts' param
References:

  * Original PR: https://github.com/yagop/node-telegram-bot-api/pull/152
  * Original Author: @evolun
2017-02-03 10:47:41 +03:00
GochoMugo
9d12bdfa41 src/webhook: Use String#indexOf() instead of RegExp#test() to find token
References:

  * Original PR: https://github.com/yagop/node-telegram-bot-api/pull/147
  * Original Author: @AVVS
2017-02-03 10:16:19 +03:00
GochoMugo
2013f6cffa doc: Add templates for Issues and PRs 2017-02-01 11:47:06 +03:00
GochoMugo
2ee761677a doc: Update changelog 2017-01-31 09:27:57 +03:00
GochoMugo
dad8697411 doc: Document options.webHook.host 2017-01-30 13:44:07 +03:00
GochoMugo
c886cf2cb5 src/webhook: Add health-check endpoint (#272)
References:

  * Author: @mironov (https://github.com/mironov)
  * PR: https://github.com/yagop/node-telegram-bot-api/pull/272
2017-01-30 13:26:33 +03:00
GochoMugo
9f031a72e5 pr/272: Finish on PR 2017-01-30 13:24:15 +03:00
Anton Mironov
3263c6c253 Webhook health check endpoint 2017-01-30 12:50:22 +03:00
GochoMugo
92506f50e6 doc: Link to the latest documentation 2017-01-30 10:13:31 +03:00
GochoMugo
24a3f6dade examples: Minor cleanup 2017-01-29 18:59:05 +03:00
Daniil Yastremskiy
3ed45fb624 examples: Add webhook example for Heroku (#271) 2017-01-29 18:55:11 +03:00
Ni2c2k
535aa56345 doc: Fix links for examples and help in README (#266) 2017-01-25 21:48:38 +03:00
GochoMugo
a32259b1a1 src/telegram: Consider stream.path could not be parsed 2017-01-25 18:59:06 +03:00
GochoMugo
99f364df11 doc/help: Add link to source 2017-01-25 13:53:56 +03:00
Mohammed Sohail
235ea2276b doc: Add Badge for supported Bot API Version (#264) 2017-01-25 11:46:50 +03:00
GochoMugo
584a388fc5 doc: Add project to community section 2017-01-20 15:11:16 +03:00
GochoMugo
9cd663024f pkg: Specify supported Node.js versions 2017-01-20 15:02:12 +03:00
GochoMugo
54212daa50 pkg: Bump minor version v0.26.0 2017-01-20 10:01:11 +03:00
GochoMugo
885f895da3 pkg: Update contributors 2017-01-20 09:57:54 +03:00