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

244 Commits

Author SHA1 Message Date
GochoMugo
394f363465 Implement 'leaveChat'
Notes:

  Merge branch 'feature/leaveChat' of
  https://github.com/GochoMugo/node-telegram-bot-api into pr/186

References:

  * PR #186: https://github.com/yagop/node-telegram-bot-api/pull/186
2016-10-10 14:45:15 +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
Mikhail Burshteyn
ec354925d6 JSON-stringify reply_markup when it is sent in qs 2016-10-10 13:25:38 +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
f9aa16f322 Additional edited_message events
- edited_message_text
- edited_message_caption
2016-09-15 18:46:09 +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
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
ed6cb09474 Bind this.processUpdate to TelegramBot context 2016-06-07 00:44:21 +02:00
Yago
cd86c93438 Fixed processUpdate 2016-06-07 00:16:45 +02:00
knock-in
c9556e3c98 Generate Docs from /src directly 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
TJ Horner
de6f0c8a14 Update for Telegram Bots 2.0
https://telegram.org/blog/bots-2-0
2016-06-06 23:24:00 +02:00
Jérémy Gotteland
3eaf377024 Added new methods sendVenue and sendContact 2016-05-13 16:16:23 +02:00
Iiro Jäppinen
9d25ceb3c4 add the sendVenue method
This method was added to the Telegram Bot API on April 9, 2016 in the Bot API 2.0 update. See https://core.telegram.org/bots/api#sendvenue for more info.
2016-05-06 21:03:04 +03:00
evolun
42a2d24273 Eslint correction 2016-05-06 12:28:03 +02:00
evolun
763f717a04 Added the ability to specify the filename and the content type by sendDocument 2016-05-03 13:36:46 +02:00
Yago
b46378d25b jsdoc2md class constructor #90 2016-03-20 20:03:09 +01:00
AVVS
83e42201ee refactor: rewrite to babel, es6 & eslint 2016-03-17 13:02:25 +03:00
Yago
85c3789e83 Merge branch 'master' of github.com:yagop/node-telegram-bot-api 2016-03-13 13:44:15 +01:00
Yago
c5f97ce524 Bind getFile response in getFileLink 2016-03-13 11:25:36 +01:00
Rafael Kr
d1e4fd11ee added module querystring
Module querystring wasn't included before.
2016-03-01 10:51:39 +01:00
Rafael Kr
54130e6df9 Use of safer function qs.unescape
I didn't know about that function, thank you. I've updated the code.
2016-03-01 10:47:09 +01:00
Rafael Kr
39c0ce66b9 URL-decoded filename when sending file from stream
This sends the file as "My File.ext" instead of "My%20File.ext".
2016-03-01 09:26:10 +01:00
Yago
41be1afb9c Updated onReplyToMessage doc 2016-01-30 18:19:03 +01:00
Yago
928cbbe95b options.polling.timeout=10 2016-01-30 18:14:07 +01:00
Yago
17cb062c96 onReplyToMessage 2016-01-30 18:02:09 +01:00
Yago
186d1e3a5c Catch errors while parsing JSON 2016-01-11 18:28:05 +01:00
Yago
874feaf833 Update doc 2016-01-04 23:34:27 +01:00
crisbal
bfc51a9ab7 Added method to answer inline query 2016-01-04 20:25:49 +01:00
crisbal
b9bf9775cc Added support for listening to inline requests 2016-01-04 20:13:10 +01:00
Yago
bfb047312b Update docs 2016-01-03 17:20:34 +01:00
Yago
f2153a7754 Throw error if Unsupported Buffer file type. Test 'should send a video from a Buffer' 2016-01-03 17:03:04 +01:00
Yago
b46ea1d9a6 util.isBuffer(data) is deprecated https://nodejs.org/api/util.html#util_util_isbuffer_object 2016-01-03 12:45:29 +01:00
Vítor Augusto da Silva Vasconcellos
9e2a8321e9 Add Buffer support to _formatSendData 2016-01-03 00:19:06 -02:00
Yago
6a6111360b JSON stringify reply_markup if not string 2015-11-19 13:54:20 +01:00
Yago
430adbba7f Updated Readme 2015-10-10 18:09:25 +02:00
Yago
cfd32f47bf Method bot.onText 2015-10-10 17:54:11 +02:00
Yago
bb6a0bb3ff setWebHook allow sending certificate as param. WebHook Documentation 2015-09-27 13:05:46 +02:00
Yago
6a679b5644 jshint 2015-09-27 11:18:25 +02:00
Yago
48045b98ff Changed query to form data on sendMessage, forwardMessage, sendChatAction, getUserProfilePhotos, sendLocation and getFile. Closes #19 2015-09-27 11:07:26 +02:00
Yago
0735cd7ce6 Added @private to _buildURL 2015-09-26 22:51:00 +02:00