blazegram 0.4.2

Telegram bot framework: clean chats, zero garbage, declarative screens, pure Rust MTProto.
Documentation
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
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
use crate::error::ApiError;
use crate::keyboard::InlineKeyboard;
use crate::screen::ReplyKeyboardAction;
use crate::types::*;
use async_trait::async_trait;

/// Suppress unused-variable warnings and return a "not implemented" error.
macro_rules! not_implemented {
    ($name:expr, $($arg:expr),* $(,)?) => {{
        let _ = ($($arg,)*);
        Err(ApiError::Unknown(concat!($name, " not implemented").into()))
    }};
}

/// Options for sending a new message.
#[derive(Debug, Clone, Default)]
pub struct SendOptions {
    /// Forbid forwarding/saving.
    pub protect_content: bool,
    /// Reply (bottom) keyboard action.
    pub reply_keyboard: Option<ReplyKeyboardAction>,
    /// Reply to a specific message.
    pub reply_to: Option<MessageId>,
    /// Forum topic ID (message_thread_id). When set, the message is sent to that topic.
    pub message_thread_id: Option<i32>,
}

/// The full Telegram Bot API abstraction.
///
/// Core methods are required (no default). Optional methods return `ApiError::Unknown("not implemented")` by default.
/// The core methods (send_message, edit_*, delete_*, answer_callback_query, send_chat_action,
/// answer_inline_query) are required. Everything else is opt-in — implement what you need.
#[async_trait]
pub trait BotApi: Send + Sync + 'static {
    // ─── Core (required) ───

    /// Send a message with the given content and options.
    async fn send_message(
        &self,
        chat_id: ChatId,
        content: MessageContent,
        opts: SendOptions,
    ) -> Result<SentMessage, ApiError>;

    /// Edit a text message in place.
    async fn edit_message_text(
        &self,
        chat_id: ChatId,
        message_id: MessageId,
        text: String,
        parse_mode: ParseMode,
        keyboard: Option<InlineKeyboard>,
        link_preview: bool,
    ) -> Result<(), ApiError>;

    /// Edit the caption of a media message.
    async fn edit_message_caption(
        &self,
        chat_id: ChatId,
        message_id: MessageId,
        caption: Option<String>,
        parse_mode: ParseMode,
        keyboard: Option<InlineKeyboard>,
    ) -> Result<(), ApiError>;

    /// Replace the media of a message (photo ↔ video ↔ document ↔ animation).
    async fn edit_message_media(
        &self,
        chat_id: ChatId,
        message_id: MessageId,
        content: MessageContent,
        keyboard: Option<InlineKeyboard>,
    ) -> Result<(), ApiError>;

    /// Replace only the inline keyboard of a message.
    async fn edit_message_keyboard(
        &self,
        chat_id: ChatId,
        message_id: MessageId,
        keyboard: Option<InlineKeyboard>,
    ) -> Result<(), ApiError>;

    /// Delete one or more messages by ID.
    async fn delete_messages(
        &self,
        chat_id: ChatId,
        message_ids: Vec<MessageId>,
    ) -> Result<(), ApiError>;

    /// Answer a callback query (dismiss the loading spinner on the button).
    async fn answer_callback_query(
        &self,
        id: String,
        text: Option<String>,
        show_alert: bool,
    ) -> Result<(), ApiError>;

    /// Send a chat action ("typing…", "uploading photo…", etc.).
    async fn send_chat_action(&self, chat_id: ChatId, action: ChatAction) -> Result<(), ApiError>;

    /// Answer an inline query with a list of results.
    async fn answer_inline_query(
        &self,
        query_id: String,
        results: Vec<InlineQueryResult>,
        next_offset: Option<String>,
        cache_time: Option<i32>,
        is_personal: bool,
    ) -> Result<(), ApiError>;

    // ─── Forwarding & Copying ───

    /// Forward a message from one chat to another.
    async fn forward_message(
        &self,
        chat_id: ChatId,
        from_chat_id: ChatId,
        message_id: MessageId,
    ) -> Result<SentMessage, ApiError> {
        not_implemented!("forward_message", chat_id, from_chat_id, message_id)
    }

    /// Copy a message (re-send without "Forwarded from" header).
    async fn copy_message(
        &self,
        chat_id: ChatId,
        from_chat_id: ChatId,
        message_id: MessageId,
    ) -> Result<MessageId, ApiError> {
        not_implemented!("copy_message", chat_id, from_chat_id, message_id)
    }

    // ─── Media ───

    /// Send a group of photos/videos/documents as an album.
    async fn send_media_group(
        &self,
        chat_id: ChatId,
        media: Vec<MediaGroupItem>,
    ) -> Result<Vec<SentMessage>, ApiError> {
        not_implemented!("send_media_group", chat_id, media)
    }

    /// Download a file by its file_id. Returns a `DownloadedFile` with raw bytes and optional size.
    async fn download_file(&self, file_id: &str) -> Result<DownloadedFile, ApiError> {
        not_implemented!("download_file", file_id)
    }

    // ─── Fun & Interactive ───

    /// Send a poll.
    async fn send_poll(&self, chat_id: ChatId, poll: SendPoll) -> Result<SentMessage, ApiError> {
        not_implemented!("send_poll", chat_id, poll)
    }

    /// Stop a poll.
    async fn stop_poll(&self, chat_id: ChatId, message_id: MessageId) -> Result<(), ApiError> {
        not_implemented!("stop_poll", chat_id, message_id)
    }

    /// Send a dice animation.
    async fn send_dice(&self, chat_id: ChatId, emoji: DiceEmoji) -> Result<SentMessage, ApiError> {
        not_implemented!("send_dice", chat_id, emoji)
    }

    /// Send a contact.
    async fn send_contact(
        &self,
        chat_id: ChatId,
        contact: Contact,
    ) -> Result<SentMessage, ApiError> {
        not_implemented!("send_contact", chat_id, contact)
    }

    /// Send a venue.
    async fn send_venue(&self, chat_id: ChatId, venue: Venue) -> Result<SentMessage, ApiError> {
        not_implemented!("send_venue", chat_id, venue)
    }

    // ─── Payments ───

    /// Send an invoice for payment.
    async fn send_invoice(
        &self,
        chat_id: ChatId,
        invoice: Invoice,
    ) -> Result<SentMessage, ApiError> {
        not_implemented!("send_invoice", chat_id, invoice)
    }

    /// Answer a pre-checkout query (approve or decline).
    async fn answer_pre_checkout_query(
        &self,
        id: String,
        ok: bool,
        error_message: Option<String>,
    ) -> Result<(), ApiError> {
        not_implemented!("answer_pre_checkout_query", id, ok, error_message)
    }

    // ─── Chat Administration ───

    /// Ban a user from a chat.
    async fn ban_chat_member(&self, chat_id: ChatId, user_id: UserId) -> Result<(), ApiError> {
        not_implemented!("ban_chat_member", chat_id, user_id)
    }

    /// Unban a previously banned user.
    async fn unban_chat_member(&self, chat_id: ChatId, user_id: UserId) -> Result<(), ApiError> {
        not_implemented!("unban_chat_member", chat_id, user_id)
    }

    /// Restrict a user (set permissions).
    async fn restrict_chat_member(
        &self,
        chat_id: ChatId,
        user_id: UserId,
        permissions: ChatPermissions,
    ) -> Result<(), ApiError> {
        not_implemented!("restrict_chat_member", chat_id, user_id, permissions)
    }

    /// Promote a user to admin.
    async fn promote_chat_member(
        &self,
        chat_id: ChatId,
        user_id: UserId,
        permissions: ChatPermissions,
    ) -> Result<(), ApiError> {
        not_implemented!("promote_chat_member", chat_id, user_id, permissions)
    }

    /// Get info about a chat member.
    async fn get_chat_member(
        &self,
        chat_id: ChatId,
        user_id: UserId,
    ) -> Result<ChatMember, ApiError> {
        not_implemented!("get_chat_member", chat_id, user_id)
    }

    /// Get the number of members in a chat.
    async fn get_chat_member_count(&self, chat_id: ChatId) -> Result<i32, ApiError> {
        not_implemented!("get_chat_member_count", chat_id)
    }

    /// Get chat info.
    async fn get_chat(&self, chat_id: ChatId) -> Result<ChatInfo, ApiError> {
        not_implemented!("get_chat", chat_id)
    }

    /// Leave a chat.
    async fn leave_chat(&self, chat_id: ChatId) -> Result<(), ApiError> {
        not_implemented!("leave_chat", chat_id)
    }

    /// Set chat permissions for all members.
    async fn set_chat_permissions(
        &self,
        chat_id: ChatId,
        permissions: ChatPermissions,
    ) -> Result<(), ApiError> {
        not_implemented!("set_chat_permissions", chat_id, permissions)
    }

    // ─── Bot Settings ───

    /// Set the bot's command list.
    async fn set_my_commands(&self, commands: Vec<BotCommand>) -> Result<(), ApiError> {
        not_implemented!("set_my_commands", commands)
    }

    /// Delete the bot's command list.
    async fn delete_my_commands(&self) -> Result<(), ApiError> {
        not_implemented!("delete_my_commands",)
    }

    /// Get bot info (id, username, etc).
    async fn get_me(&self) -> Result<BotInfo, ApiError> {
        not_implemented!("get_me",)
    }

    // ─── Reactions ───

    /// Set a reaction on a message.
    async fn set_message_reaction(
        &self,
        chat_id: ChatId,
        message_id: MessageId,
        emoji: &str,
    ) -> Result<(), ApiError> {
        not_implemented!("set_message_reaction", chat_id, message_id, emoji)
    }

    // ─── Pinning ───

    /// Pin a message in a chat.
    async fn pin_chat_message(
        &self,
        chat_id: ChatId,
        message_id: MessageId,
        silent: bool,
    ) -> Result<(), ApiError> {
        not_implemented!("pin_chat_message", chat_id, message_id, silent)
    }

    /// Unpin a message in a chat.
    async fn unpin_chat_message(
        &self,
        chat_id: ChatId,
        message_id: MessageId,
    ) -> Result<(), ApiError> {
        not_implemented!("unpin_chat_message", chat_id, message_id)
    }

    /// Unpin all messages in a chat.
    async fn unpin_all_chat_messages(&self, chat_id: ChatId) -> Result<(), ApiError> {
        not_implemented!("unpin_all_chat_messages", chat_id)
    }

    // ─── Invite Links ───

    /// Create a chat invite link.
    async fn create_chat_invite_link(
        &self,
        chat_id: ChatId,
        name: Option<&str>,
        expire_date: Option<i64>,
        member_limit: Option<i32>,
    ) -> Result<String, ApiError> {
        not_implemented!(
            "create_chat_invite_link",
            chat_id,
            name,
            expire_date,
            member_limit
        )
    }

    /// Export the primary chat invite link.
    async fn export_chat_invite_link(&self, chat_id: ChatId) -> Result<String, ApiError> {
        not_implemented!("export_chat_invite_link", chat_id)
    }

    /// Revoke a chat invite link.
    async fn revoke_chat_invite_link(
        &self,
        chat_id: ChatId,
        invite_link: &str,
    ) -> Result<ChatInviteLink, ApiError> {
        not_implemented!("revoke_chat_invite_link", chat_id, invite_link)
    }

    // ─── Chat Join Requests ───

    /// Approve a chat join request.
    async fn approve_chat_join_request(
        &self,
        chat_id: ChatId,
        user_id: UserId,
    ) -> Result<(), ApiError> {
        not_implemented!("approve_chat_join_request", chat_id, user_id)
    }

    /// Decline a chat join request.
    async fn decline_chat_join_request(
        &self,
        chat_id: ChatId,
        user_id: UserId,
    ) -> Result<(), ApiError> {
        not_implemented!("decline_chat_join_request", chat_id, user_id)
    }

    // ─── Chat Management ───

    /// Set the chat title.
    async fn set_chat_title(&self, chat_id: ChatId, title: &str) -> Result<(), ApiError> {
        not_implemented!("set_chat_title", chat_id, title)
    }

    /// Set the chat description.
    async fn set_chat_description(
        &self,
        chat_id: ChatId,
        description: Option<&str>,
    ) -> Result<(), ApiError> {
        not_implemented!("set_chat_description", chat_id, description)
    }

    /// Set the chat photo.
    async fn set_chat_photo(&self, chat_id: ChatId, photo: FileSource) -> Result<(), ApiError> {
        not_implemented!("set_chat_photo", chat_id, photo)
    }

    /// Delete the chat photo.
    async fn delete_chat_photo(&self, chat_id: ChatId) -> Result<(), ApiError> {
        not_implemented!("delete_chat_photo", chat_id)
    }

    /// Get the list of chat administrators.
    async fn get_chat_administrators(&self, chat_id: ChatId) -> Result<Vec<ChatMember>, ApiError> {
        not_implemented!("get_chat_administrators", chat_id)
    }

    /// Set a custom title for an admin in a supergroup.
    async fn set_chat_administrator_custom_title(
        &self,
        chat_id: ChatId,
        user_id: UserId,
        custom_title: &str,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "set_chat_administrator_custom_title",
            chat_id,
            user_id,
            custom_title
        )
    }

    // ─── User Info ───

    /// Get a user's profile photos.
    async fn get_user_profile_photos(
        &self,
        user_id: UserId,
        offset: Option<i32>,
        limit: Option<i32>,
    ) -> Result<UserProfilePhotos, ApiError> {
        not_implemented!("get_user_profile_photos", user_id, offset, limit)
    }

    // ─── Bot Settings (extended) ───

    /// Get the bot's command list.
    async fn get_my_commands(&self) -> Result<Vec<BotCommand>, ApiError> {
        not_implemented!("get_my_commands",)
    }

    /// Set the bot's description.
    async fn set_my_description(
        &self,
        description: Option<&str>,
        language_code: Option<&str>,
    ) -> Result<(), ApiError> {
        not_implemented!("set_my_description", description, language_code)
    }

    /// Get the bot's description.
    async fn get_my_description(
        &self,
        language_code: Option<&str>,
    ) -> Result<BotDescription, ApiError> {
        not_implemented!("get_my_description", language_code)
    }

    /// Set the bot's short description.
    async fn set_my_short_description(
        &self,
        short_description: Option<&str>,
        language_code: Option<&str>,
    ) -> Result<(), ApiError> {
        not_implemented!("set_my_short_description", short_description, language_code)
    }

    /// Get the bot's short description.
    async fn get_my_short_description(
        &self,
        language_code: Option<&str>,
    ) -> Result<BotShortDescription, ApiError> {
        not_implemented!("get_my_short_description", language_code)
    }

    /// Set the bot's name.
    async fn set_my_name(
        &self,
        name: Option<&str>,
        language_code: Option<&str>,
    ) -> Result<(), ApiError> {
        not_implemented!("set_my_name", name, language_code)
    }

    /// Get the bot's name.
    async fn get_my_name(&self, language_code: Option<&str>) -> Result<BotName, ApiError> {
        not_implemented!("get_my_name", language_code)
    }

    // ─── Menu Button ───

    /// Set the bot's menu button for a specific chat or default.
    async fn set_chat_menu_button(
        &self,
        chat_id: Option<ChatId>,
        menu_button: MenuButton,
    ) -> Result<(), ApiError> {
        not_implemented!("set_chat_menu_button", chat_id, menu_button)
    }

    /// Get the bot's menu button for a specific chat or default.
    async fn get_chat_menu_button(&self, chat_id: Option<ChatId>) -> Result<MenuButton, ApiError> {
        not_implemented!("get_chat_menu_button", chat_id)
    }

    // ─── Payments (extended) ───

    /// Answer a shipping query (for flexible pricing invoices).
    async fn answer_shipping_query(
        &self,
        shipping_query_id: String,
        ok: bool,
        shipping_options: Option<Vec<ShippingOption>>,
        error_message: Option<String>,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "answer_shipping_query",
            shipping_query_id,
            ok,
            shipping_options,
            error_message
        )
    }

    /// Create an invoice link for payments without sending a message.
    async fn create_invoice_link(&self, invoice: Invoice) -> Result<String, ApiError> {
        not_implemented!("create_invoice_link", invoice)
    }

    // ─── Batch Operations ───

    /// Forward multiple messages at once.
    async fn forward_messages(
        &self,
        chat_id: ChatId,
        from_chat_id: ChatId,
        message_ids: Vec<MessageId>,
    ) -> Result<Vec<MessageId>, ApiError> {
        not_implemented!("forward_messages", chat_id, from_chat_id, message_ids)
    }

    /// Copy multiple messages at once.
    async fn copy_messages(
        &self,
        chat_id: ChatId,
        from_chat_id: ChatId,
        message_ids: Vec<MessageId>,
    ) -> Result<Vec<MessageId>, ApiError> {
        not_implemented!("copy_messages", chat_id, from_chat_id, message_ids)
    }

    // ─── Sticker ───

    /// Send a sticker (convenience — also available via send_message with MessageContent::Sticker).
    async fn send_sticker(
        &self,
        chat_id: ChatId,
        sticker: FileSource,
    ) -> Result<SentMessage, ApiError> {
        not_implemented!("send_sticker", chat_id, sticker)
    }

    // ─── Location ───

    /// Send a location.
    async fn send_location(
        &self,
        chat_id: ChatId,
        latitude: f64,
        longitude: f64,
    ) -> Result<SentMessage, ApiError> {
        not_implemented!("send_location", chat_id, latitude, longitude)
    }

    // ─── Forum Topics ───

    /// Create a forum topic in a supergroup.
    async fn create_forum_topic(
        &self,
        chat_id: ChatId,
        title: &str,
        icon_color: Option<i32>,
        icon_custom_emoji_id: Option<i64>,
    ) -> Result<ForumTopic, ApiError> {
        not_implemented!(
            "create_forum_topic",
            chat_id,
            title,
            icon_color,
            icon_custom_emoji_id
        )
    }

    /// Edit a forum topic (title, icon, open/close, hide/show).
    async fn edit_forum_topic(
        &self,
        chat_id: ChatId,
        topic_id: i32,
        title: Option<&str>,
        icon_custom_emoji_id: Option<i64>,
        closed: Option<bool>,
        hidden: Option<bool>,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "edit_forum_topic",
            chat_id,
            topic_id,
            title,
            icon_custom_emoji_id,
            closed,
            hidden
        )
    }

    /// Close a forum topic.
    async fn close_forum_topic(&self, chat_id: ChatId, topic_id: i32) -> Result<(), ApiError> {
        self.edit_forum_topic(chat_id, topic_id, None, None, Some(true), None)
            .await
    }

    /// Reopen a forum topic.
    async fn reopen_forum_topic(&self, chat_id: ChatId, topic_id: i32) -> Result<(), ApiError> {
        self.edit_forum_topic(chat_id, topic_id, None, None, Some(false), None)
            .await
    }

    /// Delete a forum topic and all its messages.
    async fn delete_forum_topic(&self, chat_id: ChatId, topic_id: i32) -> Result<(), ApiError> {
        not_implemented!("delete_forum_topic", chat_id, topic_id)
    }

    /// Unpin all messages in a forum topic.
    async fn unpin_all_forum_topic_messages(
        &self,
        chat_id: ChatId,
        topic_id: i32,
    ) -> Result<(), ApiError> {
        not_implemented!("unpin_all_forum_topic_messages", chat_id, topic_id)
    }

    /// Hide the 'General' topic in a forum supergroup.
    async fn hide_general_forum_topic(&self, chat_id: ChatId) -> Result<(), ApiError> {
        // General topic id = 1, hidden = true
        self.edit_forum_topic(chat_id, 1, None, None, None, Some(true))
            .await
    }

    /// Unhide the 'General' topic in a forum supergroup.
    async fn unhide_general_forum_topic(&self, chat_id: ChatId) -> Result<(), ApiError> {
        self.edit_forum_topic(chat_id, 1, None, None, None, Some(false))
            .await
    }

    // ─── Stars API ───

    /// Get star transaction history for the bot.
    async fn get_star_transactions(
        &self,
        offset: Option<&str>,
        limit: Option<i32>,
    ) -> Result<StarTransactions, ApiError> {
        not_implemented!("get_star_transactions", offset, limit)
    }

    /// Refund a star payment by charge_id.
    async fn refund_star_payment(&self, user_id: UserId, charge_id: &str) -> Result<(), ApiError> {
        not_implemented!("refund_star_payment", user_id, charge_id)
    }

    // ─── Core Utility ───

    /// Log out from the cloud Bot API server before launching the bot locally.
    /// After a successful call, you can immediately log in on a local server, but
    /// will not be able to log in back to the cloud Bot API server for 10 minutes.
    async fn log_out(&self) -> Result<(), ApiError> {
        not_implemented!("log_out",)
    }

    /// Close the bot instance before moving it from one local server to another.
    /// The method will return error 429 in the first 10 minutes after the bot is launched.
    async fn close(&self) -> Result<(), ApiError> {
        not_implemented!("close",)
    }

    // ─── Convenience Media Sending ───
    //
    // These have DEFAULT implementations that build MessageContent and delegate
    // to self.send_message(), so any BotApi implementor gets them for free.

    /// Send a photo. Convenience wrapper around [`send_message`] with [`MessageContent::Photo`].
    async fn send_photo(
        &self,
        chat_id: ChatId,
        photo: FileSource,
        caption: Option<String>,
        parse_mode: ParseMode,
        opts: SendOptions,
    ) -> Result<SentMessage, ApiError> {
        self.send_message(
            chat_id,
            MessageContent::Photo {
                source: photo,
                caption,
                parse_mode,
                keyboard: None,
                spoiler: false,
            },
            opts,
        )
        .await
    }

    /// Send an audio file. Convenience wrapper around [`send_message`].
    ///
    /// Note: delegates to `MessageContent::Document` until a dedicated Audio variant is added.
    async fn send_audio(
        &self,
        chat_id: ChatId,
        audio: FileSource,
        caption: Option<String>,
        parse_mode: ParseMode,
        opts: SendOptions,
    ) -> Result<SentMessage, ApiError> {
        self.send_message(
            chat_id,
            MessageContent::Document {
                source: audio,
                caption,
                parse_mode,
                keyboard: None,
                filename: None,
            },
            opts,
        )
        .await
    }

    /// Send a document. Convenience wrapper around [`send_message`] with [`MessageContent::Document`].
    async fn send_document(
        &self,
        chat_id: ChatId,
        document: FileSource,
        caption: Option<String>,
        parse_mode: ParseMode,
        opts: SendOptions,
    ) -> Result<SentMessage, ApiError> {
        self.send_message(
            chat_id,
            MessageContent::Document {
                source: document,
                caption,
                parse_mode,
                keyboard: None,
                filename: None,
            },
            opts,
        )
        .await
    }

    /// Send a video. Convenience wrapper around [`send_message`] with [`MessageContent::Video`].
    async fn send_video(
        &self,
        chat_id: ChatId,
        video: FileSource,
        caption: Option<String>,
        parse_mode: ParseMode,
        opts: SendOptions,
    ) -> Result<SentMessage, ApiError> {
        self.send_message(
            chat_id,
            MessageContent::Video {
                source: video,
                caption,
                parse_mode,
                keyboard: None,
                spoiler: false,
            },
            opts,
        )
        .await
    }

    /// Send an animation (GIF / MPEG4). Convenience wrapper around [`send_message`] with [`MessageContent::Animation`].
    async fn send_animation(
        &self,
        chat_id: ChatId,
        animation: FileSource,
        caption: Option<String>,
        parse_mode: ParseMode,
        opts: SendOptions,
    ) -> Result<SentMessage, ApiError> {
        self.send_message(
            chat_id,
            MessageContent::Animation {
                source: animation,
                caption,
                parse_mode,
                keyboard: None,
                spoiler: false,
            },
            opts,
        )
        .await
    }

    /// Send a voice message (OGG Opus). Convenience wrapper that delegates to [`send_message`].
    ///
    /// Note: delegates to `MessageContent::Document` until a dedicated Voice variant is added.
    async fn send_voice(
        &self,
        chat_id: ChatId,
        voice: FileSource,
        caption: Option<String>,
        parse_mode: ParseMode,
        opts: SendOptions,
    ) -> Result<SentMessage, ApiError> {
        self.send_message(
            chat_id,
            MessageContent::Document {
                source: voice,
                caption,
                parse_mode,
                keyboard: None,
                filename: None,
            },
            opts,
        )
        .await
    }

    /// Send a video note (round video). Convenience wrapper that delegates to [`send_message`].
    ///
    /// Note: delegates to `MessageContent::Document` until a dedicated VideoNote variant is added.
    async fn send_video_note(
        &self,
        chat_id: ChatId,
        video_note: FileSource,
        opts: SendOptions,
    ) -> Result<SentMessage, ApiError> {
        self.send_message(
            chat_id,
            MessageContent::Document {
                source: video_note,
                caption: None,
                parse_mode: ParseMode::None,
                keyboard: None,
                filename: None,
            },
            opts,
        )
        .await
    }

    /// Send paid media (Telegram Stars). Requires star_count > 0.
    async fn send_paid_media(
        &self,
        chat_id: ChatId,
        star_count: i64,
        media: Vec<PaidMediaInput>,
        caption: Option<String>,
        parse_mode: ParseMode,
        opts: SendOptions,
    ) -> Result<SentMessage, ApiError> {
        not_implemented!(
            "send_paid_media",
            chat_id,
            star_count,
            media,
            caption,
            parse_mode,
            opts
        )
    }

    // ─── Live Location ───

    /// Send a live location that can be updated in real-time.
    ///
    /// `live_period` is the duration in seconds (60–86400) for which the location will be updated.
    async fn send_live_location(
        &self,
        chat_id: ChatId,
        latitude: f64,
        longitude: f64,
        live_period: i32,
        opts: SendOptions,
    ) -> Result<SentMessage, ApiError> {
        not_implemented!(
            "send_live_location",
            chat_id,
            latitude,
            longitude,
            live_period,
            opts
        )
    }

    /// Update a live location message.
    async fn edit_message_live_location(
        &self,
        chat_id: ChatId,
        message_id: MessageId,
        latitude: f64,
        longitude: f64,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "edit_message_live_location",
            chat_id,
            message_id,
            latitude,
            longitude
        )
    }

    /// Stop updating a live location message.
    async fn stop_message_live_location(
        &self,
        chat_id: ChatId,
        message_id: MessageId,
    ) -> Result<(), ApiError> {
        not_implemented!("stop_message_live_location", chat_id, message_id)
    }

    // ─── Checklist (Bot API 9.5+) ───

    /// Send a checklist message.
    async fn send_checklist(
        &self,
        chat_id: ChatId,
        title: String,
        items: Vec<ChecklistItem>,
        opts: SendOptions,
    ) -> Result<SentMessage, ApiError> {
        not_implemented!("send_checklist", chat_id, title, items, opts)
    }

    /// Edit an existing checklist message.
    async fn edit_message_checklist(
        &self,
        chat_id: ChatId,
        message_id: MessageId,
        title: String,
        items: Vec<ChecklistItem>,
    ) -> Result<(), ApiError> {
        not_implemented!("edit_message_checklist", chat_id, message_id, title, items)
    }

    // ─── Message Draft (Bot API 9.5+) ───

    /// Send a pre-filled message draft to a user's input field.
    /// The user still has to send it manually.
    async fn send_message_draft(
        &self,
        chat_id: ChatId,
        text: String,
        parse_mode: ParseMode,
    ) -> Result<(), ApiError> {
        not_implemented!("send_message_draft", chat_id, text, parse_mode)
    }

    // ─── User Emoji Status ───

    /// Set the emoji status of a user (requires appropriate bot privileges).
    async fn set_user_emoji_status(
        &self,
        user_id: UserId,
        emoji_status_custom_emoji_id: Option<String>,
        emoji_status_expiration_date: Option<i64>,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "set_user_emoji_status",
            user_id,
            emoji_status_custom_emoji_id,
            emoji_status_expiration_date
        )
    }

    // ─── User Profile Audios (Bot API 9.4+) ───

    /// Get a list of profile audios for a user.
    async fn get_user_profile_audios(
        &self,
        user_id: UserId,
        offset: Option<i32>,
        limit: Option<i32>,
    ) -> Result<UserProfileAudios, ApiError> {
        not_implemented!("get_user_profile_audios", user_id, offset, limit)
    }

    // ─── Admin Extras ───

    /// Ban a channel chat in a supergroup or channel.
    async fn ban_chat_sender_chat(
        &self,
        chat_id: ChatId,
        sender_chat_id: ChatId,
    ) -> Result<(), ApiError> {
        not_implemented!("ban_chat_sender_chat", chat_id, sender_chat_id)
    }

    /// Unban a previously banned channel chat.
    async fn unban_chat_sender_chat(
        &self,
        chat_id: ChatId,
        sender_chat_id: ChatId,
    ) -> Result<(), ApiError> {
        not_implemented!("unban_chat_sender_chat", chat_id, sender_chat_id)
    }

    /// Set or remove a custom tag for a chat member (visible only to admins).
    async fn set_chat_member_tag(
        &self,
        chat_id: ChatId,
        user_id: UserId,
        tag: Option<String>,
    ) -> Result<(), ApiError> {
        not_implemented!("set_chat_member_tag", chat_id, user_id, tag)
    }

    /// Edit an existing chat invite link.
    async fn edit_chat_invite_link(
        &self,
        chat_id: ChatId,
        invite_link: &str,
        name: Option<&str>,
        expire_date: Option<i64>,
        member_limit: Option<i32>,
    ) -> Result<ChatInviteLink, ApiError> {
        not_implemented!(
            "edit_chat_invite_link",
            chat_id,
            invite_link,
            name,
            expire_date,
            member_limit
        )
    }

    /// Create a subscription invite link for a channel chat.
    async fn create_chat_subscription_invite_link(
        &self,
        chat_id: ChatId,
        name: Option<&str>,
        subscription_period: i32,
        subscription_price: i64,
    ) -> Result<ChatInviteLink, ApiError> {
        not_implemented!(
            "create_chat_subscription_invite_link",
            chat_id,
            name,
            subscription_period,
            subscription_price
        )
    }

    /// Edit a subscription invite link.
    async fn edit_chat_subscription_invite_link(
        &self,
        chat_id: ChatId,
        invite_link: &str,
        name: Option<&str>,
    ) -> Result<ChatInviteLink, ApiError> {
        not_implemented!(
            "edit_chat_subscription_invite_link",
            chat_id,
            invite_link,
            name
        )
    }

    /// Get the list of boosts a user has applied to a chat.
    async fn get_user_chat_boosts(
        &self,
        chat_id: ChatId,
        user_id: UserId,
    ) -> Result<UserChatBoosts, ApiError> {
        not_implemented!("get_user_chat_boosts", chat_id, user_id)
    }

    /// Set the bot's default administrator rights.
    async fn set_my_default_administrator_rights(
        &self,
        rights: Option<ChatPermissions>,
        for_channels: Option<bool>,
    ) -> Result<(), ApiError> {
        not_implemented!("set_my_default_administrator_rights", rights, for_channels)
    }

    /// Get the bot's default administrator rights.
    async fn get_my_default_administrator_rights(
        &self,
        for_channels: Option<bool>,
    ) -> Result<ChatPermissions, ApiError> {
        not_implemented!("get_my_default_administrator_rights", for_channels)
    }

    /// Set the bot's profile photo.
    async fn set_my_profile_photo(
        &self,
        photo: FileSource,
        is_public: Option<bool>,
    ) -> Result<(), ApiError> {
        not_implemented!("set_my_profile_photo", photo, is_public)
    }

    /// Remove the bot's profile photo.
    async fn remove_my_profile_photo(&self, file_id: Option<String>) -> Result<(), ApiError> {
        not_implemented!("remove_my_profile_photo", file_id)
    }

    // ─── Forum Extras ───

    /// Edit the name of the 'General' topic in a forum supergroup.
    async fn edit_general_forum_topic(&self, chat_id: ChatId, title: &str) -> Result<(), ApiError> {
        self.edit_forum_topic(chat_id, 1, Some(title), None, None, None)
            .await
    }

    /// Close the 'General' topic in a forum supergroup.
    async fn close_general_forum_topic(&self, chat_id: ChatId) -> Result<(), ApiError> {
        self.edit_forum_topic(chat_id, 1, None, None, Some(true), None)
            .await
    }

    /// Reopen the 'General' topic in a forum supergroup.
    async fn reopen_general_forum_topic(&self, chat_id: ChatId) -> Result<(), ApiError> {
        self.edit_forum_topic(chat_id, 1, None, None, Some(false), None)
            .await
    }

    /// Unpin all messages in the 'General' forum topic.
    async fn unpin_all_general_forum_topic_messages(
        &self,
        chat_id: ChatId,
    ) -> Result<(), ApiError> {
        self.unpin_all_forum_topic_messages(chat_id, 1).await
    }

    // ─── Verification ───

    /// Verify a user on behalf of the organization the bot represents.
    async fn verify_user(
        &self,
        user_id: UserId,
        custom_description: Option<String>,
    ) -> Result<(), ApiError> {
        not_implemented!("verify_user", user_id, custom_description)
    }

    /// Verify a chat on behalf of the organization the bot represents.
    async fn verify_chat(
        &self,
        chat_id: ChatId,
        custom_description: Option<String>,
    ) -> Result<(), ApiError> {
        not_implemented!("verify_chat", chat_id, custom_description)
    }

    /// Remove verification from a user.
    async fn remove_user_verification(&self, user_id: UserId) -> Result<(), ApiError> {
        not_implemented!("remove_user_verification", user_id)
    }

    /// Remove verification from a chat.
    async fn remove_chat_verification(&self, chat_id: ChatId) -> Result<(), ApiError> {
        not_implemented!("remove_chat_verification", chat_id)
    }

    // ─── Business ───

    /// Get information about a business connection.
    async fn get_business_connection(
        &self,
        business_connection_id: &str,
    ) -> Result<BusinessConnection, ApiError> {
        not_implemented!("get_business_connection", business_connection_id)
    }

    /// Mark a message as read in a business chat.
    async fn read_business_message(
        &self,
        business_connection_id: &str,
        chat_id: ChatId,
        message_id: MessageId,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "read_business_message",
            business_connection_id,
            chat_id,
            message_id
        )
    }

    /// Delete messages from a business chat.
    async fn delete_business_messages(
        &self,
        business_connection_id: &str,
        message_ids: Vec<MessageId>,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "delete_business_messages",
            business_connection_id,
            message_ids
        )
    }

    /// Set the business account's name.
    async fn set_business_account_name(
        &self,
        business_connection_id: &str,
        first_name: &str,
        last_name: Option<&str>,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "set_business_account_name",
            business_connection_id,
            first_name,
            last_name
        )
    }

    /// Set the business account's username.
    async fn set_business_account_username(
        &self,
        business_connection_id: &str,
        username: Option<&str>,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "set_business_account_username",
            business_connection_id,
            username
        )
    }

    /// Set the business account's bio.
    async fn set_business_account_bio(
        &self,
        business_connection_id: &str,
        bio: Option<&str>,
    ) -> Result<(), ApiError> {
        not_implemented!("set_business_account_bio", business_connection_id, bio)
    }

    /// Set the business account's profile photo.
    async fn set_business_account_profile_photo(
        &self,
        business_connection_id: &str,
        photo: FileSource,
        is_public: Option<bool>,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "set_business_account_profile_photo",
            business_connection_id,
            photo,
            is_public
        )
    }

    /// Remove the business account's profile photo.
    async fn remove_business_account_profile_photo(
        &self,
        business_connection_id: &str,
        is_public: Option<bool>,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "remove_business_account_profile_photo",
            business_connection_id,
            is_public
        )
    }

    /// Set the business account's gift settings.
    async fn set_business_account_gift_settings(
        &self,
        business_connection_id: &str,
        show_gift_button: bool,
        accepted_gift_types: AcceptedGiftTypes,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "set_business_account_gift_settings",
            business_connection_id,
            show_gift_button,
            accepted_gift_types
        )
    }

    /// Get the business account's current Stars balance.
    async fn get_business_account_star_balance(
        &self,
        business_connection_id: &str,
    ) -> Result<StarBalance, ApiError> {
        not_implemented!("get_business_account_star_balance", business_connection_id)
    }

    /// Transfer Stars from the business account to the bot.
    async fn transfer_business_account_stars(
        &self,
        business_connection_id: &str,
        star_count: i64,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "transfer_business_account_stars",
            business_connection_id,
            star_count
        )
    }

    /// Get the gifts owned by a business account.
    async fn get_business_account_gifts(
        &self,
        business_connection_id: &str,
        exclude_unsaved: Option<bool>,
        exclude_saved: Option<bool>,
        exclude_unlimited: Option<bool>,
        exclude_limited: Option<bool>,
        exclude_unique: Option<bool>,
        sort_by_price: Option<bool>,
        offset: Option<&str>,
        limit: Option<i32>,
    ) -> Result<OwnedGifts, ApiError> {
        not_implemented!(
            "get_business_account_gifts",
            business_connection_id,
            exclude_unsaved,
            exclude_saved,
            exclude_unlimited,
            exclude_limited,
            exclude_unique,
            sort_by_price,
            offset,
            limit
        )
    }

    // ─── Gifts ───

    /// Get the list of gifts that can be sent by the bot.
    async fn get_available_gifts(&self) -> Result<Vec<Gift>, ApiError> {
        not_implemented!("get_available_gifts",)
    }

    /// Send a gift to a user.
    async fn send_gift(
        &self,
        user_id: UserId,
        gift_id: String,
        text: Option<String>,
        text_parse_mode: Option<ParseMode>,
    ) -> Result<(), ApiError> {
        not_implemented!("send_gift", user_id, gift_id, text, text_parse_mode)
    }

    /// Gift a Telegram Premium subscription to a user.
    async fn gift_premium_subscription(
        &self,
        user_id: UserId,
        month_count: i32,
        star_count: i64,
        text: Option<String>,
        text_parse_mode: Option<ParseMode>,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "gift_premium_subscription",
            user_id,
            month_count,
            star_count,
            text,
            text_parse_mode
        )
    }

    /// Get the list of gifts owned by a user.
    async fn get_user_gifts(
        &self,
        user_id: UserId,
        offset: Option<&str>,
        limit: Option<i32>,
    ) -> Result<OwnedGifts, ApiError> {
        not_implemented!("get_user_gifts", user_id, offset, limit)
    }

    /// Get the list of gifts received by a chat.
    async fn get_chat_gifts(
        &self,
        chat_id: ChatId,
        offset: Option<&str>,
        limit: Option<i32>,
    ) -> Result<OwnedGifts, ApiError> {
        not_implemented!("get_chat_gifts", chat_id, offset, limit)
    }

    /// Convert a gift to Telegram Stars.
    async fn convert_gift_to_stars(
        &self,
        business_connection_id: Option<&str>,
        owned_gift_id: &str,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "convert_gift_to_stars",
            business_connection_id,
            owned_gift_id
        )
    }

    /// Upgrade a gift to a unique gift.
    async fn upgrade_gift(
        &self,
        business_connection_id: Option<&str>,
        owned_gift_id: &str,
        keep_original_details: Option<bool>,
        star_count: Option<i64>,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "upgrade_gift",
            business_connection_id,
            owned_gift_id,
            keep_original_details,
            star_count
        )
    }

    /// Transfer a gift to another user or channel.
    async fn transfer_gift(
        &self,
        business_connection_id: Option<&str>,
        owned_gift_id: &str,
        new_owner_chat_id: ChatId,
        star_count: Option<i64>,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "transfer_gift",
            business_connection_id,
            owned_gift_id,
            new_owner_chat_id,
            star_count
        )
    }

    // ─── Stories ───

    /// Post a story on behalf of a channel chat.
    async fn post_story(
        &self,
        chat_id: ChatId,
        content: StoryContent,
        active_period: i32,
        caption: Option<String>,
        parse_mode: Option<ParseMode>,
    ) -> Result<Story, ApiError> {
        not_implemented!(
            "post_story",
            chat_id,
            content,
            active_period,
            caption,
            parse_mode
        )
    }

    /// Edit a previously posted story.
    async fn edit_story(
        &self,
        chat_id: ChatId,
        story_id: i32,
        content: Option<StoryContent>,
        caption: Option<String>,
        parse_mode: Option<ParseMode>,
    ) -> Result<Story, ApiError> {
        not_implemented!(
            "edit_story",
            chat_id,
            story_id,
            content,
            caption,
            parse_mode
        )
    }

    /// Delete a previously posted story.
    async fn delete_story(&self, chat_id: ChatId, story_id: i32) -> Result<(), ApiError> {
        not_implemented!("delete_story", chat_id, story_id)
    }

    // ─── Stars Extras ───

    /// Get the bot's current Stars balance.
    async fn get_my_star_balance(&self) -> Result<StarBalance, ApiError> {
        not_implemented!("get_my_star_balance",)
    }

    /// Edit a user's star subscription (cancel or re-enable).
    async fn edit_user_star_subscription(
        &self,
        user_id: UserId,
        telegram_payment_charge_id: &str,
        is_canceled: bool,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "edit_user_star_subscription",
            user_id,
            telegram_payment_charge_id,
            is_canceled
        )
    }

    // ─── Managed Bots (Bot API 9.6+) ───

    /// Get the current token for a bot managed by the calling bot.
    async fn get_managed_bot_token(&self, bot_id: UserId) -> Result<String, ApiError> {
        not_implemented!("get_managed_bot_token", bot_id)
    }

    /// Generate a new token for a bot managed by the calling bot.
    async fn replace_managed_bot_token(&self, bot_id: UserId) -> Result<String, ApiError> {
        not_implemented!("replace_managed_bot_token", bot_id)
    }

    // ─── Prepared Keyboard Button (Bot API 9.6+) ───

    /// Save a prepared keyboard button for a user. Returns the stored button with ID + expiry.
    async fn save_prepared_keyboard_button(
        &self,
        user_id: UserId,
        button: PreparedKeyboardButtonData,
    ) -> Result<PreparedKeyboardButton, ApiError> {
        not_implemented!("save_prepared_keyboard_button", user_id, button)
    }

    // ─── Sticker Management ───

    /// Get a sticker set by name.
    async fn get_sticker_set(&self, name: &str) -> Result<StickerSet, ApiError> {
        not_implemented!("get_sticker_set", name)
    }

    /// Get information about custom emoji stickers by their identifiers.
    async fn get_custom_emoji_stickers(
        &self,
        custom_emoji_ids: Vec<String>,
    ) -> Result<Vec<StickerInfo>, ApiError> {
        not_implemented!("get_custom_emoji_stickers", custom_emoji_ids)
    }

    /// Upload a sticker file for later use in `create_new_sticker_set` / `add_sticker_to_set`.
    async fn upload_sticker_file(
        &self,
        user_id: UserId,
        sticker: FileSource,
        sticker_format: StickerFormat,
    ) -> Result<TelegramFile, ApiError> {
        not_implemented!("upload_sticker_file", user_id, sticker, sticker_format)
    }

    /// Create a new sticker set owned by a user.
    async fn create_new_sticker_set(
        &self,
        user_id: UserId,
        name: String,
        title: String,
        stickers: Vec<InputSticker>,
        sticker_type: Option<StickerType>,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "create_new_sticker_set",
            user_id,
            name,
            title,
            stickers,
            sticker_type
        )
    }

    /// Add a sticker to an existing set.
    async fn add_sticker_to_set(
        &self,
        user_id: UserId,
        name: &str,
        sticker: InputSticker,
    ) -> Result<(), ApiError> {
        not_implemented!("add_sticker_to_set", user_id, name, sticker)
    }

    /// Move a sticker in its set to a specific position (0-indexed).
    async fn set_sticker_position_in_set(
        &self,
        sticker: &str,
        position: i32,
    ) -> Result<(), ApiError> {
        not_implemented!("set_sticker_position_in_set", sticker, position)
    }

    /// Delete a sticker from its set.
    async fn delete_sticker_from_set(&self, sticker: &str) -> Result<(), ApiError> {
        not_implemented!("delete_sticker_from_set", sticker)
    }

    /// Replace an existing sticker in a set with a new one.
    async fn replace_sticker_in_set(
        &self,
        user_id: UserId,
        name: &str,
        old_sticker: &str,
        sticker: InputSticker,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "replace_sticker_in_set",
            user_id,
            name,
            old_sticker,
            sticker
        )
    }

    /// Change the emoji list associated with a sticker.
    async fn set_sticker_emoji_list(
        &self,
        sticker: &str,
        emoji_list: Vec<String>,
    ) -> Result<(), ApiError> {
        not_implemented!("set_sticker_emoji_list", sticker, emoji_list)
    }

    /// Change search keywords for a sticker.
    async fn set_sticker_keywords(
        &self,
        sticker: &str,
        keywords: Vec<String>,
    ) -> Result<(), ApiError> {
        not_implemented!("set_sticker_keywords", sticker, keywords)
    }

    /// Change the mask position of a mask sticker.
    async fn set_sticker_mask_position(
        &self,
        sticker: &str,
        mask_position: Option<MaskPosition>,
    ) -> Result<(), ApiError> {
        not_implemented!("set_sticker_mask_position", sticker, mask_position)
    }

    /// Set the title of a sticker set.
    async fn set_sticker_set_title(&self, name: &str, title: &str) -> Result<(), ApiError> {
        not_implemented!("set_sticker_set_title", name, title)
    }

    /// Set the thumbnail of a sticker set.
    async fn set_sticker_set_thumbnail(
        &self,
        name: &str,
        user_id: UserId,
        thumbnail: Option<FileSource>,
        format: StickerFormat,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "set_sticker_set_thumbnail",
            name,
            user_id,
            thumbnail,
            format
        )
    }

    /// Set the thumbnail of a custom emoji sticker set.
    async fn set_custom_emoji_sticker_set_thumbnail(
        &self,
        name: &str,
        custom_emoji_id: Option<String>,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "set_custom_emoji_sticker_set_thumbnail",
            name,
            custom_emoji_id
        )
    }

    /// Delete a sticker set.
    async fn delete_sticker_set(&self, name: &str) -> Result<(), ApiError> {
        not_implemented!("delete_sticker_set", name)
    }

    /// Get stickers that can be used as forum topic icons.
    async fn get_forum_topic_icon_stickers(&self) -> Result<Vec<StickerInfo>, ApiError> {
        not_implemented!("get_forum_topic_icon_stickers",)
    }

    /// Set a group sticker set for a supergroup.
    async fn set_chat_sticker_set(
        &self,
        chat_id: ChatId,
        sticker_set_name: &str,
    ) -> Result<(), ApiError> {
        not_implemented!("set_chat_sticker_set", chat_id, sticker_set_name)
    }

    /// Delete a group sticker set from a supergroup.
    async fn delete_chat_sticker_set(&self, chat_id: ChatId) -> Result<(), ApiError> {
        not_implemented!("delete_chat_sticker_set", chat_id)
    }

    // ─── Games ───

    /// Send a game.
    async fn send_game(
        &self,
        chat_id: ChatId,
        game_short_name: &str,
        opts: SendOptions,
    ) -> Result<SentMessage, ApiError> {
        not_implemented!("send_game", chat_id, game_short_name, opts)
    }

    /// Set the score for a game.
    async fn set_game_score(
        &self,
        user_id: UserId,
        score: i64,
        chat_id: ChatId,
        message_id: MessageId,
        force: bool,
        disable_edit_message: bool,
    ) -> Result<(), ApiError> {
        not_implemented!(
            "set_game_score",
            user_id,
            score,
            chat_id,
            message_id,
            force,
            disable_edit_message
        )
    }

    /// Get game high scores for a user.
    async fn get_game_high_scores(
        &self,
        user_id: UserId,
        chat_id: ChatId,
        message_id: MessageId,
    ) -> Result<Vec<GameHighScore>, ApiError> {
        not_implemented!("get_game_high_scores", user_id, chat_id, message_id)
    }

    // ─── Inline Extras ───

    /// Set the result of an interaction with a Web App.
    async fn answer_web_app_query(
        &self,
        web_app_query_id: &str,
        result: InlineQueryResult,
    ) -> Result<SentWebAppMessage, ApiError> {
        not_implemented!("answer_web_app_query", web_app_query_id, result)
    }

    /// Store a message that can be sent by a user of a Mini App.
    async fn save_prepared_inline_message(
        &self,
        user_id: UserId,
        result: InlineQueryResult,
        allow_user_chats: Option<bool>,
        allow_bot_chats: Option<bool>,
        allow_group_chats: Option<bool>,
        allow_channel_chats: Option<bool>,
    ) -> Result<PreparedInlineMessage, ApiError> {
        not_implemented!(
            "save_prepared_inline_message",
            user_id,
            result,
            allow_user_chats,
            allow_bot_chats,
            allow_group_chats,
            allow_channel_chats
        )
    }

    // ─── Suggested Posts (Bot API 9.6+) ───

    /// Approve a suggested post in a channel managed by the bot.
    async fn approve_suggested_post(
        &self,
        chat_id: ChatId,
        message_id: MessageId,
    ) -> Result<(), ApiError> {
        not_implemented!("approve_suggested_post", chat_id, message_id)
    }

    /// Decline a suggested post in a channel managed by the bot.
    async fn decline_suggested_post(
        &self,
        chat_id: ChatId,
        message_id: MessageId,
    ) -> Result<(), ApiError> {
        not_implemented!("decline_suggested_post", chat_id, message_id)
    }

    // ─── Telegram Passport ───

    /// Inform a user that some of the Telegram Passport elements they provided contain errors.
    async fn set_passport_data_errors(
        &self,
        user_id: UserId,
        errors: Vec<PassportElementError>,
    ) -> Result<(), ApiError> {
        not_implemented!("set_passport_data_errors", user_id, errors)
    }
}