1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use super::{InlineMessageId, Location, User};
use serde::Deserialize;

/// Represents a [`ChosenInlineResult`][docs].
///
/// [docs]: https://core.telegram.org/bots/api#choseninlineresult
#[derive(Debug, PartialEq, Clone, Deserialize)]
#[non_exhaustive]
pub struct ChosenInlineResult {
    /// ID of the chosen result.
    pub result_id: String,
    /// The user who chose the result.
    pub from: User,
    /// The location of the user, if enabled and allowed.
    pub location: Option<Location>,
    /// The ID of the sent message.
    pub inline_message_id: Option<InlineMessageId>,
    /// The query used to obtain the result.
    pub query: String,
}