1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
use crate::{
types::{ChosenInlineResult, InlineMessageId, Location, User},
Bot,
};
common! {
struct ChosenInline {
result_id: String,
from: User,
location: Option<Location>,
inline_message_id: Option<InlineMessageId>,
query: String,
}
}
impl ChosenInline {
#[allow(clippy::missing_const_for_fn)]
pub(crate) fn new(bot: Bot, chosen_result: ChosenInlineResult) -> Self {
Self {
bot,
result_id: chosen_result.result_id,
from: chosen_result.from,
location: chosen_result.location,
inline_message_id: chosen_result.inline_message_id,
query: chosen_result.query,
}
}
}