Commit Graph

822 Commits (v3)
 

Author SHA1 Message Date
Ian Byrd e5d60e6913
Replace IQR*.MarshalJSON with InlineQueryResultBase
This commit gets rid of multiple redundant copies of MarhsalJSON()
method present for all existing IQR. It does so by introducing a
new struct called InlineQueryResultBase, which takes care of new
Type (for JSON) and existing duplicated ID field.

InlineQueryResults is a new helper wrapper for []IQR slices. It
implements MarshalJSON, which makes sure IQR.ID and IQR.Type are
set properly (by computing a hash and infering IQR type).
7 years ago
Vlad Lukyanov d2067e919f changed InlineKeyboardMarkup to SendOptions where it needed 7 years ago
irgendwer / Jonas 12099b9b19 support for forwarded messages from channels
This would fix the problem that forwarded messages from channels don't get detected as forwarded and allows you to get the chat id of the channel the message was originally posted to.
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
7 years ago
Vlad Lukyanov ae8106fc82 Merge pull request #1 from tucnak/master
Merge with upstream
8 years ago
Ian Byrd 196512b59e
Keeping PR up-to-date with recent master changes. 8 years ago
Ian Byrd 7c002850b1
Typo infereIQR -> inferIQR. 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 276daa0732
README.md bikeshedding. 8 years ago
Ian Byrd acbbb524dc
Documentation for newly introduced methods. 8 years ago
Ian Byrd a6c1dce4e0
Replace IQR*.MarshalJSON with InlineQueryResultBase, fixes #75.
This commit gets rid of multiple redundant copies of MarhsalJSON()
method present for all existing IQR. It does so by introducing a
new struct called InlineQueryResultBase, which takes care of new
Type (for JSON) and existing duplicated ID field.

InlineQueryResults is a new helper wrapper for []IQR slices. It
implements MarshalJSON, which makes sure IQR.ID and IQR.Type are
set properly (by computing a hash and infering IQR type).
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
Ian Byrd 3a6f49efc1
Audio gets extended with optional fields, closes #11. 8 years ago
Ian Byrd a669eb6140 Merge pull request #72 from ahmdrz/master
URL in CallbackResponse Type added
8 years ago
Ahmadreza Zibaei 050aa8e2cc Merge branch 'master' into master 8 years ago
Ahmadreza Zibaei 4bc115ce26 URL in CallbackResponse Type added 8 years ago
Ian Byrd 4656d9d892 Merge pull request #69 from ahmdrz/master
Added a whole bunch of chat methods.
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
Ahmadreza Zibaei 30d20b61f4 Caption added in Message struct 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
Juan Julián Merelo Guervós 41796c460e README.md improved from newcomers' perspective (#65) 8 years ago
Ian Byrd 87d59cb737 Merge pull request #60 from neighborhood999/location-field
Sequence Location field moved around
8 years ago
Peng-Jie 1e02352d3f Sequence Location field 8 years ago
Ian Byrd 6217b8a41b Merge pull request #59 from neighborhood999/fix-readme
Add missing `log` package
8 years ago
Peng-Jie d8ceddd66c Add missing `log` package 8 years ago
Ian Byrd 43fb1c544e Merge pull request #55 from sschepens/master
Add AnswerCallbackQuery
8 years ago
Sebastian Schepens 587ba1a4dc
add AnswerCallbackQuery 8 years ago
Ian Byrd a663d42cbc Merge pull request #54 from vlad-lukyanov/message-entity
Add MessageEntity support
8 years ago
Vlad Lukyanov 407a3e8d65 Merge branch 'master' into message-entity 8 years ago
Vlad Lukyanov 15e5df6636 Add MessageEntity support 8 years ago
Ian Byrd 7d22fdc72c Merge pull request #48 from vlad-lukyanov/master
Added Venue message support, partially implements #44
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
Ian Byrd 9b14951f8f Merge pull request #53 from zoni/inline-bot-example-fix
Fix inline bot example in README, resolves #52
8 years ago
Nick Groenen 852bebcd6f Fix inline bot example in README
Closes #52
8 years ago
Ian Byrd 1a30b0193a Merge pull request #50 from zoni/inline_queries
Improve support for inline queries, closes #32
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
Ian Byrd 12182e36dc
Minor documentation fixes, resolves #49 8 years ago
Ian Byrd 15ae62790e Merge pull request #47 from zabawaba99/inline-keyboard-button
Adding support for inline keyboard buttons
8 years ago