Skip to content

Commit

Permalink
Allow supplying custom types when answering an inline query
Browse files Browse the repository at this point in the history
  • Loading branch information
er-azh authored and Lonami committed Jan 19, 2025
1 parent 3d0b640 commit be92e5e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/grammers-client/src/types/inline/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ impl InlineQuery {

/// Answer the inline query.
// TODO: add example
pub fn answer(&self, results: impl IntoIterator<Item = InlineResult>) -> Answer {
pub fn answer<T>(&self, results: impl IntoIterator<Item = T>) -> Answer
where
T: Into<tl::enums::InputBotInlineResult>,
{
Answer {
request: tl::functions::messages::SetInlineBotResults {
gallery: false,
Expand Down

0 comments on commit be92e5e

Please sign in to comment.