Commit Graph

251 Commits (adf6dc85a275bee3e6df145e50e78ec4e1cec835)

Author SHA1 Message Date
Ian Byrd b19ffa1b45
Experimental handlers API added. 7 years ago
Ian Byrd a1a2c92dad
This commit refactors error handling throughout the library.
Bot.Errors channel has been introduced. It can be used to
debug Telebot. It also fixes sendFile() which used to upload
with its own custom http.Client instead of http.DefaultClient.
7 years ago
Ian Byrd 95901bcfc3
Minor time conversion change within private API. 7 years ago
Ian Byrd 14151d8a26 Revert "Bots now support custom HTTP clients (*http.Client)."
This reverts commit c8e1ac037f.
7 years ago
Ian Byrd c8e1ac037f
Bots now support custom HTTP clients (*http.Client). 7 years ago
Vlad Lukyanov d2067e919f changed InlineKeyboardMarkup to SendOptions where it needed 7 years ago
Vlad Lukyanov 15a4d8f413 Add meaasge edit feature
This commit may break some bots because changes in return of SendMessage
and SendPhoto functions
8 years ago
Ian Byrd 6360f1f7d9
Refactoring, poor BC, closes #44 and probably resolves #41.
- EntityType and ChatType enums introduced.
- Documentation fixes, struct refactoring.
- Poor BC, poor BC...
8 years ago
Ian Byrd d8b2ca1983
Fixes lots of complete bollocks that got into the codebase.
- Malformed JSON field tags, OMG fixed
- Making linters happy
- Foursquare_id -> FoursquareID, fuck BC
8 years ago
Ian Byrd fedfe0d5f9 Switching to int64 update queries, resolves #16 hopefully. 8 years ago
Ian Byrd e0d2195801
Partial refactoring of internals.
- GetChat and LeaveChat handle error descriptions
- Documentation fix for Result type
- Wrapping structs for IQRs go inside marshal funcs.
8 years ago
ahmdrz 622415d138 LeaveChat boolean result removed 8 years ago
aiden e5cf14aeea Method name and structs specified. 8 years ago
aiden 5d1a071046 Some changes for godoc 8 years ago
aiden 2558381794 GetUserProfilePhotos added 8 years ago
aiden fc4d712ce0 getChatMember added 8 years ago
aiden 229001da4a getChatMemberCount added 8 years ago
aiden d18a89193d getChatAdministrators added 8 years ago
aiden 936198888e getChat method added 8 years ago
aiden 08ec8d756a leaveChat method added 8 years ago
Illarionov Oleg ce7114afe6 GetFile and GetFileDirectURL method to fetch url of file received from user (#63)
Bot.GetFile and Bot.GetFileDirectURL methods introduced.

* correct comment

* improve docs
8 years ago
Sebastian Schepens 587ba1a4dc
add AnswerCallbackQuery 8 years ago
Vlad Lukyanov 977e1d90f3 gofmt 8 years ago
Vlad Lukyanov 6e08411d89 fix. rewrite url.params to map 8 years ago
Vlad Lukyanov 4b79f3ff1b merge with upstream 8 years ago
Nick Groenen 46992b037b Improve support for inline queries
These changes make it possible to set custom options when responding to
inline queries, as described on
https://core.telegram.org/bots/api#answerinlinequery.

It also includes all the (non-cached) inline result types as described
at https://core.telegram.org/bots/api#inlinequeryresult.

Some remarks:
* The internals of sendCommand have changed. It now expects a
  JSON-serializable object. Instead of doing GET requests with
  URL-encoded query parameters it now POSTS JSON directly.
* Because of the above, sendFile() has changed as well. It now expects a
* `map[string]string` which it will internally convert to URL encoded
  form values.
* Respond has been deprecated in favor of the new AnswerInlineQuery
  function. It is only kept for backward compatibility.
* A dependency on https://github.com/mitchellh/hashstructure has been
  introduced in order to generate automatic IDs for inline results.
8 years ago
Vlad Lukyanov 0a92c6c68b Added Venue message support by calling SendVenue(recipient Recipient, venue *Venue, options *SendOptions) 8 years ago
Steven Berlanga 72e84f5ab5 Adding support for inline keyboard buttons 8 years ago
Ian Byrd 061a651188
This commit adds an inline mode implementation and resolves #28.
Only article results supported so far.
9 years ago
Ronmi Ren 143777fbe0 Channel support and change chat_id size
* Chage signature of "Destination()", because we need send username in "chat_id" when
  sending message to channel.
* By telegram API document, chat id is "not exceeding 1e13 by absolute value" which
  needs int64 to store it.
9 years ago
Ilya Kowalewski 651cd22f62 Tiny code changes 9 years ago
Ilya Kowalewski 72ce8fae88 Fixing #21 issue, introducing Recipient interface 9 years ago
Ilya Kowalewski 6e16b55de1 Getting rid of excessive error types, switching to fmt.Errorf 9 years ago
Ilya Kowalewski 0192b0946f go fmt 9 years ago
Ronmi Ren 77314762f1 This commit ensures we will not receive same message multiple times when
in bad network-speed environment. And message will be put to channel in
same order we receive from API call.

 * Bot.Listen(): Use only 1 goroutine. Do really long polling, not
   repeatly do short polling.
 * API.go: getUpdates(): as doing long polling, channel is not required.
9 years ago
Luke Plaster 79c044e8ec Easy older go compat
`go range` without loop values is new to 1.4. some of us are stuck with older go (wheezy backport is 1.3.3)
merge if you wish - this was a quick one
9 years ago
Ilya Kowalewski 40c91ee0b4 Added some API and tests 9 years ago
Ilya Kowalewski eaf9b17a54 Achieving final satisfaction with golint 9 years ago
Ilya Kowalewski 8dab2461ef Chat actions implemented 9 years ago
Ilya Kowalewski 5da873e39b Fix for even more lint warnings 9 years ago
Ilya Kowalewski fb0e91451e Significant API change, send options added 9 years ago
Ilya Kowalewski e041242bb2 Fixed a bunch of lint issues 9 years ago
Ilya Kowalewski 104a45344a Sending docs, stickers, videos and locations 9 years ago
Ilya Kowalewski 51d01479b6 Sending audio 9 years ago
Ilya Kowalewski 6a4863ece8 Sending photos, API improvements 9 years ago
Ilya Kowalewski 418934be9c Fix for a stupid arch solution 9 years ago
Ilya Kowalewski d2435c4688 Message forwarding 9 years ago
Ilya Kowalewski fa51650dad A little more documentation, code cleanup 9 years ago
Ilya Kowalewski dd4efff2f3 Listeners - gotta go, switching to range-based subscription 9 years ago
Ilya Kowalewski 745b4bc76f Sending messages: basic functionality 9 years ago
Ilya Kowalewski 25b2575f10 Message handling: Listen(), AddListener(), Listener 9 years ago