Skip to content

Decide what kind of API we want for inline query result #182

@knsd

Description

@knsd

We have both public fields for all structs and a builder for InlineQueryResultArticle right now. I think it be much better to use only builder because telegram can add new fields to types and it would break user code eventually.

  • Maybe InlineQueryResult* builders should take self by value, like InlineKeyboardButton, I'm not sure.
  • Maybe we should change CanAnswerInlineQuery and AnswerInlineQuery API, something like this:
query.answer_inline()
    .add(InlineQueryResultMpeg4Gif::new("unique-id1", "http://example.com/mpeg.mp4"))
    .add(InlineQueryResultMpeg4Gif::new("unique-id2", "http://example.com/mpeg2.mp4"))

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions