Commit Graph

150 Commits (00ae0202053389c6ad3932d730e3f9fcdcace649)

Author SHA1 Message Date
gropher d4b2e3c213 Added HandleUpdate method for serverless deploy 2019-09-18 03:34:37 +03:00
unstppbl 72a0e2d808 closes #246 2019-07-03 17:59:56 -07:00
zhuharev 8d345836d6 Allow to change API endpoint for bot 2019-05-24 13:14:48 +03:00
Syfaro db88019230 Add support for Polls and other API 4.2 updates. 2019-04-14 14:46:45 -05:00
bcmk 016d6acdf3 Passing error code 2019-03-01 20:57:23 +04:00
Syfaro fa40708257 Add SendMediaGroup method. 2018-12-25 15:44:01 -06:00
bcmk ab8d5487da Closing update body 2018-12-10 18:08:47 +04:00
Denis Orlikhin cb3a14a3b5 fix error handling for uploadFile calls 2018-12-08 21:22:24 +03:00
Syfaro afda722fc3 Remove unused error returned by GetUpdatesChan. 2018-10-09 00:47:19 -05:00
Syfaro 4d758f17d4 Add some missing fields, generalize configs, remove unneeded methods. 2018-10-08 23:05:24 -05:00
Syfaro 1f859674f7 Consistency of variable names. 2018-10-08 18:37:18 -05:00
Syfaro 03815bf5bd Unify params and values, introduce helpers to deal with fields. 2018-10-08 18:21:29 -05:00
Syfaro 9d2d117c0e Merge branch 'master' into develop 2018-10-08 14:00:38 -05:00
Syfaro b60db1d2e1 Revert "Remove a broken check for GetUpdatesChan."
This was not properly tested and results in the bot looping.

