Commit Graph

45 Commits (a770d6d95118216c7421fc01bd1a2f181564b9e9)

Author SHA1 Message Date
demiangetman 8001defa0c Add custom file name support for media 5 years ago
Arseny Mitin 83aacd12ee refactor: avoid using fmt.Sprintf for performance 5 years ago
Viktor Oreshkin 273a40e72a Send thumbnails (but not in albums) 6 years ago
Anton Kucherov 538b671e6a fix #173 add custom Telegram api url 6 years ago
Viktor Oreshkin 629fe58962 Add File creation from io.Reader (fix #137)
Refactor sendFiles to accept Files
6 years ago
sigurniv 5f938b2a7a add option to pass custom http.Client to tb.NewBot() in case of proxying and other needs 6 years ago
Jonas Bögle f2812ea814
simplified unnecessary if
You can remove this if and just directly return err since it's nil if there is no error
7 years ago
Pavel Makarenko 1175eafe1c Fixed for in loop 7 years ago
Ian Byrd 4f400f035e
Raw() method introduced. KeyboardButton -> ReplyButton. 7 years ago
Ian Byrd 83eb527fe5
Albums added, this commit resolves #103. 7 years ago
Ian Byrd 43be06e850
NewBot, Settings, Poller, LongPoller - new bot creation API. 7 years ago
Ian Byrd 2f62e39c40
Sending photos by URL. 7 years ago
Ian Byrd 7316e92265
Viva la File, my boys, viva la File! 7 years ago
Ian Byrd dbc2cd7f6d
Massive refactoring and file structure changes.
- Callback structs has been moved to callbacks.go
- User / Chat and its methods -> chat.go
- Concept of Editable and Message Signature introduced
- No more types.go, it's been refactored into media.go + friends
7 years ago
Ian Byrd e1f4f1b228
Thumbnail -> Photo, new types supported: Voice, VideoNote. 7 years ago
Ian Byrd ef59af6db7
Introducing Sendable interface (see #93.)
This commit refactors lots of duplicated code from bot.go, so
instead of having N redundant SendX methods, now it's the
responsibility of all Sendable objects to implement Send(..)
instead. Impl in types_send.go, 150 LOC only!
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
Ian Byrd fedfe0d5f9 Switching to int64 update queries, resolves #16 hopefully. 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
Steven Berlanga 72e84f5ab5 Adding support for inline keyboard buttons 8 years ago
Maxim Lebedev 896984e6ce Add param for sends the message silently
Remove duplicate lines in structures, add global parameter, add tips for godoc
8 years ago
Ilya Kowalewski 651cd22f62 Tiny code changes 9 years ago
RedDec 5f730d77ec Close connection after usage. 9 years ago
Ilya Kowalewski 6e16b55de1 Getting rid of excessive error types, switching to fmt.Errorf 9 years ago
llya Kowalewski 1601444837 Merge pull request #14 from ejamesc/master
Change API to return error on 500 http status.
9 years ago
Cedric Chin f7c3d4f9d2 Change API to return error on 500 http status.
- The Telegram API does not return well-formed JSON when there is an 
Internal Server Error. This results in incomprehensible errors.
9 years ago
Ronmi Ren ab11be604a Support new API: markdown message. 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
Ronmi Ren e89b28808b Support custom keyboard 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 5da873e39b Fix for even more lint warnings 9 years ago
Ilya Kowalewski fb0e91451e Significant API change, send options added 9 years ago
Ilya Kowalewski 8c49aeb84c A little readability fix 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 d2435c4688 Message forwarding 9 years ago
Ilya Kowalewski 7da336849b A little bit refactoring on API calls 9 years ago
Ilya Kowalewski 745b4bc76f Sending messages: basic functionality 9 years ago
Ilya Kowalewski 25b2575f10 Message handling: Listen(), AddListener(), Listener 9 years ago