2
0
mirror of https://github.com/yagop/node-telegram-bot-api synced 2025-08-28 21:07:39 +00:00

399 Commits

Author SHA1 Message Date
GochoMugo
74fb4ab181
Closes #144: Add TelegramBot#getChat() method 2016-10-10 13:42:29 +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
GochoMugo
ab3464c679
Closes #133: JSON-stringify reply_markup in qs 2016-10-10 13:26:58 +03:00
GochoMugo
82ee13e953 Add accompanying test for PR #133
References:

  * Test retrieved from PR #182
2016-10-10 13:25:38 +03:00
Mikhail Burshteyn
ec354925d6 JSON-stringify reply_markup when it is sent in qs 2016-10-10 13:25:38 +03:00
GochoMugo
618555101f
Fix test for TelegramBot#sendVenue() 2016-10-10 12:57:10 +03:00
GochoMugo
997b69691e
Closes #121: Add TelegramBot#sendVenue() method 2016-10-10 12:35:06 +03:00
GochoMugo
d9b2170b55
Add TelegramBot#sendVenue()
References:

  * Author: @iiroj (https://github.com/iiroj)
  * PR URL: https://github.com/yagop/node-telegram-bot-api/pull/121
2016-10-10 12:30:41 +03:00
GochoMugo
be49b69219
Fix handling fs.readStream.path if it's a buffer
Bug:

  The (private) method TelegramBot#_formatSendData(), used by public
  methods, such as TelegramBot#sendPhoto(), throws an error
  if the stream passed (fs.readStream) has the property 'path',
  being an instance of Buffer.

  For example,

    const stream = fs.createReadStream(Buffer.from('cat.png'));
    bot.sendPhoto(chatId, stream);

  Would throw an error, like

    TypeError: Path must be a string. Received <Buffer 60 62 63 64>

  This is because of this line:

    src/telegram.js:297
      fileName = URL.parse(path.basename(data.path)).pathname;

  path.basename() can not handle buffer (non-string) paths. From the
  docs, "A TypeError is thrown if path is not a string...".

Fix:

  Ensure path.basename() receives a string, by converting the buffer
  to string.

References:

  * fs.ReadStream: https://nodejs.org/docs/latest/api/fs.html#fs_class_fs_readstream
2016-10-07 19:52: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
f9aa16f322 Additional edited_message events
- edited_message_text
- edited_message_caption
2016-09-15 18:46:09 +02:00
Chris54721
bf3302a957 Update README.md 2016-09-15 18:24:01 +02:00
Chris54721
7518c44997 Document edited_message event 2016-09-15 18:23:16 +02:00
Chris54721
4746011dd1 Add edited_message support 2016-09-15 17:58:40 +02:00
Ola Flisbäck
10af3e4f55 Fixed a couple of debug prints 2016-07-13 20:01:21 +02:00
Yago
e0e5e9a7b0 Remove coveralls and upgrade istanbul to alpha 2016-07-08 00:26:02 +02:00
Yago
fbc38ea50b Pass coverage on test 2016-07-08 00:25:17 +02:00
Yago
e4945de64e Test codecov.io 2016-07-08 00:07:30 +02:00
Yago
743cc0ff9d Update readme 2016-07-07 23:51:13 +02:00
Yago
d1700788a1 Simplify scripts a bit 2016-07-07 23:50:01 +02:00
Yago
12200eea4c prepublish:test script 2016-07-07 23:44:45 +02:00
Yago
94540c39bf Merge branch 'conorfennell-master' 2016-07-07 23:39:27 +02:00
Alex Godko
397c87a956 Update README.md
Added a word about "callback_query" update
2016-06-30 12:18:27 +03: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
335a5045d8 editMessageCaption URL 2016-06-07 09:50:11 +02:00
Yago
576b78f09e 0.23.3 2016-06-07 00:45:06 +02:00
Yago
ed6cb09474 Bind this.processUpdate to TelegramBot context 2016-06-07 00:44:21 +02:00
Yago
f0c2d19ff0 0.23.2 2016-06-07 00:28:54 +02:00
Yago
b28f30a2d2 Merge pull request #117 from w-site/bug/#116-get-409-error
Fix: If use switch between webHook or Polling you get an 409 (http://telegram.wiki/bots:boterrorcode) telegram error. #116
2016-06-07 00:28:05 +02:00
Yago
dbb3e16764 0.23.1 2016-06-07 00:18:27 +02:00
Yago
cd86c93438 Fixed processUpdate 2016-06-07 00:16:45 +02:00
Yago
5719e62d88 Upgrade babel-eslint and eslint. Closes #130 2016-06-06 23:51:11 +02:00
Yago
164fb16f44 0.23.0 2016-06-06 23:34:14 +02:00
Yago
2dfb2d801a Updated README 2016-06-06 23:34:03 +02:00
Yago
2266a39862 Merge branch 'evolun-sendDocument-fileoptions' 2016-06-06 23:24:39 +02:00
knock-in
c9556e3c98 Generate Docs from /src directly 2016-06-06 23:24:00 +02:00
Yago
8bacecbbf3 0.22.1 2016-06-06 23:24:00 +02:00
Yago
5650ea58aa Updated readme 2016-06-06 23:24:00 +02:00
Yago
c728baee5d 0.22.0 2016-06-06 23:24:00 +02:00
Devin Doolin
2c606f6b48 Removes unnecessary done() calls in tests 2016-06-06 23:24:00 +02:00
Devin Doolin
3947683ad1 Further updates for Bots 2.0
- Adds support for callback_query-type messages
- Adds a showAlert option to answerCallbackQuery to more-closely align with the real bot API
- Adds tests for message editing functionality
- Adds a global test timeout of 10s and adds done() calls to all tests for assurance
2016-06-06 23:24:00 +02:00
icdevin
684691d779 Fixes stream end event never being called
For writable streams, like `http.ClientRequest`, there is no `end` event, only `finish`. Thus, `req.end` was never called and never sending a response.

This resulted in a nasty bug for WebHook users that basically rendered the library useless because if Telegram doesn't receive a response from the bot server, it will continue to queue and send requests until it does, or until 24 hours have passed.
2016-06-06 23:24:00 +02:00
TJ Horner
de6f0c8a14 Update for Telegram Bots 2.0
https://telegram.org/blog/bots-2-0
2016-06-06 23:24:00 +02:00
Yago
9293fd4e67 Merge branch 'knock-in-master' 2016-06-06 23:20:34 +02:00
knock-in
b117a5b5ae Generate Docs from /src directly 2016-06-06 23:20:13 +02:00
Yago
1b2afa71fd 0.22.1 2016-06-06 23:11:24 +02:00