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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
use teloxide::types::{Message, MessageId};
use super::routes::{
answer_callback_query::*, ban_chat_member::*, copy_message::*, delete_message::*,
edit_message_caption::*, edit_message_reply_markup::*, edit_message_text::*,
forward_message::*, pin_chat_message::*, restrict_chat_member::*, send_animation::*,
send_audio::*, send_chat_action::*, send_contact::*, send_dice::*, send_document::*,
send_invoice::*, send_location::*, send_media_group::*, send_message::*, send_photo::*,
send_poll::*, send_sticker::*, send_venue::*, send_video::*, send_video_note::*, send_voice::*,
set_message_reaction::*, set_my_commands::*, unban_chat_member::*, unpin_all_chat_messages::*,
unpin_chat_message::*,
};
#[derive(Clone, Debug)]
pub struct SentMessageText {
// For better syntax, this is a struct, not a tuple
pub message: Message,
pub bot_request: SendMessageTextBody,
}
#[derive(Clone, Debug)]
pub struct SentMessagePhoto {
pub message: Message,
pub bot_request: SendMessagePhotoBody,
}
#[derive(Clone, Debug)]
pub struct SentMessageVideo {
pub message: Message,
pub bot_request: SendMessageVideoBody,
}
#[derive(Clone, Debug)]
pub struct SentMessageAudio {
pub message: Message,
pub bot_request: SendMessageAudioBody,
}
#[derive(Clone, Debug)]
pub struct SentMessageVoice {
pub message: Message,
pub bot_request: SendMessageVoiceBody,
}
#[derive(Clone, Debug)]
pub struct SentMessageVideoNote {
pub message: Message,
pub bot_request: SendMessageVideoNoteBody,
}
#[derive(Clone, Debug)]
pub struct SentMessageDocument {
pub message: Message,
pub bot_request: SendMessageDocumentBody,
}
#[derive(Clone, Debug)]
pub struct SentMessageAnimation {
pub message: Message,
pub bot_request: SendMessageAnimationBody,
}
#[derive(Clone, Debug)]
pub struct SentMessageLocation {
pub message: Message,
pub bot_request: SendMessageLocationBody,
}
#[derive(Clone, Debug)]
pub struct SentMessageVenue {
pub message: Message,
pub bot_request: SendMessageVenueBody,
}
#[derive(Clone, Debug)]
pub struct SentMessageContact {
pub message: Message,
pub bot_request: SendMessageContactBody,
}
#[derive(Clone, Debug)]
pub struct SentMessageDice {
pub message: Message,
pub bot_request: SendMessageDiceBody,
}
#[derive(Clone, Debug)]
pub struct SentMessagePoll {
pub message: Message,
pub bot_request: SendMessagePollBody,
}
#[derive(Clone, Debug)]
pub struct SentMessageSticker {
pub message: Message,
pub bot_request: SendMessageStickerBody,
}
#[derive(Clone, Debug)]
pub struct SentMediaGroup {
pub messages: Vec<Message>,
pub bot_request: SendMediaGroupBody,
}
#[derive(Clone, Debug)]
pub struct SentMessageInvoice {
pub message: Message,
pub bot_request: SendMessageInvoiceBody,
}
#[derive(Clone, Debug)]
pub struct EditedMessageText {
pub message: Message,
pub bot_request: EditMessageTextBody,
}
#[derive(Clone, Debug)]
pub struct EditedMessageCaption {
pub message: Message,
pub bot_request: EditMessageCaptionBody,
}
#[derive(Clone, Debug)]
pub struct DeletedMessage {
pub message: Message,
pub bot_request: DeleteMessageBody,
}
#[derive(Clone, Debug)]
pub struct EditedMessageReplyMarkup {
pub message: Message,
pub bot_request: EditMessageReplyMarkupBody,
}
#[derive(Clone, Debug)]
pub struct ForwardedMessage {
pub message: Message,
pub bot_request: ForwardMessageBody,
}
#[derive(Clone, Debug)]
pub struct CopiedMessage {
pub message_id: MessageId,
pub bot_request: CopyMessageBody,
}
#[derive(Clone, Debug, Default)]
pub struct Responses {
/// All of the sent messages, including text, photo, audio, etc.
/// Be warned, editing or deleting messages do not affect this list!
pub sent_messages: Vec<Message>,
/// This has only messages that are text messages, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_text: Vec<SentMessageText>,
/// This has only messages that are photo messages, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_photo: Vec<SentMessagePhoto>,
/// This has only messages that are video messages, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_video: Vec<SentMessageVideo>,
/// This has only messages that are audio messages, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_audio: Vec<SentMessageAudio>,
/// This has only messages that are voice messages, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_voice: Vec<SentMessageVoice>,
/// This has only messages that are video note messages, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_video_note: Vec<SentMessageVideoNote>,
/// This has only messages that are document messages, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_document: Vec<SentMessageDocument>,
/// This has only messages that are animation messages, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_animation: Vec<SentMessageAnimation>,
/// This has only messages that are location messages, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_location: Vec<SentMessageLocation>,
/// This has only messages that are venue messages, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_venue: Vec<SentMessageVenue>,
/// This has only messages that are contact messages, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_contact: Vec<SentMessageContact>,
/// This has only messages that are dice messages, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_dice: Vec<SentMessageDice>,
/// This has only messages that are poll messages, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_poll: Vec<SentMessagePoll>,
/// This has only messages that are stickers, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_sticker: Vec<SentMessageSticker>,
/// This has only messages that are media group messages, sent by the bot.
/// The `.messages` field has the sent by bot messages, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_media_group: Vec<SentMediaGroup>,
/// This has only messages that are invoice messages, sent by the bot.
/// The `.message` field has the sent by bot message, and `.bot_request`
/// has the request that was sent to the fake server
pub sent_messages_invoice: Vec<SentMessageInvoice>,
/// This has only edited by the bot text messages.
/// The `.message` field has the new edited message, and `.bot_request`
/// has the request that was sent to the fake server
pub edited_messages_text: Vec<EditedMessageText>,
/// This has only edited by the bot caption messages.
/// The `.message` field has the new edited message, and `.bot_request`
/// has the request that was sent to the fake server
pub edited_messages_caption: Vec<EditedMessageCaption>,
/// This has only messages whos reply markup was edited by the bot.
/// The `.message` field has the new edited message, and `.bot_request`
/// has the request that was sent to the fake server
pub edited_messages_reply_markup: Vec<EditedMessageReplyMarkup>,
/// This has only messages which were deleted by the bot.
/// The `.message` field has the deleted message, and `.bot_request`
/// has the request that was sent to the fake server
pub deleted_messages: Vec<DeletedMessage>,
/// This has only the requests that were sent to the fake server to forward messages.
/// The `.message` field has the forwarded message, and `.bot_request`
/// has the request that was sent to the fake server
pub forwarded_messages: Vec<ForwardedMessage>,
/// This has only the requests that were sent to the fake server to copy messages.
/// The `.message_id` field has the copied message id, and `.bot_request`
/// has the request that was sent to the fake server
pub copied_messages: Vec<CopiedMessage>,
/// This has only the requests that were sent to the fake server to answer callback queries.
/// Telegram doesn't return anything, because there isn't anything to return, so there is no
/// `.message` field.
pub answered_callback_queries: Vec<AnswerCallbackQueryBody>,
/// This has only the requests that were sent to the fake server to pin messages.
/// Telegram doesn't return anything, because there isn't anything to return, so there is no
/// `.message` field.
pub pinned_chat_messages: Vec<PinChatMessageBody>,
/// This has only the requests that were sent to the fake server to unpin messages.
/// Telegram doesn't return anything, because there isn't anything to return, so there is no
/// `.message` field.
pub unpinned_chat_messages: Vec<UnpinChatMessageBody>,
/// This has only the requests that were sent to the fake server to unpin all messages.
/// Telegram doesn't return anything, because there isn't anything to return, so there is no
/// `.message` field.
pub unpinned_all_chat_messages: Vec<UnpinAllChatMessagesBody>,
/// This has only the requests that were sent to the fake server to ban chat members.
/// Telegram doesn't return anything, because there isn't anything to return, so there is no
/// `.message` field.
pub banned_chat_members: Vec<BanChatMemberBody>,
/// This has only the requests that were sent to the fake server to unban chat members.
/// Telegram doesn't return anything, because there isn't anything to return, so there is no
/// `.message` field.
pub unbanned_chat_members: Vec<UnbanChatMemberBody>,
/// This has only the requests that were sent to the fake server to restrict chat members.
/// Telegram doesn't return anything, because there isn't anything to return, so there is no
/// `.message` field.
pub restricted_chat_members: Vec<RestrictChatMemberBody>,
/// This has only the requests that were sent to the fake server to send chat actions.
/// Telegram doesn't return anything, because there isn't anything to return, so there is no
/// `.message` field.
pub sent_chat_actions: Vec<SendChatActionBody>,
/// This has only the requests that were sent to the fake server to set message reactions.
/// Telegram doesn't return anything, because there isn't anything to return, so there is no
/// `.message` field.
pub set_message_reaction: Vec<SetMessageReactionBody>,
/// This has only the requests that were sent to the fake server to set message reactions.
/// Telegram doesn't return anything, because there isn't anything to return, so there is no
/// `.message` field.
pub set_my_commands: Vec<SetMyCommandsBody>,
}