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

72 Commits

Author SHA1 Message Date
GochoMugo
6b4ff126f4 [telegram] Allow specifying API Base URL
Feature:

  We can now pass a custom API Base URL to
  be used during making HTTP requests. This is useful in
  proxying requests, or running tests.

  In particular, this library is (almost) ready to
  be used with PWRTelegram API (http://pwrtelegram.xyz/).
2017-01-02 14:05:10 +03:00
GochoMugo
8edd5f4c6d [polling,webhook] Add methods controlling polling, webhook
Feature:

  For finer control over bot's polling and web-hook, the
  following methods have been added:

  * TelegramBot#isPolling()
  * TelegramBot#openWebHook()
  * TelegramBot#closeWebHook()
  * TelegramBot#hasOpenWebHook()

  Please read README.md for more information on the
  new methods.
2017-01-02 13:58:46 +03:00
GochoMugo
69b059a4d7 [webhook] Allow enabling/disabling webhook auto-open
Feature:

  Currently, if the constructor option 'options.webHook' is passed,
  the bot opens the webHook immediately! There's NO way to disable
  this behavior, which might be useful in cases such as:

  * providing custom webhook parameters without opening the webhook
    immediately

  The new boolean option, 'autoOpen', can now be used to control this
  behavior. For example,

  ```js
  const bot = new TelegramBot(token, {
    webHook: {
      autoOpen: false,
    },
  });
  ```

  If set to 'false', the bot does NOT open the web-hook immediately.
  Currently, there's NO way to open the web-hook in this case.
  I'm working on that. Expect a feature to add a method to open
  the web-hook manually!

  If not provided, its value defaults to 'true'.

Implementation:

  * Backwards-compatible: the behavior of opening the web-hook
    immediately remains, when the parameter is NOT provided.
2017-01-02 13:43:56 +03:00
GochoMugo
e2f095fc52 [polling] Allow enabling/disabling polling auto-start
Feature:

  Currently, if the constructor option 'options.polling' is
  passed, the bot begins polling immediately! There's NO
  way to disable this behavior, which might be useful in
  cases such as:

  * providing custom polling parameters without starting
    the polling immediately

  The boolean option, 'autoStart', can now be used to control this
  behavior. For example,

  ```js
  const bot = new TelegramBot(token, {
    polling: {
      autoStart: false,
    },
  });
  ```

  If set to 'false', the bot does NOT begin polling
  immediately. You'll have to use TelegramBot#initPolling().

  If not provided, its value defaults to 'true'.

Implementation:

  * Backwards-compatible: the behavior of starting polling
    immediately remains, when the parameter is NOT provided
2017-01-02 13:42:12 +03:00
GochoMugo
daab34d98d Update codebase
Details:

  * Update documentation on constructors and methods
  * Make code more modular
  * Improve code (generally)
2017-01-02 13:04:44 +03:00
GochoMugo
7f30aef7b3 [docs] Update docs on API v2.3 updates 2016-12-17 02:19:00 +03:00
Mohammed Sohail
2a4fea42d7 New Update Fields From API v2.3 (#227)
* New Update Fields

bot will now get updates about posts in channels. Added new fields channel_post and edited_channel_post to Update.
2016-12-17 02:12:55 +03:00
GochoMugo
2ff2716ca2 [docs] Add link to docs for more information 2016-11-21 12:34:29 +03:00
Gocho Mugo
75d940c473 Add simple example in README (PR #54) (#224)
* Fixes the readme with an appropriate example that doesn't crash

Addresses #45

* [docs] Use simple example in Readme

References:

  * Original PR: https://github.com/yagop/node-telegram-bot-api/pull/54

* [docs] Improve the example in the Readme
2016-11-11 16:54:04 +03:00
GochoMugo
578ad1fa13 [doc] Update doc on TelegramBot#sendContact() 2016-11-10 18:17:59 +03:00
GochoMugo
9f79ba8b3b [pr] PR #124: Merge branch 'master' of https://github.com/Tketa/node-telegram-bot-api into pr/124 2016-11-10 18:12:30 +03:00
Gocho Mugo
775977e564 Merge PR #213 from jishnu7/games
Feature:

* Add `getGameHighScores`
2016-11-03 18:53:17 +03:00
GingerPlusPlus
0fb142f6ac Added onlyFirstMatch option 2016-11-03 18:49:13 +03:00
Jishnu Mohan
2fa3f68d61 adding getGameHighScores 2016-10-22 16:03:50 +05:30
GochoMugo
8dc3fe82ef Add 'edited_message' event
Notes:

  Merge branch 'master' of https://github.com/chris54721/node-telegram-bot-api into pr/191

References:

  * PR #191: https://github.com/yagop/node-telegram-bot-api/pull/191
2016-10-10 22:58:09 +03:00
GochoMugo
12770e6e95 Add initial support for games
Notes:

  Merge branch 'support-games' of https://github.com/jishnu7/node-telegram-bot-api into pr/201

References:

  * PR #201: https://github.com/yagop/node-telegram-bot-api/pull/201
2016-10-10 15:03:50 +03:00
GochoMugo
5a11cce18d Accompanying doc-updates for PR #186 2016-10-10 14:47:52 +03:00
GochoMugo
dcc3d481e4 Add accompanying minor fixes and doc updates for PR #163 2016-10-10 14:43:16 +03:00
Alex Godko
f50936fd7b Update README.md
Added a word about "callback_query" update
2016-10-10 14:43:16 +03:00
GochoMugo
f5af2bf588 Add accompanying tests, minor fixes and updates for PR #158 2016-10-10 14:21:25 +03:00
GochoMugo
628aa5b2d9 Add new methods from the API v2.1
Notes:

  Merge branch 'master' of https://github.com/HorusGoul/node-telegram-bot-api into pr/158

References:

  * PR #158: https://github.com/yagop/node-telegram-bot-api/pull/158
2016-10-10 13:48:49 +03:00
GochoMugo
f91d426c35 Minor fixes and Docs update for PR #144 2016-10-10 13:41:28 +03:00
GochoMugo
e2eaa3c8db Add TelegramBot#getChat() method
Notes:

  Merge branch 'master' of https://github.com/serhiidmytruk/node-telegram-bot-api into pr/144

References:

  * PR #144: https://github.com/yagop/node-telegram-bot-api/pull/144
2016-10-10 13:34:00 +03:00
Jishnu Mohan
3a4e3cd721 adding sendGame and setGameScore 2016-10-04 00:53:00 +05:30
Chris54721
b308c956ae Update documentation 2016-09-15 18:48:32 +02:00
Chris54721
bf3302a957 Update README.md 2016-09-15 18:24:01 +02:00
Yago
743cc0ff9d Update readme 2016-07-07 23:51:13 +02:00
Horus Lugo
67344660d4 Added getChat, getChatAdministrators, getChatMembersCount and getChatMember 2016-06-27 18:09:44 +02:00
Conor Fennell
96adb918c1 Create a stop method #81 2016-06-21 10:48:05 +01:00
Serhii Dmytruk
cf8e90e70f getchat action 2016-06-10 12:51:10 +03:00
Yago
2dfb2d801a Updated README 2016-06-06 23:34:03 +02:00
Yago
cc3c206765 Updated readme 2016-06-06 22:57:06 +02:00
Jérémy Gotteland
527b469dc8 Fixed a few typos 2016-05-13 16:20:36 +02:00
Jérémy Gotteland
3eaf377024 Added new methods sendVenue and sendContact 2016-05-13 16:16:23 +02:00
Yago
28e9c8b4c4 Generated doc 2016-03-20 20:14:56 +01:00
EXL
ef2085dd6f Update README.md
Fix typo
2016-03-18 01:35:28 +06:00
Yago
1b1e8c7bec Updated README 2016-01-30 18:19:39 +01:00
Yago
b2a4e26945 Updated doc 2016-01-30 18:06:04 +01:00
Yago
09161ac82e Generated README.md 2016-01-04 23:43:31 +01:00
Yago
874feaf833 Update doc 2016-01-04 23:34:27 +01:00
Yago
bfb047312b Update docs 2016-01-03 17:20:34 +01:00
Yago
2b94493eb5 Update README.md 2016-01-01 22:00:41 +01:00
Yago
2b58384ba5 Readme badges 📝💙 2015-10-10 18:35:13 +02:00
Yago
bfd955a909 Updated Readme 2015-10-10 18:28:21 +02:00
Yago
430adbba7f Updated Readme 2015-10-10 18:09:25 +02:00
Yago
bb6a0bb3ff setWebHook allow sending certificate as param. WebHook Documentation 2015-09-27 13:05:46 +02:00
Yago
ef5e19322c Switched to jsdoc-to-markdown 2015-09-26 22:52:14 +02:00
Ivan Skorokhodov
14dbd12f68 Added downloadFile sugar method 2015-09-26 19:52:17 +03:00
Ivan Skorokhodov
6006ba4fd6 Added getFileLink method to TelegramBot and moved generating of urls to separate method _buildURL 2015-09-26 19:39:42 +03:00
Ivan Skorokhodov
e85f517e00 Added getFile method to TelegramBot 2015-09-26 17:46:06 +03:00