Commit Graph

19 Commits

Author SHA1 Message Date
Nash-Well
32b47a49ef
api: implement 6.6, 6.7 features (#655)
* api: implement 6.6-6.7 features
2024-02-27 14:12:09 +02:00
Reza Alipour
9c4cc7713e
inline: add game result support (#648)
* feat: add game to the list of inline query results

* fix: documentation and naming
2024-02-25 13:18:53 +02:00
Demian
c46e31dff6 options: remove InlineKeyboardMarkup type 2022-01-21 23:02:19 +02:00
Demian
19e28229ea telebot: remove pointer to the InputMessageContent inside ResultBase 2021-07-25 15:42:40 +03:00
Demian
061d8ab4ba inline: enable ability to use default parse mode 2021-07-07 16:00:51 +03:00
Demian
5a1a187e87 telebot: clarify and fix all naming issues 2020-06-19 23:36:43 +03:00
Demian
a858ff7a15 inline: add thumb_mime_type field to gif and mpeg4 results 2020-06-07 21:56:54 +03:00
demiangetman
3beea1c055 Update inline query result types 2020-04-16 10:09:25 +03:00
demiangetman
05a04f8830 Add setters for ResultBase 2019-09-30 18:42:02 +03:00
Ian Byrd
bda24d8650 Possibly breaking some builds, but inline message IDs won't work
otherwise.
2017-12-27 00:39:15 +02:00
Ian Byrd
77d1ba9eb1 Inline mode fix. 2017-11-29 22:31:07 +02:00
Ian Byrd
5ba925eaba
Completing inline API, closing #104. 2017-11-26 10:17:52 +02:00
Ian Byrd
612ab345bd Improved inline API. TODO proper result types. 2017-11-24 16:11:07 +02:00
Ian Byrd
acbbb524dc
Documentation for newly introduced methods. 2016-11-10 20:05:52 +02:00
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).
2016-11-10 19:52:45 +02:00
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.
2016-11-10 01:28:00 +02:00
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.
2016-06-26 16:33:16 +02:00
Ian Byrd
ce6937b17c
i'm dumb... 2016-01-22 15:03:58 +02:00
Ian Byrd
061a651188
This commit adds an inline mode implementation and resolves #28.
Only article results supported so far.
2016-01-22 13:38:45 +02:00