This reverts commit 5f38203a15.
2018-10-08 13:58:50 -05:00
Syfaro 23ed97b145 Merge master into develop. 2018-10-08 03:13:50 -05:00
Syfaro 444e8e261f
Merge pull request #154 from Arman92/patch-1
added StopReceivingUpdates to stop updates routine
2018-10-08 02:08:42 -05:00
Syfaro 5f38203a15 Remove a broken check for GetUpdatesChan. 2018-10-08 01:58:33 -05:00
Yan Mihailov a1b3e41878 added custom logger and SetLogger func 2018-08-07 00:15:37 +03:00
Kirill Zhuharev 0e0af0c480 fix #159 2018-03-28 16:10:29 +03:00
Syfaro 1aef8c8c45 Remove new methods that returned APIResponse. 2018-03-26 12:30:16 -05:00
Syfaro 6a6de7e674 Merge master into develop. 2018-03-26 12:22:16 -05:00
Syfaro 38681a48d1
Merge pull request #153 from behrang/master
Add response parameters to error messages
2018-03-26 11:19:46 -05:00
Arman 6205cea402
added StopReceivingUpdates to stop updates routine
There was no way to stop the bot from fetching updates, Added StopReceivingUpdates() so we can stop updates when we are done with bot.
2018-03-10 01:52:21 +03:30
Oleksandr Savchuk a36af7a672 add deleteChatPhoto method 2018-03-05 17:12:56 +02:00
Oleksandr Savchuk 57be988011 add setChatPhoto method 2018-03-05 17:05:32 +02:00
Behrang Noruzi Niya 04f51c3251 Add response parameters to error messages 2018-03-04 14:40:17 +03:30
Oleksandr Savchuk 6e69f99d11 add setChatTitle and setChatDescription methods 2018-03-03 20:20:03 +02:00
Syfaro 9653a4aad4 Handle some ignored errors. 2017-12-29 21:55:58 -06:00
Syfaro 0a654beca4 Move debug output into a single location. 2017-12-29 01:38:45 -06:00
Syfaro 8b7b15afc2 Update README.md. 2017-12-29 01:26:54 -06:00
Syfaro ac87082c55 Remove remaining methods that returned an APIResponse. 2017-12-29 01:08:01 -06:00
Syfaro 271adc4d97 Bot API 3.2, introduce Request to replace APIResponse methods. 2017-12-29 00:44:47 -06:00
zhuharev 2022d04b94
fix tests, linter errors and fmt 2017-11-09 21:51:50 +03:00
Zaur Abdulgalimov bd1aa7e6ef User:IsBot & RestrictChatMember:UntilDate 2017-11-09 18:41:22 +03:00
zhuharev e6191af679
add doc message 2017-11-07 05:17:06 +03:00
zhuharev 6b5102fab5
fix debug printing 2017-10-31 02:34:34 +03:00
zhuharev 3cfc52c9c2
print full response when debug 2017-10-30 00:03:48 +03:00
Lord-Protector b24a37443a Add PinChatMessage and UnpinChatMessage methods 2017-08-05 12:29:06 +03:00
Mikhail Markov def5c3f6c9 Add exportChatInviteLink method 2017-07-17 20:48:51 +03:00
MrYadro 4e059b5fbf
implement new methods for ChatMember 2017-07-01 11:34:09 +07:00
Mohamad Jahani 12f3478326 feat(bot): implement unban chat member for channels 2017-06-18 21:34:17 +04:30
Mohamad Jahani bdb0f1f4c5 feat(bot): implement deleteMessage method 2017-06-08 14:02:05 +04:30
MrYadro 41814af2a0
Fixes and comments 2017-06-03 13:59:40 +07:00
MrYadro 42d132b90a
Payments API 2017-06-03 03:18:42 +07:00
Syfaro 9f98d19464 Merge pull request #72 from uamana/FIX_error_handling
Fix returning APIResponse from SetWebHook
2017-04-19 15:44:18 -05:00
Syfaro f5c6a478a0 Allow specifying a custom buffer size for the updates channel 2017-01-27 11:40:09 -06:00
Syfaro 3866c68e79 Add check for status code on request, closes #60 2017-01-27 11:35:23 -06:00
Syfaro 3293f3ad84 Change visibility of UpdatesChannel, closes #76 2017-01-26 11:43:37 -06:00
Sergey Juriev 5d28cf05d0 Fix returning APIResponse from SetWebHook 2017-01-18 12:05:01 +03:00
Dmitry V 833e457376 Added max connections configuration option to SetWebHook 2017-01-17 17:18:26 +03:00
Syfaro 80bdd621f7 Return APIResponse even with error in MakeRequest, closes #66. 2016-12-31 13:48:48 -06:00
lupoDharkael c034de512a Added Clear() to examples and code simplification 2016-12-16 02:07:54 +01:00
lupoDharkael 66446d51ff Added updatesChannel type with Clear() method 2016-12-15 22:51:58 +01:00
Syfaro 0a57807db7 Additional changes for Telegram API updates. 2016-11-24 23:50:35 -06:00
Syfaro f3a33ae6f1 Add support for games, among other updates. 2016-10-03 10:47:19 -05:00
Syfaro 4f996f7f27 Add NewInlineQueryResultPhotoWithThumb for #54. 2016-07-26 13:44:48 -05:00
Syfaro 1daed40422 Allow negative Offset values for GetUpdates, closes #51. 2016-06-29 12:37:30 -05:00
Syfaro 217764ba45 Add new chat methods for Bot API 2.1. 2016-05-22 10:16:28 -05:00
Syfaro db12d94016 Add kick and unban methods, update some inline query result responses. 2016-04-12 08:56:05 -05:00
Syfaro 18510df3c9 Add some of the new methods and types. 2016-04-12 08:28:46 -05:00
Syfaro 67ab387694 Fix broken inline queries. 2016-03-30 09:04:15 -05:00
Syfaro 80e30d7c19 Stop returning useless http.Handler from ListenForWebhook. 2016-03-30 09:04:15 -05:00
Syfaro 08d7c01637 Rename all errors to be prefixed with Err. 2016-03-30 09:04:15 -05:00
Syfaro 6c84cd1fbb Replace bad file type error with constant 2016-03-30 09:04:15 -05:00
Syfaro e8dfdeeeb9 Major documentation and code cleanup.
All documention is now less than 80 characters wide. Old methods now
show deprecated warnings. The Values/Params/Method functions are now
private. Types and configs have required and optional comments on
them. Simplified some function logic.
2016-01-03 16:54:24 -06:00
Syfaro 1ae7803be0 Add untested support for Inline Queries. 2016-01-01 00:10:28 -06:00
Gleb Sinyavsky 4037dbed02 Lint issues fixed 2015-11-21 19:43:24 +03:00
Gleb Sinyavsky d638757359 go fmt 2015-11-21 17:39:19 +03:00
Gleb Sinyavsky 5859ba3970 Small updates. Readme updated 2015-11-21 17:31:59 +03:00
Gleb Sinyavsky 2a5cf8652d Updates channel removed from BotAPI 2015-11-21 17:26:28 +03:00
Gleb Sinyavsky af029c366c Bot IsMessageToMe method 2015-11-21 16:33:58 +03:00
Gleb Sinyavsky 399d665b0a Typo fix 2015-11-21 16:28:25 +03:00
Gleb Sinyavsky 6873dde3ab Bot getFileDirectUrl method added 2015-11-21 16:25:59 +03:00
Gleb Sinyavsky c4515aa388 Small fixes 2015-11-21 14:44:26 +03:00
Gleb Sinyavsky 9644984dae removeWebhook method added. 2015-11-21 14:26:39 +03:00
Gleb Sinyavsky 53dd9f6367 Fixes, tests improved 2015-11-21 14:22:08 +03:00
Gleb Sinyavsky da026b435e Totally new, universal API 2015-11-20 17:55:32 +03:00
Gleb Sinyavsky d3f7ac7197 Refactorings 2015-11-20 17:31:01 +03:00
Gleb Sinyavsky 9361631c6d Refactoring 2015-11-20 17:08:53 +03:00
Gleb Sinyavsky d8ba9c84c8 Refactoring 2015-11-20 15:01:05 +03:00
Gleb Sinyavsky 92ce2aad94 Refactoring, drying 2015-11-20 14:50:23 +03:00
Gleb Sinyavsky 4610c561c6 Drying 2015-11-20 14:19:37 +03:00
Gleb Sinyavsky 57a07c0c22 Refactoring and DRYing 2015-11-20 14:06:51 +03:00
Gleb Sinyavsky 13a8bd025c Refactorings 2015-11-20 13:42:26 +03:00
Syfaro e48e6416e7 allow passing a []byte or io.Reader to upload functions, closes #20 2015-09-07 11:20:43 -05:00
Syfaro b0c8029a0f fix wrong capitalization of a function name 2015-07-28 12:18:50 -04:00
Raul Santos 3101266b61 Fixed NewBotAPIWithClient 2015-07-28 18:14:13 +02:00
Raul Santos 2483f04397 Separate NewBotAPI from NewBotAPIwithClient 2015-07-28 13:00:31 +02:00
Raul Santos fc8cb6e039 Client is now a pointer 2015-07-28 11:18:49 +02:00
Raul Santos 8249dd6a93 Few bug fixes 2015-07-27 00:22:10 +02:00
Raul Santos 612584dbd3 Ability to pass a client to the bot
Changed every instance of a DefaultClient to a Client stored in the bot.
2015-07-27 00:16:45 +02:00
Syfaro a17651c8fe fix all golint errors, add info about audio uploads 2015-06-26 01:53:20 -05:00
Syfaro 90c48448d2 more comments on things 2015-06-26 01:19:29 -05:00
Syfaro cea0df2dae fix silly mistakes 2015-06-25 23:45:56 -05:00
Syfaro d789456a8e load self when created 2015-06-25 23:44:14 -05:00
Syfaro 9cf4f13772 change focus from bot to just bindings, code cleanup 2015-06-25 23:26:24 -05:00
Syfaro 3940cb5953 setup functions, plugin enabler, reply markup, example commands 2015-06-25 16:15:28 -05:00
Syfaro 567a37868d help plugin, working on plugin api 2015-06-25 14:20:02 -05:00
Syfaro 059baffbfb working file uploads, starting to clean up code 2015-06-25 11:25:02 -05:00
Syfaro 434756c165 initial commit, some api methods and structs for everything 2015-06-25 00:34:05 -05:00