Commit Graph

4 Commits (407a3e8d651bb12d7881f32ec334b870b764446e)

Author SHA1 Message Date
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 ce6937b17c
i'm dumb... 9 years ago
Ian Byrd 061a651188
This commit adds an inline mode implementation and resolves #28.
Only article results supported so far.
9 years ago