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

116 Commits

Author SHA1 Message Date
danielperez9430
bbbc6cb8b8 feat: Support Telegram Bot API 5.5 2021-12-07 16:43:16 +01:00
Daniel Pérez Fernández
a1e73481db docs: Update changelod and readme 2021-11-07 16:08:22 +01:00
Alexander Cerutti
5cc6629ca0
Removed deprecated node-telegram-operations-manager from list (#896)
* Removed deprecated node-telegram-operations-manager from list

* Fixed repeated words
2021-08-12 21:19:34 +03:00
Daniel Pérez Fernández
e6938f81eb
Telegram Bot API 5.2 Support (#870)
* Add new method sendPoll

* getMyCommands

* setMyCommands

* Update doc/api

* 1# Fix Test sendPhoto

The sendPhoto method does not support .gif files, use sendAnimation.

This fix remplace .gif file by .png

* CustomTitle and ChatPermissions support

setChatAdministratorCustomTitle
setChatPermissions

* Update Readme

Update Badge Telegram API Version

* Minor Fix and Fix setChatPhoto

The Telegram Bots api has a bug that they are fixing and gives problems with the previous image. While they don't fix it, the image replacement is the fastest solution

* Minor Fix and Add Test

Fixed setChatPermissions

Test:
- sendDice
- getMyCommands
- setMyCommands
- setChatAdministratorCustomTitle
- setChatPermissions

* Update Changelog and Package.json version

* Fix typos in Changelog

* Add support for poll_answer

From: https://github.com/yagop/node-telegram-bot-api/pull/777

* Add JieJiSS contribution in Changelog

* Add sendPoll Test

* Add unpinAllChatMessages Support

* Add copyMessage support

* Add close and logOut Support

* Add Test + Minor fixes

* Update CHANGELOG

Update version 0.50.1

* Update Readme Bot API Badge

* Update Version to 0.51.0

* Bot API 5.1 support Improved Invite Links

- Added the method createChatInviteLink
- Added the method editChatInviteLink
- Added the method revokeChatInviteLink

* Update version to 0.52.0 and new tests

- Update Changelog
- New Test
- Update version to 0.52.0

* Add new messageTypes

-  voice_chat_started
-  voice_chat_ended
- voice_chat_participants_invited

* Update Changelog and add new MessageType

* New messageTypes and updates

Add support for new messageTypes:
  - chat_invite_link
  - chat_member_updated

Add support for new updates:
 - my_chat_member
 - chat_member

* Telegram Bot API 5.2 Support

* Update Changelog + readme

* Fix Changelog
2021-04-26 19:50:34 +03:00
Daniel Pérez Fernández
de76dcd2cb
Bot API 5.1: Support Improved Invite Links and new messageTypes (#859)
* Add new method sendPoll

* getMyCommands

* setMyCommands

* Update doc/api

* 1# Fix Test sendPhoto

The sendPhoto method does not support .gif files, use sendAnimation.

This fix remplace .gif file by .png

* CustomTitle and ChatPermissions support

setChatAdministratorCustomTitle
setChatPermissions

* Update Readme

Update Badge Telegram API Version

* Minor Fix and Fix setChatPhoto

The Telegram Bots api has a bug that they are fixing and gives problems with the previous image. While they don't fix it, the image replacement is the fastest solution

* Minor Fix and Add Test

Fixed setChatPermissions

Test:
- sendDice
- getMyCommands
- setMyCommands
- setChatAdministratorCustomTitle
- setChatPermissions

* Update Changelog and Package.json version

* Fix typos in Changelog

* Add support for poll_answer

From: https://github.com/yagop/node-telegram-bot-api/pull/777

* Add JieJiSS contribution in Changelog

* Add sendPoll Test

* Add unpinAllChatMessages Support

* Add copyMessage support

* Add close and logOut Support

* Add Test + Minor fixes

* Update CHANGELOG

Update version 0.50.1

* Update Readme Bot API Badge

* Update Version to 0.51.0

* Bot API 5.1 support Improved Invite Links

- Added the method createChatInviteLink
- Added the method editChatInviteLink
- Added the method revokeChatInviteLink

* Update version to 0.52.0 and new tests

- Update Changelog
- New Test
- Update version to 0.52.0

* Add new messageTypes

-  voice_chat_started
-  voice_chat_ended
- voice_chat_participants_invited

* Update Changelog and add new MessageType

* New messageTypes and updates

Add support for new messageTypes:
  - chat_invite_link
  - chat_member_updated

Add support for new updates:
 - my_chat_member
 - chat_member
2021-03-29 17:37:10 +03:00
Daniel Pérez Fernández
5d30b6a134
Telegram Bot API 5.0 Support (#835)
* Add new method sendPoll

* getMyCommands

* setMyCommands

* Update doc/api

* 1# Fix Test sendPhoto

The sendPhoto method does not support .gif files, use sendAnimation.

This fix remplace .gif file by .png

* CustomTitle and ChatPermissions support

setChatAdministratorCustomTitle
setChatPermissions

* Update Readme

Update Badge Telegram API Version

* Minor Fix and Fix setChatPhoto

The Telegram Bots api has a bug that they are fixing and gives problems with the previous image. While they don't fix it, the image replacement is the fastest solution

* Minor Fix and Add Test

Fixed setChatPermissions

Test:
- sendDice
- getMyCommands
- setMyCommands
- setChatAdministratorCustomTitle
- setChatPermissions

* Update Changelog and Package.json version

* Fix typos in Changelog

* Add support for poll_answer

From: https://github.com/yagop/node-telegram-bot-api/pull/777

* Add JieJiSS contribution in Changelog

* Add sendPoll Test

* Add unpinAllChatMessages Support

* Add copyMessage support

* Add close and logOut Support

* Add Test + Minor fixes

* Update CHANGELOG

Update version 0.50.1

* Update Readme Bot API Badge

* Update Version to 0.51.0
2020-12-10 13:47:22 +03:00
Daniel Pérez Fernández
1bae9c2964
Add new method sendDice, getMyCommands, setMyCommands and more (#796)
* Add new method sendPoll

* getMyCommands

* setMyCommands

* Update doc/api

* 1# Fix Test sendPhoto

The sendPhoto method does not support .gif files, use sendAnimation.

This fix remplace .gif file by .png

* CustomTitle and ChatPermissions support

setChatAdministratorCustomTitle
setChatPermissions

* Update Readme

Update Badge Telegram API Version

* Minor Fix and Fix setChatPhoto

The Telegram Bots api has a bug that they are fixing and gives problems with the previous image. While they don't fix it, the image replacement is the fastest solution

* Minor Fix and Add Test

Fixed setChatPermissions

Test:
- sendDice
- getMyCommands
- setMyCommands
- setChatAdministratorCustomTitle
- setChatPermissions

* Update Changelog and Package.json version

* Fix typos in Changelog

* Add support for poll_answer

From: https://github.com/yagop/node-telegram-bot-api/pull/777

* Add JieJiSS contribution in Changelog

* Add sendPoll Test
2020-05-12 09:31:30 +05:30
Mohamed Nainar
c6a0eedc9a
Update README.md (#790) 2020-04-30 20:54:29 +05:30
Mohammed Sohail
5553ceecbb
release: tidy up
- remove appveyor badge
- restrict builds to main versions of node
- add npm badge
2019-10-15 21:38:49 +05:30
Mohammed Sohail
e66243a776
[Docs] Update documentation (#753)
* doc: update readme.md
2019-10-15 20:51:07 +05:30
Mohammed Sohail
690c26faa2
[Package] Bump to v.0.40.0 (#752)
* doc: update changelog

- support for v4. to v4.2

* doc: update license date to 2019

* pkg: bump npm package to 0.40.0
2019-10-15 15:33:30 +05:30
Alexander Cerutti
cf28a17654
Added node-telegram-operation-manager to community field 2018-11-04 23:34:18 +01:00
Sedric Heidarizarei
8a51b70028 Copyright Updated (#658)
* Update README/LICENSE.md

- Year to 2018
2018-11-02 11:12:25 +05:30
Mohammed Sohail
d6f5639768
Update badges (#667)
* Update README badges

- Update badge to reflect the current update (#625)
- Fix broken BitHound badge

* Update badges

- Replace coveralls with codecov
- Add new appveyor badge

* Fix minor typo
2018-11-02 11:09:48 +05:30
mashed-potatoes
8ef560160c
Remove bitHound Score 2018-07-09 05:59:15 +05:00
Alexander Cerutti
b585957a0a doc: Add telegram-keyboard-wrapper to community section (#529)
pr-by: @alexandercerutti
2018-05-15 09:10:43 +03:00
Benny Neugebauer
091ef7a8a7
doc: Add missing full stop 2018-02-04 00:12:44 +01:00
GochoMugo
309696622d
doc: Showcase and update contributor list 2017-12-20 13:48:29 +03:00
GochoMugo
55332c3c25
doc: Update changelog, version badge 2017-12-20 12:22:30 +03:00
Aaron Meese
e03ffe5d04 doc: Update README.md (#457) 2017-11-18 22:18:50 +03:00
GochoMugo
7f41992e62
pkg: Bump minor version (v0.28.0 -> v0.29.0)
See `CHANGELOG.md`.
2017-10-22 19:36:08 +03:00
Savely Krasovsky
83d3235cc5 src/telegram: Support Bot API v3.1
References:

  * Bot API v3.1: https://core.telegram.org/bots/api-changelog#june-30-2017
2017-07-05 09:06:38 +03:00
GochoMugo
9a4298308e
doc: Add tutorials page
References:

  * PR: https://github.com/yagop/node-telegram-bot-api/pull/358
  * FR: https://github.com/yagop/node-telegram-bot-api/issues/351
  * PR-by, FR-by: @hosein2398
2017-06-26 12:28:11 +03:00
Mohammed Sohail
5490a3a6e0 doc: Update API version badge (#339)
References:

  * PR: https://github.com/yagop/node-telegram-bot-api/pull/339
  * PR-by: @kamikazechaser 
  * API v3 progress tracker: https://github.com/yagop/node-telegram-bot-api/issues/332
2017-05-26 18:13:54 +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
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
Jaakko Lipsanen
221cbcbbc4 Fix badge links in README 2017-03-23 14:52:54 +02: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
92506f50e6
doc: Link to the latest documentation 2017-01-30 10:13:31 +03:00
Ni2c2k
535aa56345 doc: Fix links for examples and help in README (#266) 2017-01-25 21:48:38 +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
ef3574ee88 doc: Improve project documentation 2017-01-20 09:13:18 +03:00
GochoMugo
a9d6e93622
[telegram] Return error on trying to use Polling, WebHook together
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.
2017-01-11 17:06:04 +03:00
GochoMugo
0c18cda922
[docs] Fix undocumented return value for TelegramBot#setWebHook() 2017-01-11 16:20:07 +03:00
GochoMugo
0d20565bd5
[telegram] Add constructor option, 'filepath'
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!
2017-01-11 11:06:41 +03:00
GochoMugo
97c8130d93
[webhook,polling] Improve starting, stopping of webhook, polling
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())
2017-01-09 15:57:34 +03:00
GochoMugo
4735518116
[docs] Mention auto-deletion of webhook during polling 2017-01-09 15:56:28 +03:00
GochoMugo
31a2376a1f
[webhook] Allow passing options to HTTPS server
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
2017-01-07 17:58:01 +03:00
Gocho Mugo
215e0dc23b Add deleteWebHook, getWebHookInfo (#246) 2017-01-06 21:48:31 +03:00
Gocho Mugo
bc7549599e Ensure consistency of methods signatures (#245)
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
2017-01-06 21:03:10 +03:00
GochoMugo
eba70cd3d7
[telegram] Expose TelegramBot#processUpdate()
Feature:

  We are exposing TelegramBot#processUpdate() to allow instances
  to be used, with mechanisms of fetching updates, other than
  those provided by the library.

References:

  * Example use case: https://github.com/GochoMugo/tgfancy/pull/7
2017-01-06 14:44:42 +03:00
GochoMugo
84329d05b4
[lint] Fix error reported by linter 2017-01-02 14:36:39 +03:00
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