mirror of
https://github.com/InsanusMokrassar/TelegramBotAPI.git
synced 2025-11-16 12:00:18 +00:00
Compare commits
782 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bcd288fe05 | |||
| 75477060e9 | |||
| 60df609486 | |||
| 556b492b35 | |||
| 53e8c53fb1 | |||
| 69d36c5c1b | |||
| ad97008f12 | |||
| 3e58114eeb | |||
| d55d8fa000 | |||
| bd32dbb3ab | |||
| 8e0389f032 | |||
| cb37b85234 | |||
| df01976ea8 | |||
| 7be74e468b | |||
| 437176203a | |||
| 7b25862035 | |||
| 45585caab0 | |||
| 6fea2a12d8 | |||
| ae639d38e0 | |||
| 0510f72859 | |||
| 233c789054 | |||
| 52f405c3b1 | |||
| 199856acce | |||
| f36d642ec8 | |||
| aa6e5b2284 | |||
| 32b83ac687 | |||
| a2206b99a2 | |||
| 90e0b1ac81 | |||
| 1b5b3af45b | |||
| 7ff6412ec5 | |||
| bd23d3fbdb | |||
| 08147fc33b | |||
| ba4c153659 | |||
| 3c3607d817 | |||
| d0add888c4 | |||
| 3e3adab46b | |||
| 89d13de307 | |||
| 32451f4e1c | |||
| 721c3f2430 | |||
| fc92df8fbe | |||
| ad50f41d1e | |||
| 8c9cd9df67 | |||
| 8e7f7a03c8 | |||
| 484e09374d | |||
|
|
619c82bb32 | ||
| 33fb75a5eb | |||
| 901c1e8956 | |||
| 2ae105cb15 | |||
|
|
db14eee3b6 | ||
| 6f8b881668 | |||
| d113d4f0f5 | |||
| dd893b14d3 | |||
| 19ddff2999 | |||
| 7f08fd9d66 | |||
| d3cb44490b | |||
| 4d3cad16a4 | |||
| a52f31f4c9 | |||
| 682f696866 | |||
| 87fff2e5d0 | |||
| 92b4ba2ff0 | |||
| 9014cdbc99 | |||
| d0709a509f | |||
| 0273d07777 | |||
| bafb0c2459 | |||
| 9be2b899cb | |||
| 37317a1055 | |||
| 60c21002e1 | |||
| 78a7a3546a | |||
| 4799617ced | |||
| c70484076d | |||
| 9f451f25f7 | |||
| 506c2b4a09 | |||
| 0c92e6eeb4 | |||
| efd1c8f83a | |||
| 7e57a0e4e0 | |||
| 6b977e67d0 | |||
| ab5937449c | |||
| 61d3131bf2 | |||
| 048f244449 | |||
| 6ebf4ff652 | |||
| b4c41d7dd8 | |||
| 6cbe313e42 | |||
| 930507ab80 | |||
| 56d3628dd3 | |||
| 56d7853f68 | |||
| 0a27d9bf28 | |||
| c74df3960c | |||
| f4b080cb45 | |||
| 350b77f6ff | |||
| 955e14f67c | |||
| ae88b7d94d | |||
| 88c62bd51c | |||
| 705bcbe352 | |||
| ffcc149c40 | |||
| 402d91f9f2 | |||
| c19bccc7d1 | |||
| 2c71377058 | |||
| 12d2c05110 | |||
| ddf46c1afd | |||
| dd0a8b99c7 | |||
| 75fb72936f | |||
| 1a6a010446 | |||
| 900ef28404 | |||
| a930423955 | |||
| 323c4de858 | |||
| cdd5649c04 | |||
| 2275a61d73 | |||
| bf8f4c75f8 | |||
| b5334c2b72 | |||
| 8331d4edd7 | |||
| 0e6a708eea | |||
| fbc5e9f8c4 | |||
| 040a996df6 | |||
| cf27600fb5 | |||
| 1d42f86623 | |||
| a9cb07fa0d | |||
| dd7567f43c | |||
| d0006bb089 | |||
| 7d8b990ec4 | |||
| 4d20e2cd1c | |||
| 4ffe6f915f | |||
| 22a7697447 | |||
| ef9941134e | |||
| ba85b8657d | |||
| 2dcbc0df32 | |||
| 7bac4a3a32 | |||
| 63bcc4bcf8 | |||
| 643f8e577e | |||
| 721b82f912 | |||
| 892aef738d | |||
| 4c7bfe99c0 | |||
|
|
1e4b8d405e | ||
| 007112e67a | |||
| a87c21273d | |||
| ff2d1615da | |||
| 08ef146daa | |||
| a404a6c59c | |||
| 1089c716f3 | |||
| 81ad55b19f | |||
| 863c872f35 | |||
| ece6a917ed | |||
| 12248aa702 | |||
| 83ea4f6435 | |||
| 52204d8df1 | |||
| 81b9ccdf6a | |||
| fa74f12505 | |||
| be284c4d96 | |||
| 1769fcacfd | |||
| 4207d89c92 | |||
| 87ee2f280b | |||
| 3d458b2dc6 | |||
| ee1c7c6533 | |||
| 97d122c770 | |||
| 49da0faf45 | |||
| d426cb1210 | |||
| af83ac79e7 | |||
| 602f15c206 | |||
| c2f40534e6 | |||
| 5693d4d808 | |||
| 9fe55aa6ef | |||
| 8f817f1492 | |||
| 0fd146655d | |||
| 94e5f74a90 | |||
| b9bffbb71b | |||
| 5ec5c3bdfd | |||
| a5ed2a82bb | |||
| 1b7dd11e75 | |||
| 8d0307fb7f | |||
| c500f0a281 | |||
| b3abeaa5ae | |||
| 8930a66134 | |||
| 76a2a2ca74 | |||
| 7dff8af460 | |||
| 5261ab1cf0 | |||
| f45c653fca | |||
| 5e03098ca8 | |||
| 2a3d8e6e73 | |||
| 8c3dac7932 | |||
| 83fb7f7bcb | |||
| 459414e7dd | |||
| 508d51f5a9 | |||
| 36f22579b2 | |||
| d3d5f7f2e6 | |||
| 1369680419 | |||
| f6e819be62 | |||
| 553da0a3ee | |||
| bace2724da | |||
| be710612b5 | |||
| ea19c10f41 | |||
| 1b88881c62 | |||
| be62c4fe37 | |||
| d3499cdde1 | |||
| 01d04f9d2b | |||
| d290992e40 | |||
| 867bdb8bd7 | |||
| 5f0a67187f | |||
| d9638849e2 | |||
| 5568720b5b | |||
| c0c591fe08 | |||
| 3c1f8421c9 | |||
| 35b20d102c | |||
| 70e6dc8fc9 | |||
| 4f0de376ab | |||
| 10c52c695c | |||
| 2d2c745527 | |||
| 1238843bde | |||
| 1ebaa1c387 | |||
| b2bc47ec04 | |||
| 514620b2bd | |||
| 054f06e18b | |||
| 00d467d091 | |||
| 6426ed6571 | |||
| fba6707f44 | |||
| 0c2fe6bce7 | |||
| eee9fe439f | |||
| 3547c09383 | |||
| 956f02d26d | |||
| 468fc0a49b | |||
| 441f3cee3d | |||
| 1ea79b9f7f | |||
| 094f88867d | |||
| 85a8a8eedc | |||
| 28fce0b4c1 | |||
| 2f5fdcdca0 | |||
| 21799d7e4a | |||
| ca409db0ee | |||
| 33c8ee0803 | |||
| 0c0ec22348 | |||
| 24bffbbd97 | |||
| a615d1c4fd | |||
| a76b7977b3 | |||
| 6004879aef | |||
| 98ff2558e9 | |||
| 61c00b38b1 | |||
| 2096671147 | |||
| 094d58f59f | |||
| 578a66b758 | |||
| b5bb40576b | |||
| 953638ddf5 | |||
| 1c9ca7a493 | |||
| c220412b02 | |||
| 41852dde7c | |||
| 3150cd6a37 | |||
| 07de18efd8 | |||
| 9552550198 | |||
| e1c94f772d | |||
| fbed81a1b3 | |||
| b61912d99a | |||
| 5efe74171d | |||
| 393981560c | |||
| 73b355df55 | |||
| 86885e7698 | |||
| 4d9be1a995 | |||
| 596176ee93 | |||
| 2348434048 | |||
| 5c6a430f38 | |||
| 148791ad68 | |||
| 5c5a19c91a | |||
| bd60c4f411 | |||
| e5a36225f8 | |||
| bd2c13c178 | |||
| 6f1f94299b | |||
| 72b8231eab | |||
| 323e5fb391 | |||
| dca5bb40e3 | |||
| c21975a150 | |||
| 8675833b99 | |||
| faf669c035 | |||
| 2f3a683fa0 | |||
| 2a617b5c4d | |||
|
|
aa1e7eea1d | ||
| 22eac5414c | |||
| 8206aefbb6 | |||
| fb8cfed382 | |||
| 2de22a08a3 | |||
| e8022a2ded | |||
| d6cef5984b | |||
| 49bea1bcef | |||
| 85a4459072 | |||
| ce74631580 | |||
| 1e5ce6bb5c | |||
| dc89e914a1 | |||
| ee815c7335 | |||
| 69f4033807 | |||
| 0581587adf | |||
| 23f93075a4 | |||
| 6c3425d5f9 | |||
| d285590348 | |||
| 2e0ad6dd3c | |||
| 96a5e55894 | |||
| 4e3b085cdb | |||
| 8baa601af7 | |||
|
|
facd732fa8 | ||
| e19561367e | |||
| 249efeee7e | |||
| b8cc2421b6 | |||
| 2fa1a064ec | |||
| 63e864741e | |||
| e4f35c0eba | |||
| 944fe6d820 | |||
| 8ea50f36aa | |||
| 17308a6d99 | |||
| 6eabea2529 | |||
| ffe9166fee | |||
| f1be3e2819 | |||
| c4c016c438 | |||
| a85e7d7387 | |||
| fc59ab0cdd | |||
| 9ed7ded967 | |||
| a76a7ae630 | |||
| 4715eb424f | |||
| c24d536d4c | |||
| c969d88bf0 | |||
| 44e9dc9253 | |||
| 10c62bf2c7 | |||
| 20b1645935 | |||
| c5bf9ab1a2 | |||
| cd6d108a9a | |||
| 5369a85faa | |||
| 45a895f32f | |||
| 8c1d7203d2 | |||
| 7394a6e94b | |||
| a962838012 | |||
|
|
a5cc80a1eb | ||
| 064b6222e6 | |||
|
|
8d97057d2c | ||
|
|
78f006e280 | ||
| db956a803c | |||
| aeb131b2f4 | |||
| 6d80c2bddc | |||
| 6e32d4e863 | |||
| 6b62070447 | |||
| ad8710db92 | |||
| f385101e22 | |||
| 15386a63f9 | |||
| 576b25190a | |||
| dd979d8626 | |||
| e60eb68b67 | |||
| 91212eaa3a | |||
| 65c1f018ac | |||
| 5b13d3dded | |||
|
|
2447d3e51f | ||
|
|
4203a0fdfe | ||
| ddd32a81c0 | |||
| db7a42fa9b | |||
| 5e2df1cb4a | |||
| 21c0e375f5 | |||
| 4ac01d0104 | |||
| 9c15410c4e | |||
| c5ff0dbc54 | |||
| 19d221fc29 | |||
| 179a724d20 | |||
| ad9bc36f8c | |||
| 5a192b00d4 | |||
| 2a33b22afb | |||
| db1e01688d | |||
| 22e71354dd | |||
| 2e560db865 | |||
| 016fc81b71 | |||
| b6e72c2399 | |||
| e1e2b93269 | |||
| 834e31906a | |||
| 5831cc6d37 | |||
| 0cce72de8d | |||
| 3919359f79 | |||
| e51a4b7702 | |||
| 702c1bc1ff | |||
| 6557e8af10 | |||
| edcebb03c0 | |||
| 9a3fc19992 | |||
| 7f9faa69c8 | |||
| 5b98c5f821 | |||
| 40bd8d0987 | |||
| 2aa6497374 | |||
| b9cb7b62fa | |||
| 04679beb52 | |||
| 64e9289afb | |||
| d4f24ee0cd | |||
| 3e5d939ea5 | |||
| 24f91e4aee | |||
| fe169fafaf | |||
| aeb6fad409 | |||
| 94ad758814 | |||
| 5f01e26377 | |||
| f82ac0ce9d | |||
| c8491765e9 | |||
| 53a3e11836 | |||
| fcccbe3252 | |||
| 584bf06109 | |||
| ef0083079e | |||
| 0d01e9bc78 | |||
| 89aef3d77b | |||
| 24c47b00d4 | |||
| a046a72392 | |||
| a5a530c9bd | |||
| 9cf82a3564 | |||
| 46cc37be62 | |||
| 1fbaf396aa | |||
| 76985501f5 | |||
| 8d8bcfba01 | |||
| e0f3957249 | |||
| 3f1b018808 | |||
| 7af5ab17b7 | |||
| 0fec35f0dc | |||
| ee81f49a75 | |||
| 807952201b | |||
| 5d6ba0f59e | |||
| 3a61b522ab | |||
| 83304023a6 | |||
| f62e13aaca | |||
| ae1fb25336 | |||
| 4e3ea6cd80 | |||
| 148203eabf | |||
| 4465b573ca | |||
| f0dda60630 | |||
| 47135a1b65 | |||
| d8f830c60f | |||
| 226b8dee21 | |||
| a109771d20 | |||
| c028434f30 | |||
| d5c6ce32bb | |||
| d92cac5e07 | |||
| 9b21b5290c | |||
| 13ca63d27d | |||
| ad917dda1b | |||
| 7b1344e9c8 | |||
| c4fbd2f1c6 | |||
| c90bcea42c | |||
| e75c93d626 | |||
| 58dcbe8751 | |||
| 17806cde25 | |||
| f147a3d620 | |||
| 9eb6008a73 | |||
| f7d2c8bbd2 | |||
| f42cf78969 | |||
| 9a14932511 | |||
| 149ecf175b | |||
| 2049fea82a | |||
| 40d94cca70 | |||
| c8ad68ea69 | |||
| c66d64adbc | |||
| b475976ff1 | |||
| ea8db5b851 | |||
| af2fabf1ca | |||
| abc0457a36 | |||
| 8dbdbdee13 | |||
| 0c31379ff5 | |||
| 3b3cf81aaa | |||
| 1642075a75 | |||
| 760c9f2916 | |||
| 219238cf19 | |||
| 762087fc09 | |||
| 142fae1ede | |||
| 95abc72bf3 | |||
| 1d37a7446c | |||
| 7d35114b5d | |||
| 75f4226772 | |||
| 96d980cb8a | |||
| ed077ae1bc | |||
| 9540797ffc | |||
| 217b01994e | |||
| 6b89c94ef1 | |||
| e25ce57f6a | |||
| 530394fd15 | |||
| 3e891d50fd | |||
| adf5fd6288 | |||
| e7a2dc51aa | |||
| 399793243b | |||
| 3801025ff1 | |||
| 0ad2d9afc4 | |||
| a303700b56 | |||
| 42bf896f7a | |||
| 0bce522101 | |||
| 3c75d6a2c7 | |||
| 93eebe37ce | |||
| f893803939 | |||
| 0b92edc05e | |||
| 190d83b22b | |||
| 7ec4fc460a | |||
| 75cebf5aa3 | |||
| a241c91adf | |||
| 4f920abb61 | |||
| 6ba9a31fb9 | |||
| 65801f5104 | |||
| 9e82211473 | |||
|
|
560179a574 | ||
|
|
cffcf2277e | ||
|
|
cb9a20a9d1 | ||
|
|
45ea103c9a | ||
|
|
c00adb0784 | ||
|
|
38826a5e7e | ||
| b2915857d7 | |||
| 067e36adc6 | |||
|
|
12a35da4b6 | ||
|
|
022e6f623a | ||
|
|
30c138029e | ||
| 732e2a3906 | |||
| c5e089a45d | |||
|
|
919b1590e3 | ||
| 0c1017901f | |||
| fd6e4b0522 | |||
| 21c5d42dc2 | |||
| 77dff639f0 | |||
| 47fe048b10 | |||
| ee8cc2aa46 | |||
| b9de002517 | |||
| 449f2727c4 | |||
| 8712914126 | |||
| 69b64e9908 | |||
| 656bb68739 | |||
| 7f69052dea | |||
| b60fab4871 | |||
| bf28a8b0a6 | |||
| 85270dd12d | |||
| e39dd2d086 | |||
| e10d47b7e4 | |||
| 1e181bc042 | |||
| 61cf9936fb | |||
| 65fd3ced36 | |||
| 66d37b72eb | |||
| 55b1d3734d | |||
| 45b32fd6f7 | |||
| fcd8f20a90 | |||
| 18e6b9e471 | |||
| f5b248f534 | |||
| 3ebcbe2860 | |||
| 3829e04b0c | |||
| 39fa36426f | |||
| a265e5ecbf | |||
| 86e78c4ba0 | |||
| a6451ca394 | |||
| 521a3a8c35 | |||
| 173839c677 | |||
| bb7d47a33b | |||
| 5c0e58caec | |||
| 72c3623d30 | |||
| fe1831fc19 | |||
| 7825ec3010 | |||
| 12184cd2be | |||
| e90e25ab01 | |||
| 004ff0b490 | |||
| 07faba7d38 | |||
| e5584cd8b4 | |||
| 6acc9ef2b0 | |||
| 169fc0401a | |||
| dcfcea65cb | |||
| eedb36ede7 | |||
| eaee334ff6 | |||
| 5c694e8625 | |||
| 0306c40fb2 | |||
| fd915553e3 | |||
| ec1c0ba8bb | |||
| 12a64ec1d1 | |||
| 59d7a7c781 | |||
| cabfd7c76b | |||
| f12f52899c | |||
|
|
ed067db20f | ||
| b055268979 | |||
| 2584839d66 | |||
| 63946e860d | |||
| 90df436c63 | |||
| d3c8b49b10 | |||
| c1372b55bc | |||
| b6c7ece995 | |||
| 44e7c80f43 | |||
| 1e41e95333 | |||
| 03d4d715c0 | |||
| ab060d02ea | |||
| f447be02dc | |||
| eb923a6338 | |||
| 0914710cc7 | |||
| 1f7450844f | |||
| 167c214e35 | |||
| 42a8d649cd | |||
| eb3f180cc6 | |||
| 70f96ac8fa | |||
| d69b2e09d5 | |||
| 946b0222df | |||
| 7da315dbaf | |||
| 87071ca52c | |||
| b2770e3ecc | |||
| df63ccfe07 | |||
| 694bec22a2 | |||
| 6a3588bb8d | |||
| a26568aa29 | |||
| cd30660256 | |||
| 1846d20b0d | |||
| f13207064e | |||
| 61be689aca | |||
| 03f8d65bb6 | |||
| 2dc8beba8a | |||
| 5451adf4ac | |||
| 9982534001 | |||
| c0451d4c8f | |||
| a9d65944e6 | |||
| 39598dcb69 | |||
| 3069a6084c | |||
| e7bbce3fa7 | |||
| 0b361163f2 | |||
| 6aba2ff641 | |||
| 6b761ab37d | |||
| b9c8a89af9 | |||
| a42c5c63c4 | |||
| fc1a029acb | |||
| f90ae2f918 | |||
| 019b260888 | |||
| 0831f2fa75 | |||
| 32ae9d2b16 | |||
| b975a1b036 | |||
| f4b1e4a150 | |||
| 97031512d4 | |||
| 353df43109 | |||
| 4e55460834 | |||
| e2e235bd6c | |||
| 8ced95bc2f | |||
| 685e4af8f5 | |||
| 0b2f7a3899 | |||
| 112c86c9da | |||
| 1ddd138ff7 | |||
| 1a5d1cde78 | |||
| 5b620014cb | |||
| 80093cb5a9 | |||
| 9f8e8ee21b | |||
| 3de3bb6133 | |||
| 308fb9274b | |||
| d14ca7bbdc | |||
| dbdd9b5ad2 | |||
| 6dd27cb0bf | |||
| 210a52485b | |||
| 5c11b60ea6 | |||
| 60c3a0d7af | |||
| 8d777e1c0e | |||
| 4e019eb8bb | |||
| bd80562c2a | |||
| 9fc07f2ff3 | |||
| a4bae5133a | |||
| 7bb272f2fa | |||
| 72cf38d3bb | |||
| 0adee13cba | |||
| f9e3e57f24 | |||
| d7d4adc8e4 | |||
| e9b074a36c | |||
| 65cba0f014 | |||
| 36202133a1 | |||
| 66f7801b32 | |||
| e7265829d1 | |||
| 9ad5bfbc57 | |||
| aba62ba930 | |||
| 40d702a311 | |||
| 233d893b5a | |||
| 0faca5838c | |||
| 838f62aa84 | |||
| bc21a680bc | |||
| 8bb60bea34 | |||
| 8daadcff95 | |||
| 2a1e624641 | |||
| 696822db02 | |||
| ded501d963 | |||
| 86e506c33d | |||
| 9902b00e85 | |||
| 53524abcbb | |||
| 7639b15dc6 | |||
| 61b720c61f | |||
| baf4c74b69 | |||
| 367cfff2cb | |||
| 75e8d0f62d | |||
| c521a5f9a4 | |||
| c5513365c2 | |||
| d184ce7a0f | |||
| a3bff3f24d | |||
| a835b1dcbb | |||
| ffed2b80a5 | |||
| ff24b9f35b | |||
| 1287852334 | |||
| fc2f177e38 | |||
| 1efd4dce6e | |||
| 69b5a16b17 | |||
| 77b531ad06 | |||
| a98d5d9abd | |||
| 104653ac41 | |||
| 63337b8285 | |||
| 5cc0bbb31b | |||
| 563d784603 | |||
| 0d9f18f346 | |||
| 23ceaf8e97 | |||
| fe2dffd8b5 | |||
| eeb46817c3 | |||
| 5ab00da31d | |||
| 841ae73f7c | |||
| 41b4d29917 | |||
| f8b3c44146 | |||
| f0eb670c3f | |||
| fe5d94f31e | |||
| 7901d0a223 | |||
| 799f9123ba | |||
| f77f010e66 | |||
| 67ddf8d809 | |||
| 81afa46253 | |||
| a5bba76f07 | |||
| d882cf9c97 | |||
| 2e27b8b64d | |||
| 4df800eaa9 | |||
| 8d27349868 | |||
| 2a89c41a58 | |||
| 098b5cc393 | |||
| 10f4817283 | |||
| 4449893608 | |||
| 3a53f41f66 | |||
| 7cd366d893 | |||
| 1309a4111c | |||
| 0ca815760b | |||
| eca0680f2f | |||
| d472d371ed | |||
| 4748b6813a | |||
| a2ea15d4b0 | |||
| 27dc302f5d | |||
| baf8ed3a77 | |||
| 18913af3c3 | |||
| 51871ea94c | |||
| 6a625d7b9f | |||
| 0b93b472a3 | |||
| ff16f9a315 | |||
| 86bfe043a5 | |||
| fa18e7299d | |||
| c986025075 | |||
| e8a7ea9ce4 | |||
| 30f35e5488 | |||
| b626974ea7 | |||
| 128b782a27 | |||
| dc83b8d77a | |||
| 2aac6c0bde | |||
| b637d0d2a6 | |||
| d12cba2343 | |||
| 450c7e6474 | |||
| a35fb40a66 | |||
| 8731aa2c26 | |||
| 32e305537d | |||
| ec0a10e36e | |||
| 131ec4d6d5 | |||
| ecc608f51a | |||
| 040654f131 | |||
| 9e73d0c461 | |||
| d67c80bc99 | |||
| b0eef4f82d | |||
| fbe91a6321 | |||
| 15066c9d63 | |||
| e0bf67d8f9 | |||
| 1dc3ce2fb5 | |||
| 0c71133969 | |||
| 1359dd549f | |||
| c425e2ecc3 | |||
| 4d63e3a17d | |||
| d34deade0d | |||
| 2f52ad45a4 | |||
| 1d99e632a4 | |||
| cdcfaf5a29 | |||
| f3590762f3 | |||
| e0ff14b7fe | |||
| 9983e111ec | |||
| 08b8710772 | |||
| fc71e028c4 | |||
| 30a4a7bd8b | |||
| b973278b0a | |||
| ae2f4579e2 | |||
| a4bf6911c7 | |||
| 73b3daa68b | |||
| 09748615ae | |||
| 2dc8521aed | |||
| 81de59f37c | |||
| fb61a94c5e | |||
| 26fd5e51bf | |||
| c1ab9da4c4 | |||
| 6b414d64b0 | |||
| 5a3edc2b44 | |||
| 6dcdc2ab7f | |||
| a2ae4f71de | |||
| 5d87b86afe | |||
| ef22735894 | |||
| c0ea479fe3 | |||
| 0846e816e9 | |||
| d837c9d605 | |||
| d1993842c3 |
4
.github/FUNDING.yml
vendored
4
.github/FUNDING.yml
vendored
@@ -1,5 +1,3 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
patreon: InsanusMokrassar
|
||||
|
||||
custom: ['https://paypal.me/InsanusMokrassar?locale.x=ru_RU']
|
||||
custom: ['https://www.tinkoff.ru/rm/ovsyannikov.aleksey113/ObMJ712472']
|
||||
|
||||
11
.github/dependabot.yml
vendored
Normal file
11
.github/dependabot.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
# To get started with Dependabot version updates, you'll need to specify which
|
||||
# package ecosystems to update and where the package manifests are located.
|
||||
# Please see the documentation for all configuration options:
|
||||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "gradle" # See documentation for possible values
|
||||
directory: "/tgbotapi.core" # Location of package manifests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
8
.github/labeler.yml
vendored
8
.github/labeler.yml
vendored
@@ -1,6 +1,8 @@
|
||||
api: "TelegramBotAPI-extensions-api/**"
|
||||
utils: "TelegramBotAPI-extensions-utils/**"
|
||||
core: "TelegramBotAPI/**" # currently not work
|
||||
api: "TelegramBotAPI-api/**"
|
||||
utils: "TelegramBotAPI-utils/**"
|
||||
behaviour-builder: "TelegramBotAPI-behaviour_builder/**"
|
||||
behaviour-builder_fsm: "TelegramBotAPI-behaviour_builder-fsm/**"
|
||||
core: "TelegramBotAPI-core/**" # currently not work
|
||||
|
||||
code: "**/*.kt"
|
||||
gradle: "**/*.gradle"
|
||||
|
||||
21
.github/workflows/kdocs.yml
vendored
Normal file
21
.github/workflows/kdocs.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: Publish KDocs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
jobs:
|
||||
publishing:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Build
|
||||
run: ./gradlew dokkaHtml
|
||||
- name: Publish KDocs
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: ./docs/build/dokka/html
|
||||
publish_branch: kdocs
|
||||
1
.github/workflows/label.yml
vendored
1
.github/workflows/label.yml
vendored
@@ -12,6 +12,7 @@ on:
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.actor == github.repository_owner }}
|
||||
steps:
|
||||
- uses: actions/labeler@v2
|
||||
with:
|
||||
|
||||
24
.github/workflows/packages_publishing.yml
vendored
Normal file
24
.github/workflows/packages_publishing.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Publish package to GitHub Packages
|
||||
on: [push]
|
||||
jobs:
|
||||
publishing:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 11
|
||||
- name: Rewrite version
|
||||
run: |
|
||||
branch="`echo "${{ github.ref }}" | grep -o "[^/]*$"`"
|
||||
cat gradle.properties | sed -e "s/^library_version=\([0-9\.]*\)/library_version=\1-branch_$branch-build${{ github.run_number }}/" > gradle.properties.tmp
|
||||
rm gradle.properties
|
||||
mv gradle.properties.tmp gradle.properties
|
||||
- name: Build
|
||||
run: ./gradlew build
|
||||
- name: Publish
|
||||
continue-on-error: true
|
||||
run: ./gradlew publishAllPublicationsToGithubPackagesRepository --no-parallel
|
||||
env:
|
||||
GITHUBPACKAGES_USER: ${{ github.actor }}
|
||||
GITHUBPACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
||||
1
.github/write-good.yml
vendored
1
.github/write-good.yml
vendored
@@ -1 +0,0 @@
|
||||
spellchecker: true
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -10,4 +10,5 @@ build/
|
||||
out/
|
||||
|
||||
local.properties
|
||||
kotlin-js-store/
|
||||
secret.gradle
|
||||
|
||||
909
CHANGELOG.md
909
CHANGELOG.md
@@ -1,5 +1,914 @@
|
||||
# TelegramBotAPI changelog
|
||||
|
||||
## 1.0.1
|
||||
|
||||
* `Versions`:
|
||||
* `Serialization`: `1.3.2` -> `1.3.3`
|
||||
* `MicroUtils`: `0.10.3` -> `0.10.4`
|
||||
|
||||
## 1.0.0
|
||||
|
||||
__All the `tgbotapi.extensions.*` packages have been removed__
|
||||
|
||||
* `Versions`:
|
||||
* `Kotlin`: `1.6.10` -> `1.6.21`
|
||||
* `Ktor`: `1.6.8` -> `2.0.1`
|
||||
* `MicroUtils`: `0.9.24` -> `0.10.3`
|
||||
* `Core`:
|
||||
* **`Ktor` package renamed. Migration:** `dev.inmo.tgbotapi.bot.Ktor` -> `dev.inmo.tgbotapi.bot.ktor`
|
||||
* **`CallbackQuery` package renamed. Migration:** `dev.inmo.tgbotapi.types.CallbackQuery([\s\\.])` -> `dev.inmo.tgbotapi.types.queries.callback$1`
|
||||
* **`ChatMember` package renamed. Migration:** `dev.inmo.tgbotapi.types.ChatMember([\s\\.])` -> `dev.inmo.tgbotapi.types.chat.member$1`
|
||||
* **`ChatAdministratorRightsImpl` replaced. Migration:** `dev.inmo.tgbotapi.types.ChatAdministratorRightsImpl` -> `dev.inmo.tgbotapi.types.chat.member.ChatAdministratorRightsImpl`
|
||||
* **`chat.abstract.extended` replaced. Migration:** `dev.inmo.tgbotapi.types.chat.abstract.extended` -> `dev.inmo.tgbotapi.types.chat.member.chat`
|
||||
* **`chat.abstract` replaced. Migration:** `dev.inmo.tgbotapi.types.chat.abstract` -> `dev.inmo.tgbotapi.types.chat.member.chat`
|
||||
* **`chat.extended` replaced. Migration:** `dev.inmo.tgbotapi.types.chat.extended` -> `dev.inmo.tgbotapi.types.chat.member.chat`
|
||||
* **User interfaces have been fully replaced**:
|
||||
* `dev.inmo.tgbotapi.types.User` -> `dev.inmo.tgbotapi.types.chat.User`
|
||||
* `dev.inmo.tgbotapi.types.CommonUser` -> `dev.inmo.tgbotapi.types.chat.CommonUser`
|
||||
* `dev.inmo.tgbotapi.types.ExtendedUser` -> `dev.inmo.tgbotapi.types.chat.ExtendedUser`
|
||||
* `dev.inmo.tgbotapi.types.Bot` -> `dev.inmo.tgbotapi.types.chat.Bot`
|
||||
* `dev.inmo.tgbotapi.types.CommonBot` -> `dev.inmo.tgbotapi.types.chat.CommonBot`
|
||||
* `dev.inmo.tgbotapi.types.ExtendedBot` -> `dev.inmo.tgbotapi.types.chat.ExtendedBot`
|
||||
* `dev.inmo.tgbotapi.types.UserSerializer` -> `dev.inmo.tgbotapi.types.chat.UserSerializer`
|
||||
* **All `InputMedia` has been renamed as `TelegramMedia`. Migration:** `InputMedia` -> `TelegramMedia`
|
||||
* `dev.inmo.tgbotapi.types.InputMedia` -> `dev.inmo.tgbotapi.types.media`
|
||||
* **Replaces of `MessageContent`. Migrations:**
|
||||
* `dev.inmo.tgbotapi.types.message.content.abstracts` -> `dev.inmo.tgbotapi.types.message.content`
|
||||
* `dev.inmo.tgbotapi.types.message.content.media` -> `dev.inmo.tgbotapi.types.message.content`
|
||||
* **Replaces of `TextSource`s. Migrations:** `dev.inmo.tgbotapi.types.MessageEntity.textsources` -> `dev.inmo.tgbotapi.types.message.textsources`
|
||||
* **Replaces of `ParseMode`s. Migrations:** `dev.inmo.tgbotapi.types.ParseMode` -> `dev.inmo.tgbotapi.types.message`
|
||||
* **Replaces of `MediaGroupUpdate`s. Migrations:** `dev.inmo.tgbotapi.types.update.MediaGroupUpdates` -> `dev.inmo.tgbotapi.types.update.media_group`
|
||||
* **`InvoiceContent` has been replaced: `dev.inmo.tgbotapi.types.message.payments.InvoiceContent` -> `dev.inmo.tgbotapi.types.message.content.InvoiceContent`**
|
||||
* **`PossiblySentViaBotCommonMessage` has been replaced: `dev.inmo.tgbotapi.types.message.content.abstracts.PossiblySentViaBotCommonMessage` -> `dev.inmo.tgbotapi.types.message.abstracts.PossiblySentViaBotCommonMessage`**
|
||||
* **Edit live location requests have been replaced:**
|
||||
* `dev.inmo.tgbotapi.requests.edit.LiveLocation` -> `dev.inmo.tgbotapi.requests.edit.location.live`
|
||||
* `dev.inmo.tgbotapi.extensions.api.edit.LiveLocation` -> `dev.inmo.tgbotapi.extensions.api.edit.location.live`
|
||||
* **Edit reply markup requests have been replaced:**
|
||||
* `dev.inmo.tgbotapi.requests.edit.ReplyMarkup` -> `dev.inmo.tgbotapi.requests.edit.reply_markup`
|
||||
* `dev.inmo.tgbotapi.extensions.api.edit.ReplyMarkup` -> `dev.inmo.tgbotapi.extensions.api.edit.reply_markup`
|
||||
* **Common abstracts have been replaced: `dev.inmo.tgbotapi.CommonAbstracts` -> `dev.inmo.tgbotapi.abstracts`**
|
||||
* Constructor of `UnknownInlineKeyboardButton` is not internal and can be created with any `json` ([#563](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/563))
|
||||
* All the interfaces from `dev.inmo.tgbotapi.types.files.abstracts` have been replaced to `dev.inmo.tgbotapi.types.files` and converted to sealed ([#550](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/550))
|
||||
* `PassportFile` has been replaced to `dev.inmo.tgbotapi.types.files`
|
||||
* `StorageFile` has been deprecated (fix of [#556](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/556))
|
||||
* `MultipartFile` do not require `StorageFile` anymore
|
||||
* `InputFile` companion got functions to simplify creation of `InputFile`s
|
||||
* New typealias `FileUrl` (represents `FileId` but declare that they are the same)
|
||||
* `BehaviourBuilder`:
|
||||
* `SimpleFilter` now is a `fun interface` instead of just callback (fix of [#546](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/546))
|
||||
* New extension `BehaviourContext#createSubContext`. It uses separated `AccumulatorFlow` and will retrieve updates by itself
|
||||
* New extension `BehaviourContext#doInContext`
|
||||
* Extension `BehaviourContext#doInSubContextWithUpdatesFilter` has been renamed to `BehaviourContext#createSubContextAndDoWithUpdatesFilter`
|
||||
* Extension `BehaviourContext#doInSubContext` has been deprecated
|
||||
* `BehaviourContextWithFSM`:
|
||||
* `launchStateHandling` lost its parameter `contextUpdatesFlow: Flow`
|
||||
* `handleState` of `BehaviourContextWithFSM` now will get/create sub context for the state and launch handling in it
|
||||
* `BehaviourWithFSMStateHandler` now extends `StatesHandler`
|
||||
* `BehaviourWithFSMStateHandlerHolder` now extends `CheckableHandlerHolder` and `BehaviourWithFSMStateHandler`
|
||||
* Function `checkHandleable` of `BehaviourWithFSMStateHandlerHolder` now is `suspend`
|
||||
|
||||
## 0.38.23
|
||||
|
||||
* `BehaviourHandler`:
|
||||
* Add support of fallback triggers (fix of [#560](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/560))
|
||||
|
||||
## 0.38.22
|
||||
|
||||
* `Core`:
|
||||
* New constant `tgWebAppStartParamField`
|
||||
* All keyboards builders and rows blocks becomes not crossinline
|
||||
|
||||
## 0.38.21
|
||||
|
||||
* `WebApps`:
|
||||
* `WebAppInitData#queryId` now have correct js name of field
|
||||
* New function `sendDataOrWorkWithQueryId`
|
||||
|
||||
## 0.38.20
|
||||
|
||||
* `BehaviourBuilder FSM`:
|
||||
* Hotfixes
|
||||
* `WebApps`:
|
||||
* New extension `TelegramBot#answerWebAppQuery`
|
||||
* New function `handleResult`
|
||||
|
||||
## 0.38.19
|
||||
|
||||
* `BehaviourBuilder`:
|
||||
* Hotfixes
|
||||
* `BehaviourBuilder FSM`:
|
||||
* `BehaviourContextWithFSMBuilder` deprecated in favor to `BehaviourContextWithFSM`
|
||||
* Now it is possible to define additional handlers in subcontexts of `BehaviourBuilderWithFSM`
|
||||
|
||||
## 0.38.18
|
||||
|
||||
* `Core`:
|
||||
* Add support of test servers (fix of [#577](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/577))
|
||||
* `BehaviourBuilder`:
|
||||
* Fixes in extension `BehaviourContext#doInSubContextWithUpdatesFilter` (thanks to [xzima](https://github.com/xzima))
|
||||
|
||||
## 0.38.17
|
||||
|
||||
* `Core`:
|
||||
* Add `BotCommandScopeChat` as new `BotCommandScope` (fix of [#574](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/574))
|
||||
* `BotCommandScope` companion got several properties and functions for more useful scope creation
|
||||
|
||||
## 0.38.16
|
||||
|
||||
* `Core`:
|
||||
* `TelegramAPIUrlsKeeper` now have two new things: properties `webAppDataSecretKey` and fun `checkWebAppLink`
|
||||
|
||||
## 0.38.15
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.9.20` -> `0.9.24`
|
||||
* `Core`:
|
||||
* Fixes in `MessageContent#serializationModule`
|
||||
* `BehaviourBuilder`:
|
||||
* Add triggers for `DataCallbackQuery` and subtypes with regex checking of data
|
||||
|
||||
## 0.38.14
|
||||
|
||||
__This update contains including of [Telegram Bot API 6.0](https://core.telegram.org/bots/api-changelog#april-16-2022)__
|
||||
|
||||
* `Core`:
|
||||
* Constructor of `UnknownInlineKeyboardButton` is not internal and can be created with any `json`
|
||||
* `WebApps`:
|
||||
* Created 🎉
|
||||
|
||||
## 0.38.13
|
||||
|
||||
* `Core`:
|
||||
* Fixes in `mention` creation
|
||||
* Deprecate `StorageFileInfo`
|
||||
* `BehaviourBuilder`:
|
||||
* In the expectations a lot of `on*Message` extensions have been added (like `onContentMessage`). These extensions could be useful when with the `Content` its message info is important
|
||||
|
||||
## 0.38.12
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.9.17` -> `0.9.19`
|
||||
* `Coroutines`: `1.6.0` -> `1.6.1`
|
||||
* `Core`:
|
||||
* New type `TextedMediaContent` which will unite `TextedInput` and `MediaContent`
|
||||
* `MediaGroupContent` and all subsequent inheritors have been replaced to the package `dev.inmo.tgbotapi.types.message.content.media`
|
||||
* `MediaGroupContent` Now extends `TextedMediaContent` instead of `MediaContent`
|
||||
* Add `reply` functions with the texted content with including of text
|
||||
* `Utils`:
|
||||
* Improve work with retrieving of accumulated updates
|
||||
|
||||
## 0.38.11
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.9.16` -> `0.9.17`
|
||||
* `Klock`: `2.6.3` -> `2.7.0`
|
||||
* `Core`:
|
||||
* Fixes in `TextSourcesList` creating in from `RawMessageEntities`
|
||||
* Old ways to create keyboards (`matrix` and `row`) have been deprecated
|
||||
* `API`:
|
||||
* Add ability to `reply` with `Poll`
|
||||
* Add ability to `reply` with any `MessageContent`
|
||||
* Add ability to `reply` with any `TelegramMediaFile`
|
||||
|
||||
## 0.38.10
|
||||
|
||||
* `API`:
|
||||
* All `with*Action` extensions got a contracts which declare that `block` will be called once
|
||||
* Add several extensions `TelegramBot#sendPhoto` with `PhotoSize`
|
||||
* Add several extensions `TelegramBot#reply` with `PhotoSize`
|
||||
|
||||
## 0.38.9
|
||||
|
||||
* `Core`:
|
||||
* New function `MessageContent.Companion#serializationModule`
|
||||
* Now it is possible to create `TelegramBot` (`RequestsExecutor`) with several bots under the hood and opportunity
|
||||
for bots requests load balancing or fault-fix via sending of the requests via another bot
|
||||
* `API`:
|
||||
* Add replies which will use another message as a source for reply (`copyMessage`)
|
||||
|
||||
## 0.38.8
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.9.12` -> `0.9.16`
|
||||
* `Klock`: `2.6.2` -> `2.6.3`
|
||||
* `Ktor`: `1.6.7` -> `1.6.8`
|
||||
* `BehaviourBuilder`:
|
||||
* Fixes in `onMediaGroup` and dependent functions
|
||||
* Add several new extensions for `SimpleFilter`:
|
||||
* `SimpleFilter#listAll`
|
||||
* `SimpleFilter#listAny`
|
||||
* `SimpleFilter#listNone`
|
||||
|
||||
## 0.38.7
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.9.9` -> `0.9.12`
|
||||
* `Klock`: `2.5.2` -> `2.6.2`
|
||||
* `Core`:
|
||||
* `SimplePollOption#votes` now is `0` by default
|
||||
* New function `PollOption.Companion#simple`
|
||||
|
||||
## 0.38.6
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.9.6` -> `0.9.9`
|
||||
* `Klock`: `2.4.13` -> `2.5.2`
|
||||
* `Core`:
|
||||
* New member of `MentionTextSource` - `username`
|
||||
|
||||
## 0.38.5
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.9.5` -> `0.9.6`
|
||||
* `Core`:
|
||||
* `Username` got new property `usernameWithoutAt` which will return `username` without leading `@`
|
||||
* `Utils`:
|
||||
* Several new functions for working with deep links:
|
||||
* `makeUsernameDeepLinkPrefix`
|
||||
* `makeTelegramDeepLink`
|
||||
* `makeDeepLink`
|
||||
|
||||
## 0.38.4
|
||||
|
||||
__This update contains including of [Telegram Bot API 5.7](https://core.telegram.org/bots/api-changelog#january-31-2022)__
|
||||
|
||||
* `Core`:
|
||||
* Support of new fields `Sticker`
|
||||
* Support of new fields `StickerSet`
|
||||
* Support of new fields in creating of sticker set and sticker
|
||||
* `Utils`:
|
||||
* Rename `PathedFile` to avoid clash with core file (fix of [#529](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/529))
|
||||
|
||||
## 0.38.3
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.9.1` -> `0.9.2`
|
||||
* `Klock`: `2.4.10` -> `2.4.12`
|
||||
* `UUID`: `0.3.1` -> `0.4.0`
|
||||
* `API`
|
||||
* New extensions `TelegramBot#send*` for media groups with contents
|
||||
|
||||
## 0.38.2
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.9.0` -> `0.9.1`
|
||||
* `API`
|
||||
* New extensions `TelegramBot#copyMessages` for media groups
|
||||
|
||||
## 0.38.1
|
||||
|
||||
* `Core`:
|
||||
* `MessageCallbackQuery` (and all implementers as well) has changed the type of `message`: now it is `ContentMessage<MessageContent>` instead of `Message`
|
||||
* New type `ForwardFromPublicChatInfo` as extender of `ForwardInfo`:
|
||||
* `ForwardFromChannelInfo` now extends `ForwardFromPublicChatInfo`
|
||||
* `ForwardFromSupergroupInfo` now extends `ForwardFromPublicChatInfo`
|
||||
* New type of events: `UserLoggedIn`
|
||||
* `Utils`:
|
||||
* ([#511](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/511)) New extensions properties (raw fields as in original API) for several types have been added:
|
||||
* `Message`
|
||||
* `CallbackQuery`
|
||||
* `ChosenInlineResult`
|
||||
* `InlineQuery`
|
||||
* `Poll`
|
||||
|
||||
## 0.38.0
|
||||
|
||||
_This update contains [Telegram Bot API 5.6](https://core.telegram.org/bots/api-changelog#december-30-2021) implementation_
|
||||
|
||||
_This update contains migration onto Kotlin 1.6_
|
||||
|
||||
_This update has changed constructors of all `CommonMessage` implementations_
|
||||
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Kotlin`: `1.5.31` -> `1.6.10`
|
||||
* `Coroutines`: `1.5.2` -> `1.6.0`
|
||||
* `Serialization`: `1.3.1` -> `1.3.2`
|
||||
* `Klock`: `2.4.8` -> `2.4.10`
|
||||
* `Ktor`: `1.6.5` -> `1.6.7`
|
||||
* `MicroUtils`: `0.8.7` -> `0.9.0`
|
||||
* `Core`:
|
||||
* Add `SpoilerTextSource` (as part of `Telegram Bot API 5.6` update)
|
||||
* Add support of `protect_content` as a field `protectContent` in all send message requests and parameter in all
|
||||
functions related to that requests (as part of `Telegram Bot API 5.6` update)
|
||||
* **ALL IMPLEMENTERS OF `CommonMessage` HAS CHANGED THEIR CONSTRUCTOR: NOW THEY GET `hasProtectedContent` instead of
|
||||
`forwardable` (inversed) field**
|
||||
* `ChannelContentMessageImpl`
|
||||
* `ChannelMediaGroupMessage`
|
||||
* `CommonMediaGroupMessage`
|
||||
* `GroupContentMessage` implementers
|
||||
* `ConnectedFromChannelGroupContentMessageImpl`
|
||||
* `UnconnectedFromChannelGroupContentMessageImpl`
|
||||
* `AnonymousGroupContentMessageImpl`
|
||||
* `CommonGroupContentMessageImpl`
|
||||
* `PrivateContentMessageImpl`
|
||||
|
||||
## 0.37.4
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.8.7` -> `0.8.9`
|
||||
* `Core`:
|
||||
* New `SupergroupEvent` subtype: `MigratedToSupergroup`. This event is sent when a group is converted to a supergroup while bot is in the group.
|
||||
* Helper extenstion functions on `ChatEvent` to cast it to `MigratedToSupergroup`.
|
||||
|
||||
## 0.37.3 Hotfix of 0.37.2
|
||||
|
||||
* `Core`:
|
||||
* Fixes in hierarchy (and creating) of messages from channels
|
||||
|
||||
---
|
||||
|
||||
`0.37.2` changelog:
|
||||
|
||||
_This update contains [Telegram Bot API 5.5](https://core.telegram.org/bots/api-changelog#december-7-2021) implementation_
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.8.2` -> `0.8.7`
|
||||
* `Core`:
|
||||
* New request type: `ChatSenderRequest`
|
||||
* New request `BanChatSenderChat`
|
||||
* New request `UnbanChatSenderChat`
|
||||
* `ExtendedPrivateChat` got new properties: `hasPrivateForwards` and `allowCreateUserIdLink` (same as `hasPrivateForwards`)
|
||||
* All `ContentMessage` got field `forwardable` (old constructors marked as `Deprecated`)
|
||||
* `FromChannelGroupContentMessage` has been divided for two interfaces (and corresponding classes):
|
||||
* `ConnectedFromChannelGroupContentMessage` (and `ConnectedFromChannelGroupContentMessageImpl`) for connected to the group channels messages
|
||||
* `UnconnectedFromChannelGroupContentMessage` (and `UnconnectedFromChannelGroupContentMessageImpl`) for unconnected channels
|
||||
* `API`:
|
||||
* New extensions `TelegramBot#banChatSenderChat`
|
||||
* New extensions `TelegramBot#unbanChatSenderChat`
|
||||
* `Utils`:
|
||||
* Fix of `EntitiesBuilder#linkln`
|
||||
|
||||
## 0.37.2 Telegram Bot API 5.5
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.8.2` -> `0.8.7`
|
||||
* `Core`:
|
||||
* New request type: `ChatSenderRequest`
|
||||
* New request `BanChatSenderChat`
|
||||
* New request `UnbanChatSenderChat`
|
||||
* `ExtendedPrivateChat` got new properties: `hasPrivateForwards` and `allowCreateUserIdLink` (same as `hasPrivateForwards`)
|
||||
* All `ContentMessage` got field `forwardable` (old constructors marked as `Deprecated`)
|
||||
* `ChannelContentMessage` has been divided for two interfaces (and corresponding classes):
|
||||
* `ConnectedChannelContentMessage` (and `ConnectedChannelContentMessageImpl`) for connected to the group channels messages
|
||||
* `UnconnectedChannelContentMessage` (and `UnconnectedChannelContentMessageImpl`) for unconnected channels
|
||||
* `API`:
|
||||
* New extensions `TelegramBot#banChatSenderChat`
|
||||
* New extensions `TelegramBot#unbanChatSenderChat`
|
||||
* `Utils`:
|
||||
* Fix of `EntitiesBuilder#linkln`
|
||||
|
||||
## 0.37.1
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Serialization`: `1.3.0` -> `1.3.1`
|
||||
* `Klock`: `2.4.7` -> `2.4.8`
|
||||
* `MicroUtils`: `0.8.1` -> `0.8.2`
|
||||
|
||||
## 0.37.0 Telegram Bot API 5.4
|
||||
|
||||
**ALL DEPRECATIONS WERE REMOVED**
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Klock`: `2.4.6` -> `2.4.7`
|
||||
* `Ktor`: `1.6.4` -> `1.6.5`
|
||||
* `MicroUtils`: `0.7.3` -> `0.8.1`
|
||||
* `Core`:
|
||||
* Replacement of simple `CreateChatInviteLink` and `EditChatInviteLink` with several new:
|
||||
* `CreateChatInviteLinkSimple`
|
||||
* `CreateChatInviteLinkWithLimitedMembers`
|
||||
* `CreateChatInviteLinkWithJoinRequest`
|
||||
* `EditChatInviteLinkSimple`
|
||||
* `EditChatInviteLinkWithLimitedMembers`
|
||||
* `EditChatInviteLinkWithJoinRequest`
|
||||
* New `BotAction`: `ChooseStickerAction`
|
||||
* Now requester will throw exceptions related to responses decoding directly instead of wrapping in
|
||||
`RequestException`
|
||||
*
|
||||
* `BehaviourBuilder FSM`:
|
||||
* **Incompatible changes** (now generics are used in state machines)
|
||||
* `strictlyOn` and `onStateOrSubstate` now are part of `BehaviourContextWithFSMBuilder`
|
||||
|
||||
## 0.36.1
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.7.2` -> `0.7.3`
|
||||
* `API`:
|
||||
* Fix `getMyCommands` overloads conflict when no arguments provided
|
||||
* `Utils`:
|
||||
* `buildEntities` DSL now have parameter `separator` to specify `TextSource` that will be inserted between other sources
|
||||
|
||||
## 0.36.0
|
||||
|
||||
**ALL PREVIOUS DEPRECATIONS HAVE BEEN REMOVED**
|
||||
**ALL EXTENSION PACKAGES HAS BEEN RENAMES**. Old packages are still available, but will be removed in next major update:
|
||||
|
||||
* `tgbotapi.extensions.api` -> `tgbotape.api`
|
||||
* `tgbotapi.extensions.utils` -> `tgbotape.utils`
|
||||
* `tgbotapi.extensions.behaviour_builder` -> `tgbotape.behaviour_builder`
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Serialization`: `1.2.2` -> `1.3.0`
|
||||
* `MicroUtils`: `0.5.28` -> `0.7.2`
|
||||
* `Klock`: `2.4.3` -> `2.4.6`
|
||||
* `Ktor`: `1.6.3` -> `1.6.4`
|
||||
* `Core`:
|
||||
* `PrivateContentMessageImpl#paymentInfo` now is deprecated and will always be null
|
||||
* `PayInlineKeyboardButton#pay` now is deprecated
|
||||
* `RowBuilder` and `MatrixBuilder` now are open and available for extending
|
||||
* `MatrixBuilder#matrix` will return read-only new list instead of original internal `mutMatrix`
|
||||
* Introduced new type of events `SuccessfulPaymentEvent` instead of putting of payment inside of message
|
||||
* New type of events union: `PublicChatEvent`. `CommonEvent` is still union of any `ChatEvent`
|
||||
* New `AbstractFlowsUpdatesFilter` with default `lazy` realization for all typed flows
|
||||
* `FlowsUpdatesFilter` fun now have `onBufferOverflow` and `upstreamUpdatesFlow` as incoming params
|
||||
* `DefaultFlowsUpdatesFilter` now use additional `upstreamUpdatesFlow` as source of updates
|
||||
* `Utils`:
|
||||
* Two new dsl:
|
||||
* `inlineKeyboard` for creating `InlineKeyboardMarkup`
|
||||
* `replyKeyboard` for creating `ReplyKeyboardMarkup`
|
||||
* Cast helpers for `Message` (thanks to [madhead](https://github.com/madhead)):
|
||||
* `asPossiblyReplyMessage`: tries to cast a `Message` to `PossiblyReplyMessage`, returns `null` if the message is not of that type
|
||||
* `requirePossiblyReplyMessage`: casts a `Message` to `PossiblyReplyMessage`, fails if the message is not of that type
|
||||
* `whenPossiblyReplyMessage`: tries to cast a `Message` to `PossiblyReplyMessage` and runs the given block of code with it, if the cast is successful
|
||||
* New type `WithUser` for unioning of all types with `user`
|
||||
* `FromUser` now extends `WithUser`
|
||||
* Cast helpers for type `WithUser`: `asWithUser`, `whenWithUser`, `requireWithUser`
|
||||
* `Behaviour Builder`:
|
||||
* New expecters and waiters:
|
||||
* `waitShippingQueries`/`onShippingQuery`
|
||||
* `waitPreCheckoutQueries`/`onPreCheckoutQuery`
|
||||
* `waitChosenInlineResult`/`onChosenInlineResult`
|
||||
* `waitPollUpdates`/`onPollUpdates`
|
||||
* `Behaviour Builder FSM extension`:
|
||||
* See [Difference between old Behaviour Builder and new one with FSM](https://telegra.ph/Difference-between-old-Behaviour-Builder-and-new-one-with-FSM-10-18)
|
||||
|
||||
## 0.35.9
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Kotlin`: `1.5.30` -> `1.5.31`
|
||||
* `Klock`: `2.4.1` -> `2.4.2`
|
||||
* `MicroUtils`: `0.5.25` -> `0.5.28`
|
||||
* `Core`:
|
||||
* New `BotAction` implementation - `CustomBotAction`
|
||||
* `LocationContent` has been divided to two different types: `LiveLocationContent` and `StaticLocationContent`
|
||||
* `API`:
|
||||
* Two new extensions: `TelegramBot#answer` with `CallbackQuery` and `InlineQuery`
|
||||
* `Behaviour Builder`:
|
||||
* All triggers have been changed to use two filters: filter for in subcontext data and filter for incoming data
|
||||
* New waiters for edited content
|
||||
* New extension `BehaviourContext#followLocation`
|
||||
* New factory-functions:
|
||||
* `BehaviourContextReceiver`
|
||||
* `BehaviourContextAndTypeReceiver`
|
||||
* `BehaviourContextAndTwoTypesReceiver`
|
||||
* Old API for triggers with the flags like `includeFilterByChatInBehaviourSubContext` have been deprecated
|
||||
|
||||
## 0.35.8
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.5.24` -> `0.5.25`
|
||||
* `UUID`: `0.3.0` -> `0.3.1`
|
||||
* `Core`:
|
||||
* `MultipartRequestCallFactory` now will use file name as multipart `filename` parameter instead of generated file id
|
||||
* New extension `MPPFile#asMultipartFile`
|
||||
* `API`
|
||||
* Fixes in `TelegramBot#withAction`
|
||||
* `Behaviour Builder`:
|
||||
* New extensions `BehaviourContext#commandWithArgs` and `BehaviourContext#onCommandWithArgs`
|
||||
|
||||
## 0.35.7
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Kotlin`: `1.5.21` -> `1.5.30`
|
||||
* `Klock`: `2.3.3` -> `2.4.1`
|
||||
* `Ktor`: `1.6.2` -> `1.6.3`
|
||||
* `Coroutines`: `1.5.1` -> `1.5.2`
|
||||
* `MicroUtils`: `0.5.21` -> `0.5.24`
|
||||
|
||||
## 0.35.6
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Klock`: `2.3.1` -> `2.3.3`
|
||||
* `MicroUtils`: `0.5.19` -> `0.5.21`
|
||||
* `Core`:
|
||||
* All `FlowsUpdatesFilter` flows have been renamed and updated
|
||||
* `Utils`:
|
||||
* Extensions `allSentMessagesFlow` and `allSentMediaGroupsFlow` have been deprecated
|
||||
|
||||
## 0.35.5
|
||||
|
||||
**MIME TYPES FOR REQUESTS HAVE BEEN DEPRECATED DUE TO REDUNDANCY OF MIME TYPES IN FILES SENDING**
|
||||
|
||||
* `Core`:
|
||||
* Several new extensions `ByteReadChannel#asStorageFile` and `ByteReadChannelAllocator#asStorageFile`
|
||||
* Several new extensions `ByteArray#asMultipartFile`, `ByteReadChannel#asMultipartFile` and
|
||||
`ByteReadChannelAllocator#asMultipartFile`
|
||||
* New extension `StorageFile#asMultipartFile`
|
||||
* `API`:
|
||||
* New extensions `TelegramBot#downloadFile` for writing of incoming bytes to the file
|
||||
* New extensions `TelegramBot#downloadFileStream` and `TelegramBot#downloadFileStreamAllocator` for getting of input
|
||||
streams instead of whole bytes arrays
|
||||
* Old extensions `TelegramBot#downloadFile` has been replaced to the new package. Migration: replace in your project
|
||||
`import dev.inmo.tgbotapi.extensions.api.downloadFile` with `import dev.inmo.tgbotapi.extensions.api.files.downloadFile`
|
||||
* `PathedFile#filename` extension has been deprecated, and new property `PathedFile#fileName` has been included
|
||||
directly in `PathedFile`
|
||||
* `Utils`:
|
||||
* Add several functions `convertToStorageFile` and extensions `TelegramBot#convertToStorageFile`
|
||||
|
||||
## 0.35.4 Hotfix
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.5.18` -> `0.5.19`
|
||||
|
||||
## 0.35.3
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Klock`: `2.2.0` -> `2.3.1`
|
||||
* `Ktor`: `1.6.1` -> `1.6.2`
|
||||
* `MicroUtils`: `0.5.16` -> `0.5.18`
|
||||
* `Core`:
|
||||
* **`SimpleRequestCallFactory` and `MultipartRequestCallFactory` became a classes instead of objects to avoid
|
||||
collisions in different bots**
|
||||
* Support of strongly-typed ietf language codes has been added
|
||||
* `API`:
|
||||
* New extension `TelegramBot#downloadFile` for any `MediaContent`
|
||||
* `Behaviour Builder`:
|
||||
* New provider `defaultCoroutineScopeProvider`
|
||||
* Now it is not necessary to provide `CoroutineScope` to `TelegramBot#buildBehaviour`
|
||||
extension
|
||||
* New `TelegramBot#buildBehaviour` extension with `FlowUpdatesFilter` and `CoroutineScope` with
|
||||
default `CoroutineScope`
|
||||
* New typealias `SimpleFilter` for unifying triggers filter signatures
|
||||
* All waiters got real filters (`SimpleFilter`) and rename old filters as mappers
|
||||
* New extensions for `Any`: `as`/`when`/`require` for `WithOptionalLanguageCode` and `WithLanguageCode`
|
||||
|
||||
## 0.35.2
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Kotlin`: `1.5.20` -> `1.5.21`
|
||||
* `Coroutines`: `1.5.0` -> `1.5.1`
|
||||
* `Serialization`: `1.2.1` -> `1.2.2`
|
||||
* `Klock`: `2.1.2` -> `2.2.0`
|
||||
* `Ktor`: `1.6.0` -> `1.6.1`
|
||||
* `MicroUtils`: `0.5.15` -> `0.5.16`
|
||||
|
||||
## 0.35.1
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Kotlin`: `1.5.10` -> `1.5.20`
|
||||
* `MicroUtils`: `0.5.6` -> `0.5.15`
|
||||
* `Core`:
|
||||
* New interface `MyCommandsRequest` (also see `Bot API 5.3` below)
|
||||
* New extensions `TextSourcesList#make*String` for all parse modes
|
||||
* All `MessageContent` subclasses now serializable
|
||||
* `ChosenInlineResult` was replaced and modified to be sealed
|
||||
* `ChosenInlineResult` now extends `FromUser`
|
||||
* Added `Update#sourceUser` method
|
||||
* More types assumed as sent by user types now implements `FromUser` interface
|
||||
* Added `Any#whenFromUser`, `Any#asFromUser` and`Any#requireFromUser` extensions
|
||||
* `MedaGroupUpdate` and its direct extenders `SentMediaGroupUpdate` and `EditMediaGroupUpdate` became
|
||||
`sealed interface`s
|
||||
* New built-in `RequestException` implementator `GetUpdatesConflict` has been added
|
||||
* `Behaviour Builder`:
|
||||
* ❗️ All triggers (`on*` extensions) have been modified to work in parallel by some marker by default (new parameter
|
||||
`markerFactory`, in most cases will work async for different chats)
|
||||
* New extensions `telegramBotWithBehaviour`
|
||||
* All behaviour builder extensions got new parameter `defaultExceptionsHandler`
|
||||
* Class `BehaviourContext` was rewritten as an interface with default realization `DefaultBehaviourContext` and
|
||||
factory `BehaviourContext(TelegramBot, CoroutineScope, FlowsUpdatesFilter)`
|
||||
* Extension `buildBehaviour` (and all related extensions/functions) for opportunity to pass
|
||||
`defaultExceptionsHandler`
|
||||
* Trigger `onContentMessage` and waiter `waitContentMessage` now may include media groups
|
||||
* `API`:
|
||||
* All `reply` and subsequent extensions have been replaced in send package
|
||||
* `Utils`:
|
||||
* With class casts like `as*` and `require*` now you may use `when*` with parameter callback
|
||||
* Methods of `EntitiesBuilder` now will return builder itself, so you may create sequences like
|
||||
`buildEntities { bold("Hello,") + italic(" world") }` directly in `buildEntities` body
|
||||
* New extension `TelegramBot#longPollingFlow` has been added with returning value `Flow` with updates
|
||||
* `Bot API 5.3`:
|
||||
* Add type `BotCommandScope`, its serializer `BotCommandScopeSerializer` and all its children
|
||||
* New request `DeleteMyCommands` and updates in `GetMyCommands` and `SetMyCommands`
|
||||
* Renames according to `And more` of [June 25, 2021](https://core.telegram.org/bots/api-changelog#june-25-2021) update
|
||||
|
||||
## 0.35.0
|
||||
|
||||
**ALL PREVIOUS DEPRECATIONS HAVE BEEN REMOVED**
|
||||
**JS PART NOW USE IR COMPILER ONLY**
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Kotlin`: `1.4.72` -> `1.5.10`
|
||||
* `MicroUtils`: `0.4.36` -> `0.5.6`
|
||||
* `Coroutines`: `1.4.3` -> `1.5.0`
|
||||
* `Serialization`: `1.1.0` -> `1.2.1`
|
||||
* `Klock`: `2.0.7` -> `2.1.2`
|
||||
* `UUID`: `0.2.3` -> `0.3.0`
|
||||
* `Ktor`: `1.5.4` -> `1.6.0`
|
||||
* `Core`:
|
||||
* `ForceReply` has been renamed to `ReplyForce`
|
||||
* `Captioned` and `Explained` interfaces have been removed
|
||||
* `RecordAudioAction` and `UploadAudioAction` (and all related to these actions functionality) have been removed
|
||||
* `TextSource` interface and all related things have been replaced
|
||||
* `CallbackQuery` interface and all its extenders/implementers become `sealed`
|
||||
* `InputMedia` interface and all its extenders/implementers become `sealed`
|
||||
* `ParseMode` interface and all its extenders/implementers become `sealed`
|
||||
* `ChatMember` becomes `sealed`
|
||||
* `KeyboardMarkup` becomes `sealed`
|
||||
* `LeftChatMember` and `MemberChatMember` become interfaces. All their code were replaced to the `*Impl` classes
|
||||
* Most of `sealed` classes have been modified to be interfaces
|
||||
* Most serializers becomes public, but they are still `RistFeature`
|
||||
* For `EntitiesBuilder` multilevel text sources builders with callback have been added
|
||||
|
||||
## 0.34.1
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `ktor`: `1.5.3` -> `1.5.4`
|
||||
* `MicroUtils`: `0.4.35` -> `0.4.36`
|
||||
* `Core`
|
||||
* Fix in creating of text sources list
|
||||
|
||||
## 0.34.0
|
||||
|
||||
_**It is recommended to use [0.34.1](https://github.com/InsanusMokrassar/TelegramBotAPI/releases/tag/0.34.1) version due to the bug in 0.34.0 related to rewriting of `TextSource`s creating mechanism.**_
|
||||
|
||||
**UPDATE UP TO Telegram Bot API 5.2**
|
||||
|
||||
_**ALL OLD DEPRECATIONS WERE REMOVED**_
|
||||
|
||||
* `Core`:
|
||||
* Type `ChatType` has been added
|
||||
* New `ExtendedChat` for unknown messages `UnknownExtendedChat` has been added
|
||||
* `SendInvoice#startParameter` becomes optional and replaced in `SendInvoice` constructor
|
||||
* New interface `CommonSendInvoiceData` has been added
|
||||
* Fields `CommonSendInvoiceData#maxTipAmount` and `CommonSendInvoiceData#suggestedTipAmounts` have been added
|
||||
* New type `InputInvoiceMessageContent` has been added
|
||||
* New interface `TextedWithTextSources` on top of `Texted` interface
|
||||
* Interface `TextedInput` now extends `TextedWithTextSources` with overriding of `textSources` field as not
|
||||
nullable
|
||||
* `textSources` become main field in `TextedInput`
|
||||
* **MIGRATION** Remove all `import dev.inmo.tgbotapi.CommonAbstracts.textSources` in your project
|
||||
* `textEntities` become are calculable property in `TextedInput`
|
||||
* Interface `Captioned` and `CaptionedInput` now is deprecated
|
||||
* Most of captions usages were replaced with texts
|
||||
* Interface `Explained` and `ExplainedInput` now is deprecated
|
||||
* Most of captions usages were replaced with texts
|
||||
* Interface `VoiceChatEvent` now is `CommonEvent`
|
||||
* Mechanism of `RawMessageEntity` converting were fully rewritten
|
||||
|
||||
## 0.33.4
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `uuid`: `0.2.3` -> `0.2.4`
|
||||
* `MicroUtils`: `0.4.33` -> `0.4.35`
|
||||
* `Core`:
|
||||
* All `TextSource` implementators have become `Serializable`
|
||||
* New serializer `TextSourceSerializer`
|
||||
* Interface`FromUserMessage` now extends `Message`
|
||||
* New interface `FromUser`
|
||||
* Interface `FromUserMessage` now extends `FromUser`
|
||||
* `Extensions Utils`
|
||||
* Fixes in `parseCommandsWithParams`
|
||||
|
||||
## 0.33.3
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.4.32` -> `0.4.33`
|
||||
* `Ktor`: `1.5.2` -> `1.5.3`
|
||||
* `API`:
|
||||
* Bot actions DSL (fix for [#358](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/358))
|
||||
* `Behaviour Builder`:
|
||||
* Rewrite logic of `doInSubContextWithUpdatesFilter` and `doInSubContextWithFlowsUpdatesFilterSetup` extensions
|
||||
* All triggers now work with `stopOnCompletion` set up to `false`
|
||||
|
||||
## 0.33.2
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.4.30` -> `0.4.32`
|
||||
* `Behaviour Builder`:
|
||||
* New typealias `MediaGroupFilter` has been added for `MediaGroup` expectators
|
||||
* Several typealiases became `suspend`:
|
||||
* `CallbackQueryMapper`
|
||||
* `ChatMemberUpdatedMapper`
|
||||
* `InlineQueryMapper`
|
||||
* Commands got an additional parameter - `additionalFilter`. It will be called when all command filters were passed
|
||||
|
||||
## 0.33.1
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Kotlin`: `1.4.31` -> `1.4.32`
|
||||
* `MicroUtils`: `0.4.29` -> `0.4.30`
|
||||
* `Klocks`: `2.0.6` -> `2.0.7`
|
||||
* `Utils Extensions`:
|
||||
* Add extensions `parseCommandsWithParams`
|
||||
|
||||
## 0.33.0
|
||||
|
||||
**UPDATE UP TO Telegram Bot API 5.1**
|
||||
_**ALL DEPRECATIONS WERE REMOVED**_
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.4.28` -> `0.4.29`
|
||||
* `Core`:
|
||||
* `AdministratorChatMemberSerializer` and `ChatMemberSerializer` has changed their visibility: they are public for now
|
||||
* Add `ChatInviteLinkRequest` with subrequests like `KnownChatInviteLinkRequest`
|
||||
* Add `CreateChatInviteLink`/`EditChatInviteLink`/`RevokeChatInviteLink` requests
|
||||
* Update `KickChatMember` to include `revokeMessages` flag
|
||||
* Update `PromoteChatMember` to include `canManageVoiceChats` and `canManageChat` flags
|
||||
* Add `ChatInviteLink` object
|
||||
* Add `PrimaryInviteLink` for `ChatInviteLink` with `isPrimary == true`
|
||||
* Add `CommonInviteLink` for `ChatInviteLink` with `isPrimary == false`
|
||||
* `AdministratorChatMemberSerializer` has been set as public for several versions
|
||||
* `ChatMemberSerializer` has been set as public for several versions
|
||||
* Add `ChatMemberUpdated`
|
||||
* Add `MessageAutoDeleteTimerChanged`
|
||||
* Add `VoiceChatEvent`
|
||||
* Add `VoiceChatEnded`
|
||||
* Add `VoiceChatParticipantsInvited`
|
||||
* Add `VoiceChatStarted`
|
||||
* Add `ChatMemberUpdatedUpdate`
|
||||
* Add `CommonChatMemberUpdatedUpdate`
|
||||
* Add `MyChatMemberUpdatedUpdate`
|
||||
* `API`:
|
||||
* All API extensions has been updated
|
||||
* `Behaviour Builder`:
|
||||
* Now content triggers and expectators will wait for channel posts too
|
||||
* New waiters and triggers for `ChatMemberUpdated` and its variations
|
||||
|
||||
## 0.32.9
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Kotlin`: `1.4.30` -> `1.4.31`
|
||||
* `Ktor`: `1.5.1` -> `1.5.2`
|
||||
* `MicroUtils`: `0.4.26` -> `0.4.28`
|
||||
* `Coroutines`: `1.4.2` -> `1.4.3`
|
||||
|
||||
## 0.32.8
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Serialization`: `1.1.0-RC` -> `1.1.0`
|
||||
* `MicroUtils`: `0.4.25` -> `0.4.26`
|
||||
|
||||
## 0.32.7
|
||||
|
||||
* `Core`:
|
||||
* New variable `LeftRestrictionsChatPermissions` and `RestrictionsChatPermissions`
|
||||
* `Extensions Utils`:
|
||||
* `DiceAnimationType` class casts
|
||||
* `Behaviour Builder`:
|
||||
* Now `doInSubContextWithUpdatesFilter` and `doInSubContext` will automatically subscribe on updates of parent
|
||||
`BehaviourContext`
|
||||
* `doInSubContextWithFlowsUpdatesFilterSetup`, `doInSubContextWithUpdatesFilter` and `doInSubContext` got new
|
||||
parameter `stopOnCompletion` to be able to disable stopping of behaviour context on finishing
|
||||
|
||||
## 0.32.6
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.4.24` -> `0.4.25`
|
||||
* `Extensions API`:
|
||||
* New extension `TelegramBot#replyWithDice`
|
||||
* `Extensions Utils`:
|
||||
* `SlotMachineReelImages` has been renamed to `SlotMachineReelImage`
|
||||
* `SlotMachineReelImage` got two built-in parameters: `text` and `number`
|
||||
* New extension `String#asSlotMachineReelImage`
|
||||
|
||||
## 0.32.5
|
||||
|
||||
* `Core`:
|
||||
* Add `mention` variants for user ids and receiver variants ([#294](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/294))
|
||||
* Now `AbstractRequestCallFactory` will set up one-second delay for zero timeouts in `GetUpdate` requests
|
||||
* Several extensions for `TelegramBotAPI` like `retrieveAccumulatedUpdates` have been added as a solution for
|
||||
[#293](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/293)
|
||||
* Links for `tg://user?id=<user_id>` have been updated ([#292](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/292))
|
||||
* All usages of captions or texts in resends and same things have been replaced with `textSources`
|
||||
* Global `defaultParseMode` has been added ([#291](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/291))
|
||||
|
||||
## 0.32.4
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `Kotlin`: `1.4.21` -> `1.4.30`
|
||||
* `Klock`: `2.0.4` -> `2.0.6`
|
||||
* `MicroUtils`: `0.4.23` -> `0.4.24`
|
||||
* `Core`:
|
||||
* Renames:
|
||||
* `ChannelMessage` -> `ChannelContentMessage`
|
||||
* `PublicMessage` -> `PublicContentMessage`
|
||||
* `GroupMessage` -> `GroupContentMessage`
|
||||
* `FromChannelGroupMessage` -> `FromChannelGroupContentMessage`
|
||||
* `AnonymousGroupMessage` -> `AnonymousGroupContentMessage`
|
||||
* `CommonGroupMessage` -> `CommonGroupContentMessage`
|
||||
* `PrivateMessage` -> `PrivateContentMessage`
|
||||
* `Extensions Utils`:
|
||||
* Renames of extensions in `ClassCasts` according to changes in `Core`
|
||||
|
||||
## 0.32.3
|
||||
|
||||
* `Behaviour Builder`:
|
||||
* Add expectators and waiters for inline queries
|
||||
|
||||
## 0.32.2
|
||||
|
||||
* `Core`:
|
||||
* Fix of [#275](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/275)
|
||||
|
||||
## 0.32.1
|
||||
|
||||
* `Core`:
|
||||
* Fix of [#272](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/272)
|
||||
* `Utils`:
|
||||
* Fix of [#273](https://github.com/InsanusMokrassar/TelegramBotAPI/issues/273)
|
||||
|
||||
## 0.32.0
|
||||
|
||||
**THIS UPDATE CONTAINS BREAKING CHANGES**
|
||||
|
||||
* `Common`:
|
||||
* `Version`:
|
||||
* `MicroUtils`: `0.4.16` -> `0.4.23`
|
||||
* `Klock`: `0.2.3` -> `0.2.4`
|
||||
* `Ktor`: `1.5.0` -> `1.5.1`
|
||||
* `Core`:
|
||||
* **BREAKING CHANGE** Now `MediaGroupMessage` have a generic type related to `MediaGroupContent`
|
||||
* Methods and types related to `MediaGroupMessage` have been modified according to their meanings
|
||||
* **Important Change** `FlowsUpdatesFilter` now is an interface. Old class has been renamed to
|
||||
`DefaultFlowsUpdatesFilter` and factory method `FlowsUpdatesFilter` has been added
|
||||
* **PASSPORT** Full support of `Telegram Passport API`
|
||||
* `PassportData`
|
||||
* All variants of `EncryptedPassportElement`
|
||||
* All variants of `SecureValue`
|
||||
* All variants of `PassportElementError`
|
||||
* New request `SetPassportDataErrors`
|
||||
* `Credentials`:
|
||||
* `EncryptedCredentials`
|
||||
* `DeryptedCredentials`
|
||||
* `EndDataCredentials`
|
||||
* `Behaviour Builder`:
|
||||
* Trigger and expectation extensions for `MessageContent` (`onContentMessage` and `waitContentMessage`)
|
||||
* `onMediaGroup` has been replaced
|
||||
* `waitMediaGroup` has been added
|
||||
* `onVisualMediaGroup` now is just an alternative to `onVisualGallery`
|
||||
* `command` and `onCommand` expectations has been added for commands `String` variant
|
||||
* New extensions `BehaviourContext#oneOf`, `BehaviourContext#parallel` and `Deferred<T>#withAction`
|
||||
* Several renames:
|
||||
* `waitAudioMediaGroup` -> `waitAudioMediaGroupContent`
|
||||
* `waitDocumentMediaGroup` -> `waitDocumentMediaGroupContent`
|
||||
* `waitMediaGroup` -> `waitAnyMediaGroupContent`
|
||||
* `waitVisualMediaGroup` -> `waitVisualMediaGroupContent`
|
||||
* New extensions `BehaviourContext#waitPassportMessagesWith` and `BehaviourContext#waitAnyPassportMessages`
|
||||
* New extensions `BehaviourContext#onPassportMessage` and `BehaviourContext#onPassportMessageWith`
|
||||
* `Utils`:
|
||||
* New `ClassCasts` for
|
||||
* `Message`
|
||||
* **PASSPORT** `EncryptedPassportElement`
|
||||
* **PASSPORT** `PassportElementError`
|
||||
* **PASSPORT** `SecureValue`
|
||||
* Several tools for decryption have been added:
|
||||
* `AESDecryptor` is available for `JVM` platform
|
||||
* Extensions `EncryptedCredentials#decryptWithPKCS8PrivateKey` are available for `JVM`
|
||||
platform
|
||||
* Extensions `EndDataCredentials#decryptData` and `FileCredentials#decryptFile` have been added
|
||||
* Several extensions `createDecryptor`
|
||||
* Several extensions `doInDecryptionContextWithPKCS8Key`
|
||||
* New extension `Flow#passportMessages`
|
||||
* In most of webhook setting up functions/methods now available parameter `mediaGroupsDebounceTimeMillis`
|
||||
* `API`:
|
||||
* **PASSPORT** New extensions `TelegramBot#setPassportDataErrors`
|
||||
|
||||
## 0.31.0
|
||||
|
||||
**THIS UPDATE CONTAINS BREAKING CHANGES**
|
||||
|
||||
222
README.md
222
README.md
@@ -1,153 +1,111 @@
|
||||
# TelegramBotAPI
|
||||
# TelegramBotAPI [](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [](https://core.telegram.org/bots/api-changelog#april-16-2022)
|
||||
|
||||
<details>
|
||||
<summary><b>I do not wanna read a lot, just give me my bot</b></summary>
|
||||
| [](https://github.com/KotlinBy/awesome-kotlin) [](https://github.com/InsanusMokrassar/TelegramBotAPI/actions) [](https://docs.google.com/forms/d/e/1FAIpQLSctdJHT_aEniyYT0-IUAEfo1hsIlezX2owlkEAYX4KPl2V2_A/viewform?usp=sf_link) [](https://t.me/InMoTelegramBotAPI) |
|
||||
|:---:|
|
||||
| [](https://github.com/InsanusMokrassar/TelegramBotAPI-bot_template/generate) [](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/) [](https://tgbotapi.inmo.dev/index.html) [](https://bookstack.inmo.dev/books/telegrambotapi/chapter/introduction-tutorial) |
|
||||
|
||||
You can simply use <a href="https://github.com/InsanusMokrassar/TelegramBotAPI-bot_template">this template</a> (and button
|
||||
<a href="https://github.com/InsanusMokrassar/TelegramBotAPI-bot_template/generate">Use template</a>) to get your copy of bot and start to code.
|
||||
<p></p>
|
||||
<b>P.S. Do not forget to look into our <a href="https://bookstack.inmo.dev/books/telegrambotapi/">minidocs</a> and
|
||||
<a href="https://tgbotapi.inmo.dev/docs/index.html">kdocs</a></b>
|
||||
Hello! This is a set of libraries for working with Telegram Bot API.
|
||||
|
||||
</details>
|
||||
## Examples
|
||||
|
||||
| Common info | [](https://github.com/KotlinBy/awesome-kotlin) [](https://travis-ci.com/InsanusMokrassar/TelegramBotAPI) [Small survey](https://forms.gle/2Hex2ynbHWHhi1KY7)|
|
||||
| -------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| Useful links | [](https://t.me/InMoTelegramBotAPI) [](https://github.com/InsanusMokrassar/TelegramBotAPI-bot_template/generate) [](https://tgbotapi.inmo.dev/docs/index.html) [Examples](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/), [Mini tutorial](https://bookstack.inmo.dev/books/telegrambotapi/chapter/introduction-tutorial) |
|
||||
| TelegramBotAPI Core status | [](https://bintray.com/insanusmokrassar/TelegramBotAPI/tgbotapi.core/_latestVersion) [](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.core) |
|
||||
| TelegramBotAPI API Extensions status | [](https://bintray.com/insanusmokrassar/TelegramBotAPI/tgbotapi.extensions.api/_latestVersion) [](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.api) |
|
||||
| TelegramBotAPI Util Extensions status | [](https://bintray.com/insanusmokrassar/TelegramBotAPI/tgbotapi.extensions.utils/_latestVersion) [](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.utils) |
|
||||
| TelegramBotAPI Behaviour Builder Extensions status | [](https://bintray.com/insanusmokrassar/TelegramBotAPI/tgbotapi.extensions.behaviour_builder/_latestVersion) [](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.behaviour_builder) |
|
||||
| TelegramBotAPI All status | [](https://bintray.com/insanusmokrassar/TelegramBotAPI/tgbotapi/_latestVersion) [](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) |
|
||||
There are several things you need to do to launch examples below:
|
||||
|
||||
**At the time of publication of version `0.28.0` there are errors in serialization plugins like
|
||||
[kotlinx.serialization#1004](https://github.com/Kotlin/kotlinx.serialization/issues/1004). It is possible, that both JVM
|
||||
and JS version may work improperly in some cases with `kotlinx.serialization` version `1.0.0-RC`**
|
||||
* Add `mavenCentral()` to your project repositories
|
||||
* [Maven variant](https://github.com/InsanusMokrassar/TelegramBotAPI/wiki/Including-in-your-project#pomxml)
|
||||
* Add dependency `implementation "dev.inmo:tgbotapi:$tgbotapi_version"`
|
||||
* Replace `tgbotapi_version` with exact version (see last one in the table above) or put variable with this name in project
|
||||
* Alternative variant for maven [here](https://github.com/InsanusMokrassar/TelegramBotAPI/wiki/Including-in-your-project#telegrambotapi)
|
||||
|
||||
## What is it?
|
||||
More including instructions [available here](https://github.com/InsanusMokrassar/TelegramBotAPI/wiki/Including-in-your-project).
|
||||
Other configuration examples:
|
||||
|
||||
It is a complex of libraries for working with `TelegramBotAPI` in type-safe and strict way as much as it possible. In
|
||||
the list of this complex currently next projects:
|
||||
* [For multiplatform](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/tree/master/ResenderBot)
|
||||
* [For JVM](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/blob/master/GetMeBot/build.gradle)
|
||||
|
||||
* [TelegramBotAPI Core](tgbotapi.core/README.md) - core of library. In fact it is independent library and can be used alone
|
||||
without any additional library
|
||||
* [TelegramBotAPI API Extensions](tgbotapi.extensions.api/README.md) - contains extensions (mostly for
|
||||
`RequestsExecutor`), which allows to use the core library in more pleasant way
|
||||
* [TelegramBotAPI Util Extensions](tgbotapi.extensions.utils/README.md) - contains extensions for more comfortable
|
||||
work with commands, updates and other different things
|
||||
* [TelegramBotAPI Behaviour Builder Extensions](tgbotapi.extensions.behaviour_builder/README.md) - builder for
|
||||
step-by-step handling of bot behaviour in more comfortable manner
|
||||
* [TelegramBotAPI](tgbotapi/README.md) - concentration of all previously mentioned libraries
|
||||
### Most common example
|
||||
|
||||
Most part of some specific solves or unuseful
|
||||
moments are describing by official [Telegram Bot API](https://core.telegram.org/bots/api).
|
||||
```kotlin
|
||||
suspend fun main() {
|
||||
val bot = telegramBot(TOKEN)
|
||||
|
||||
## JavaScript notes
|
||||
|
||||
### Versions before `0.28.0`
|
||||
|
||||
In case if you are want to use this library inside of browser, you will need additional settings (thanks for help to [Alexander Nozik](https://research.jetbrains.org/researchers/altavir)):
|
||||
|
||||
<details>
|
||||
<summary>Gradle build script help (for versions before 0.28.0)</summary>
|
||||
|
||||
```groovy
|
||||
dependencies {
|
||||
/* ... */
|
||||
|
||||
implementation "com.github.insanusmokrassar:TelegramBotAPI:$tgbot_api_version"
|
||||
implementation "com.github.insanusmokrassar:TelegramBotAPI-extensions-api:$tgbot_api_version" // optional
|
||||
implementation "com.github.insanusmokrassar:TelegramBotAPI-extensions-utils:$tgbot_api_version" // optional
|
||||
|
||||
/* Block of dependencies for correct building in browser */
|
||||
implementation(npm("fs"))
|
||||
implementation(npm("bufferutil"))
|
||||
implementation(npm("utf-8-validate"))
|
||||
implementation(npm("abort-controller"))
|
||||
implementation(npm("text-encoding"))
|
||||
}
|
||||
|
||||
/* ... */
|
||||
|
||||
kotlin {
|
||||
target {
|
||||
browser {
|
||||
/* Block for fix of exception in absence of some functionality, https://github.com/ktorio/ktor/issues/1339 */
|
||||
dceTask {
|
||||
dceOptions {
|
||||
keep("ktor-ktor-io.\$\$importsForInline\$\$.ktor-ktor-io.io.ktor.utils.io")
|
||||
}
|
||||
}
|
||||
}
|
||||
bot.buildBehaviourWithLongPolling {
|
||||
println(getMe())
|
||||
|
||||
onCommand("start") {
|
||||
reply(it, "Hi:)")
|
||||
}
|
||||
}.join()
|
||||
}
|
||||
```
|
||||
|
||||
</details>
|
||||
In this example you will see information about this bot at the moment of starting and answer with `Hi:)` every time it
|
||||
gets message `/start`
|
||||
|
||||
## Ok, where should I start?
|
||||
### Handling only last messages
|
||||
|
||||

|
||||
```kotlin
|
||||
suspend fun main() {
|
||||
val bot = telegramBot(TOKEN)
|
||||
|
||||
In most cases, the most simple way will be to implement [TelegramBotAPI](tgbotapi/README.md) - it contains
|
||||
all necessary tools for comfort usage of this library. If you want to exclude some libraries, you can implement just
|
||||
[TelegramBotAPI BehaviourBuilder Extensions](tgbotapi.extensions.behaviour_builder/README.md),
|
||||
[TelegramBotAPI API Extensions](tgbotapi.extensions.api/README.md),
|
||||
[TelegramBotAPI Util Extensions](tgbotapi.extensions.utils/README.md) or even
|
||||
[TelegramBotAPI Core](tgbotapi.core/README.md).
|
||||
val flowsUpdatesFilter = FlowsUpdatesFilter()
|
||||
bot.buildBehaviour(flowUpdatesFilter = flowsUpdatesFilter) {
|
||||
println(getMe())
|
||||
|
||||
onCommand("start") {
|
||||
reply(it, "Hi:)")
|
||||
}
|
||||
|
||||
If you want to dive deeper in the core of library or develop something for it - welcome to learn more from
|
||||
[TelegramBotAPI Core](tgbotapi.core/README.md) and our [Telegram Chat](https://teleg.one/InMoTelegramBotAPIChat).
|
||||
|
||||
Anyway, all libraries are very typical inside of them. Examples:
|
||||
|
||||
* In `TelegramBotAPI` common request look like `requestsExecutor.execute(SomeRequest())`
|
||||
* `tgbotapi.extensions.api` typical syntax look like `requestsExecutor.someRequest()` (in most cases it would be
|
||||
better to use `bot` name instead of `requestsExecutor`)
|
||||
* `tgbotapi.extensions.utils` will look like `filter.filterBaseMessageUpdates(chatId).filterExactCommands(Regex("^.*$"))...`
|
||||
|
||||
## Build instruction
|
||||
|
||||
If you want to build this project or to contribute, there are several recommendations:
|
||||
|
||||
### Build
|
||||
|
||||
In case if you want to just build project, run next command:
|
||||
|
||||
```bash
|
||||
./gradlew clean build
|
||||
```
|
||||
|
||||
On windows:
|
||||
|
||||
```
|
||||
gradlew.bat clean build
|
||||
```
|
||||
|
||||
### Publishing for work with your version locally
|
||||
|
||||
In case, if you want to work in your other projects using your modification (or some state) of this library,
|
||||
you can use next code:
|
||||
|
||||
```bash
|
||||
./gradlew clean build publishToMavenLocal
|
||||
```
|
||||
|
||||
On windows:
|
||||
|
||||
```
|
||||
gradlew.bat clean build publishToMavenLocal
|
||||
```
|
||||
|
||||
But you must remember, that in this case your local maven repo must be the first one from
|
||||
your project retrieving libraries:
|
||||
|
||||
```groovy
|
||||
repositories {
|
||||
mavenLocal() // that must be the first one
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
retrieveAccumulatedUpdates(this).join()
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Besides, for your own version you can change variable `library_version` in the file [gradle.properties](./gradle.properties).
|
||||
The main difference with the previous example is that bot will get only last updates (accumulated before bot launch
|
||||
and maybe some updates it got after launch)
|
||||
|
||||
### Build a little bit more complex behaviour
|
||||
|
||||
```kotlin
|
||||
suspend fun main() {
|
||||
val bot = telegramBot(TOKEN)
|
||||
|
||||
bot.buildBehaviourWithLongPolling {
|
||||
println(getMe())
|
||||
|
||||
val nameReplyMarkup = ReplyKeyboardMarkup(
|
||||
matrix {
|
||||
row {
|
||||
+SimpleKeyboardButton("nope")
|
||||
}
|
||||
}
|
||||
)
|
||||
onCommand("start") {
|
||||
val photo = waitPhoto(
|
||||
SendTextMessage(it.chat.id, "Send me your photo please")
|
||||
).first()
|
||||
|
||||
val name = waitText(
|
||||
SendTextMessage(
|
||||
it.chat.id,
|
||||
"Send me your name or choose \"nope\"",
|
||||
replyMarkup = nameReplyMarkup
|
||||
)
|
||||
).first().text.takeIf { it != "nope" }
|
||||
|
||||
sendPhoto(
|
||||
it.chat,
|
||||
photo.mediaCollection,
|
||||
entities = buildEntities {
|
||||
if (name != null) regular(name) // may be collapsed up to name ?.let(::regular)
|
||||
}
|
||||
)
|
||||
}
|
||||
}.join()
|
||||
}
|
||||
```
|
||||
|
||||
### More examples
|
||||
|
||||
You may find examples in [this project](https://github.com/InsanusMokrassar/TelegramBotAPI-examples). Besides, you are
|
||||
always welcome in our [wiki](https://github.com/InsanusMokrassar/TelegramBotAPI/wiki/About-this-project) and
|
||||
[chat](https://t.me/InMoTelegramBotAPIChat).
|
||||
|
||||
1
TelegramBotAPI.drawio
Normal file
1
TelegramBotAPI.drawio
Normal file
File diff suppressed because one or more lines are too long
@@ -1,311 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<minder version="1.11.3">
|
||||
<theme name="default" label="Default" index="-1"/>
|
||||
<styles>
|
||||
<style level="0" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
|
||||
<style level="1" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
|
||||
<style level="2" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
|
||||
<style level="3" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
|
||||
<style level="4" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
|
||||
<style level="5" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
|
||||
<style level="6" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
|
||||
<style level="7" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
|
||||
<style level="8" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
|
||||
<style level="9" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
|
||||
<style level="10" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
|
||||
</styles>
|
||||
<drawarea x="-950.47548925255796" y="-49.650554065281653" scale="0.5"/>
|
||||
<images/>
|
||||
<nodes>
|
||||
<node id="0" posx="1378.798161778599" posy="159.04571601189673" width="472" height="168" side="top" fold="false" treesize="743" layout="Downwards" group="false">
|
||||
<style branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="439" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true"/>
|
||||
<nodename posx="1394.798161778599" posy="175.04571601189673" maxwidth="488.96484375">
|
||||
<text data="tgbotapi.core Root project with API. It is not recommended to use its requests directly and better to use at least tgbotapi.extensions.api"/>
|
||||
</nodename>
|
||||
<nodenote></nodenote>
|
||||
<nodes>
|
||||
<node id="1" posx="1411.798161778599" posy="427.04571601189673" width="406" height="145" side="bottom" fold="false" treesize="743" color="#68b723" colorroot="true" layout="Downwards" group="false">
|
||||
<style branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="none" nodewidth="394" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true"/>
|
||||
<nodename posx="1427.798161778599" posy="443.04571601189673" maxwidth="419.451171875">
|
||||
<text data="TelegramBotAPI extensions Family of projects which are fully based on TelegramBotAPI and extend its functionality"/>
|
||||
</nodename>
|
||||
<nodenote></nodenote>
|
||||
<nodes>
|
||||
<node id="2" posx="1247.298161778599" posy="672.04571601189673" width="296" height="191" side="bottom" fold="false" treesize="296" color="#68b723" colorroot="true" layout="Downwards" group="false">
|
||||
<style branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="203" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true"/>
|
||||
<nodename posx="1263.298161778599" posy="688.04571601189673" maxwidth="295.90315755208337">
|
||||
<text data="tgbotapi.extensions.api Extensions project for make requests more look like in the Telegram Bot API and give opportunity to use it's easier"/>
|
||||
</nodename>
|
||||
<nodenote></nodenote>
|
||||
</node>
|
||||
<node id="3" posx="1609.298161778599" posy="672.04571601189673" width="307" height="168" side="bottom" fold="false" treesize="439" color="#68b723" colorroot="true" layout="Downwards" group="false">
|
||||
<style branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="286" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true"/>
|
||||
<nodename posx="1625.298161778599" posy="688.04571601189673" maxwidth="299.252197265625">
|
||||
<text data="tgbotapi.extensions.utils Extensions project with utils things which will make easier different operations"/>
|
||||
</nodename>
|
||||
<nodenote></nodenote>
|
||||
<nodes>
|
||||
<node id="4" posx="1543.298161778599" posy="940.04571601189673" width="439" height="122" side="bottom" fold="false" treesize="439" color="#68b723" colorroot="false" layout="Downwards" group="false">
|
||||
<style branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="387" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true"/>
|
||||
<nodename posx="1559.298161778599" posy="956.04571601189673" maxwidth="408.97932942708348">
|
||||
<text data="tgbotapi.extensions.behaviour_builder Extension project for building bot behaviour via special dsl"/>
|
||||
</nodename>
|
||||
<nodenote></nodenote>
|
||||
</node>
|
||||
</nodes>
|
||||
</node>
|
||||
</nodes>
|
||||
</node>
|
||||
</nodes>
|
||||
</node>
|
||||
<node id="5" posx="1391.8445078072455" posy="1155.6062730594231" width="461" height="236" side="bottom" fold="false" treesize="461" layout="Downwards" group="false">
|
||||
<style branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="430" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true"/>
|
||||
<nodename posx="1407.8445078072455" posy="1171.6062730594231" maxwidth="453.885498046875">
|
||||
<text data="tgbotapi Here included all available TelegramBotAPI libraries: * tgbotapi.core * tgbotapi.extensions.api * tgbotapi.extensions.utils * tgbotapi.extensions.behaviour_builder">
|
||||
<color>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="67" end="68" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="84" end="85" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="111" end="112" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
<range start="139" end="140" extra="rgb(255,0,0)"/>
|
||||
</color>
|
||||
</text>
|
||||
</nodename>
|
||||
<nodenote></nodenote>
|
||||
</node>
|
||||
</nodes>
|
||||
<groups/>
|
||||
<connections>
|
||||
<connection from_id="2" to_id="5" drag_x="1475.8213347929195" drag_y="1014.8259945356604" color="#777777">
|
||||
<style connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
|
||||
<title></title>
|
||||
<note></note>
|
||||
</connection>
|
||||
<connection from_id="4" to_id="5" drag_x="1691.5447998046875" drag_y="1107.00439453125" color="#777777">
|
||||
<style connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
|
||||
<title></title>
|
||||
<note></note>
|
||||
</connection>
|
||||
<connection from_id="3" to_id="5" drag_x="1483.48876953125" drag_y="896.18115234375">
|
||||
<style connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
|
||||
<title></title>
|
||||
<note></note>
|
||||
</connection>
|
||||
</connections>
|
||||
<stickers/>
|
||||
</minder>
|
||||
@@ -1,20 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="104" height="20">
|
||||
<linearGradient id="b" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="a">
|
||||
<rect width="104" height="20" rx="3" fill="#fff"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#a)">
|
||||
<path fill="#555" d="M0 0h65v20H0z"/>
|
||||
<path fill="#007ec6" d="M35 0h69v20H35z"/>
|
||||
<path fill="url(#b)" d="M0 0h104v20H0z"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
|
||||
<text x="175" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">Talk</text>
|
||||
<text x="175" y="140" transform="scale(.1)">Talk</text>
|
||||
<text x="690" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">Telegram</text>
|
||||
<text x="690" y="140" transform="scale(.1)">Telegram</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1018 B |
@@ -1,20 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="104" height="20">
|
||||
<linearGradient id="b" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="a">
|
||||
<rect width="104" height="20" rx="3" fill="#fff"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#a)">
|
||||
<path fill="#555" d="M0 0h65v20H0z"/>
|
||||
<path fill="#007ec6" d="M45 0h69v20H45z"/>
|
||||
<path fill="url(#b)" d="M0 0h104v20H0z"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
|
||||
<text x="225" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">Open</text>
|
||||
<text x="225" y="140" transform="scale(.1)">Open</text>
|
||||
<text x="740" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">KDocs</text>
|
||||
<text x="740" y="140" transform="scale(.1)">KDocs</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1012 B |
@@ -1,20 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="104" height="20">
|
||||
<linearGradient id="b" x2="0" y2="100%">
|
||||
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
||||
<stop offset="1" stop-opacity=".1"/>
|
||||
</linearGradient>
|
||||
<clipPath id="a">
|
||||
<rect width="104" height="20" rx="3" fill="#fff"/>
|
||||
</clipPath>
|
||||
<g clip-path="url(#a)">
|
||||
<path fill="#555" d="M0 0h65v20H0z"/>
|
||||
<path fill="#007ec6" d="M35 0h69v20H35z"/>
|
||||
<path fill="url(#b)" d="M0 0h104v20H0z"/>
|
||||
</g>
|
||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
|
||||
<text x="175" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">Bot</text>
|
||||
<text x="175" y="140" transform="scale(.1)">Bot</text>
|
||||
<text x="690" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)">Template</text>
|
||||
<text x="690" y="140" transform="scale(.1)">Template</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1016 B |
12
build.gradle
12
build.gradle
@@ -1,7 +1,6 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
maven { url "https://plugins.gradle.org/m2/" }
|
||||
}
|
||||
@@ -18,6 +17,17 @@ plugins {
|
||||
id "org.jetbrains.kotlin.plugin.serialization" version "$kotlin_version" apply false
|
||||
}
|
||||
|
||||
// temporal crutch until legacy tests will be stabled or legacy target will be removed
|
||||
allprojects {
|
||||
if (it != rootProject.findProject("docs")) {
|
||||
tasks.whenTaskAdded { task ->
|
||||
if(task.name == "jsLegacyBrowserTest" || task.name == "jsLegacyNodeTest") {
|
||||
task.enabled = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getCurrentVersionChangelog() {
|
||||
OutputStream changelogDataOS = new ByteArrayOutputStream()
|
||||
exec {
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
@@ -20,13 +19,18 @@ plugins {
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js(BOTH) {
|
||||
jvm {
|
||||
compilations.main {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
}
|
||||
js(IR) {
|
||||
browser()
|
||||
nodejs()
|
||||
}
|
||||
@@ -36,11 +40,17 @@ kotlin {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib')
|
||||
|
||||
project.parent.subprojects.forEach {
|
||||
if (it != project) {
|
||||
api it
|
||||
}
|
||||
}
|
||||
api project(":tgbotapi.core")
|
||||
api project(":tgbotapi.api")
|
||||
api project(":tgbotapi.utils")
|
||||
api project(":tgbotapi.behaviour_builder")
|
||||
api project(":tgbotapi.behaviour_builder.fsm")
|
||||
api project(":tgbotapi")
|
||||
}
|
||||
}
|
||||
jsMain {
|
||||
dependencies {
|
||||
api project(":tgbotapi.webapps")
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -56,7 +66,7 @@ private List<SourceDirectorySet> findSourcesWithName(String... approximateNames)
|
||||
}.collect { it.kotlin }
|
||||
}
|
||||
|
||||
tasks.dokkaHtml {
|
||||
Object callback = {
|
||||
switch (true) {
|
||||
case project.hasProperty("DOKKA_PATH"):
|
||||
outputDirectory = project.property("DOKKA_PATH").toString()
|
||||
@@ -82,11 +92,19 @@ tasks.dokkaHtml {
|
||||
}
|
||||
|
||||
named("jsMain") {
|
||||
sourceRoots.setFrom(findSourcesWithName("jsMain", "commonMain"))
|
||||
sourceRoots.setFrom(findSourcesWithName("jsMain"))
|
||||
}
|
||||
|
||||
named("jvmMain") {
|
||||
sourceRoots.setFrom(findSourcesWithName("jvmMain", "commonMain"))
|
||||
sourceRoots.setFrom(findSourcesWithName("jvmMain"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks.dokkaGfm(callback)
|
||||
tasks.dokkaHtml(callback)
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
dokka_version=1.4.20
|
||||
|
||||
org.gradle.jvmargs=-Xmx1024m
|
||||
|
||||
@@ -5,18 +5,21 @@ kotlin.js.generate.externals=true
|
||||
kotlin.incremental=true
|
||||
kotlin.incremental.js=true
|
||||
|
||||
kotlin_version=1.4.21
|
||||
kotlin_coroutines_version=1.4.2
|
||||
kotlin_serialisation_runtime_version=1.0.1
|
||||
klock_version=2.0.3
|
||||
uuid_version=0.2.3
|
||||
ktor_version=1.5.0
|
||||
kotlin_version=1.6.21
|
||||
kotlin_coroutines_version=1.6.1
|
||||
kotlin_serialisation_runtime_version=1.3.3
|
||||
klock_version=2.7.0
|
||||
uuid_version=0.4.0
|
||||
ktor_version=2.0.1
|
||||
|
||||
micro_utils_version=0.4.16
|
||||
micro_utils_version=0.10.4
|
||||
|
||||
javax_activation_version=1.1.1
|
||||
|
||||
library_group=dev.inmo
|
||||
library_version=0.31.0
|
||||
|
||||
github_release_plugin_version=2.2.12
|
||||
dokka_version=1.6.21
|
||||
|
||||
library_group=dev.inmo
|
||||
library_version=1.0.1
|
||||
|
||||
github_release_plugin_version=2.3.7
|
||||
|
||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
||||
|
||||
79
publish.gradle
Normal file
79
publish.gradle
Normal file
@@ -0,0 +1,79 @@
|
||||
apply plugin: 'maven-publish'
|
||||
|
||||
task javadocsJar(type: Jar) {
|
||||
classifier = 'javadoc'
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications.all {
|
||||
artifact javadocsJar
|
||||
|
||||
pom {
|
||||
description = "${project.description}"
|
||||
name = "${project.name}"
|
||||
url = "https://insanusmokrassar.github.io/TelegramBotAPI/TelegramBotAPI"
|
||||
|
||||
scm {
|
||||
developerConnection = "scm:git:[fetch=]https://github.com/insanusmokrassar/TelegramBotAPI.git[push=]https://github.com/insanusmokrassar/TelegramBotAPI.git"
|
||||
url = "https://github.com/insanusmokrassar/TelegramBotAPI.git"
|
||||
}
|
||||
|
||||
developers {
|
||||
|
||||
developer {
|
||||
id = "InsanusMokrassar"
|
||||
name = "Ovsiannikov Aleksei"
|
||||
email = "ovsyannikov.alexey95@gmail.com"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
licenses {
|
||||
|
||||
license {
|
||||
name = "Apache Software License 2.0"
|
||||
url = "https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
if ((project.hasProperty('GITHUBPACKAGES_USER') || System.getenv('GITHUBPACKAGES_USER') != null) && (project.hasProperty('GITHUBPACKAGES_PASSWORD') || System.getenv('GITHUBPACKAGES_PASSWORD') != null)) {
|
||||
maven {
|
||||
name = "GithubPackages"
|
||||
url = uri("https://maven.pkg.github.com/InsanusMokrassar/TelegramBotAPI")
|
||||
credentials {
|
||||
username = project.hasProperty('GITHUBPACKAGES_USER') ? project.property('GITHUBPACKAGES_USER') : System.getenv('GITHUBPACKAGES_USER')
|
||||
password = project.hasProperty('GITHUBPACKAGES_PASSWORD') ? project.property('GITHUBPACKAGES_PASSWORD') : System.getenv('GITHUBPACKAGES_PASSWORD')
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((project.hasProperty('SONATYPE_USER') || System.getenv('SONATYPE_USER') != null) && (project.hasProperty('SONATYPE_PASSWORD') || System.getenv('SONATYPE_PASSWORD') != null)) {
|
||||
maven {
|
||||
name = "sonatype"
|
||||
url = uri("https://oss.sonatype.org/service/local/staging/deploy/maven2/")
|
||||
credentials {
|
||||
username = project.hasProperty('SONATYPE_USER') ? project.property('SONATYPE_USER') : System.getenv('SONATYPE_USER')
|
||||
password = project.hasProperty('SONATYPE_PASSWORD') ? project.property('SONATYPE_PASSWORD') : System.getenv('SONATYPE_PASSWORD')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (project.hasProperty("signing.gnupg.keyName")) {
|
||||
apply plugin: 'signing'
|
||||
|
||||
signing {
|
||||
useGpgCmd()
|
||||
|
||||
sign publishing.publications
|
||||
}
|
||||
|
||||
task signAll {
|
||||
tasks.withType(Sign).forEach {
|
||||
dependsOn(it)
|
||||
}
|
||||
}
|
||||
}
|
||||
1
publish.kpsb
Normal file
1
publish.kpsb
Normal file
@@ -0,0 +1 @@
|
||||
{"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"${project.name}","description":"${project.description}","url":"https://insanusmokrassar.github.io/TelegramBotAPI/TelegramBotAPI","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}],"repositories":[{"name":"GithubPackages","url":"https://maven.pkg.github.com/InsanusMokrassar/TelegramBotAPI"},{"name":"sonatype","url":"https://oss.sonatype.org/service/local/staging/deploy/maven2/"}],"gpgSigning":{"type":"dev.inmo.kmppscriptbuilder.core.models.GpgSigning.Optional"}}}
|
||||
97
readmes/exceptions_handling.md
Normal file
97
readmes/exceptions_handling.md
Normal file
@@ -0,0 +1,97 @@
|
||||
# Exceptions handling
|
||||
|
||||
Unfortunatelly, exceptions handling in this library is a bit difficult in some places, but that have at least two reasons: flexibility and usability.
|
||||
|
||||
## "In place" handling
|
||||
|
||||
In case you know, where exceptions are happening, you may use several tools for exceptions catching:
|
||||
|
||||
* Catching with result
|
||||
* Catching with callback
|
||||
|
||||
### Catching with result
|
||||
|
||||
If you prefer to receive `Result` objects instead of some weird callbacks, you may use the next syntax:
|
||||
|
||||
```kotlin
|
||||
safelyWithResult {
|
||||
// do something
|
||||
}.onSuccess { // will be called if everything is right
|
||||
// handle success
|
||||
}.onFailure { // will be called if something went wrong
|
||||
// handle error
|
||||
it.printStackTrace()
|
||||
}.getOrThrow() // will return value or throw exception
|
||||
```
|
||||
|
||||
### Catching with callback
|
||||
|
||||
Also there is more simple (in some cases) way to handle exceptions with callbacks:
|
||||
|
||||
```kotlin
|
||||
safely(
|
||||
{
|
||||
// handle error
|
||||
it.printStackTrace()
|
||||
null // return value
|
||||
}
|
||||
) {
|
||||
// do something
|
||||
}
|
||||
```
|
||||
|
||||
### Bonus: different types of handling
|
||||
|
||||
There are two types of handling:
|
||||
|
||||
* Just safely - when you are using something to obviously retrieve value or throw exception. When handling callback has been skipped, it will throw exception by default. For example:
|
||||
```kotlin
|
||||
safely(
|
||||
{
|
||||
it.printStackTrace()
|
||||
"error"
|
||||
}
|
||||
) {
|
||||
error("Hi :)") // emulate exception throwing
|
||||
"ok"
|
||||
} // result will be with type String
|
||||
```
|
||||
* Safely without exceptions - almost the same as `safely`, but this type by default allow to return nullable value (when exception was thrown) instead of just throwing (as with `safely`):
|
||||
```kotlin
|
||||
safelyWithouExceptions {
|
||||
// do something
|
||||
} // will returns nullable result type
|
||||
```
|
||||
|
||||
## Global exceptions handling
|
||||
|
||||
The most simple way to configure exceptions handling is to change `CoroutineContext` when you are creating your `CoroutineScope` for bot processing:
|
||||
|
||||
```kotlin
|
||||
val bot = telegramBot("TOKEN")
|
||||
|
||||
bot.buildBehaviour (
|
||||
scope = scope,
|
||||
defaultExceptionsHandler = {
|
||||
it.printStackTrace()
|
||||
}
|
||||
) {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
OR
|
||||
|
||||
```kotlin
|
||||
val bot = telegramBotWithBehaviour (
|
||||
"TOKEN",
|
||||
scope = scope,
|
||||
defaultExceptionsHandler = {
|
||||
it.printStackTrace()
|
||||
}
|
||||
) {
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
Here we have used `ContextSafelyExceptionHandler` class. It will pass default handling of exceptions and will call the block in most cases when something inside of your bot logic has thrown exception.
|
||||
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 16 KiB |
@@ -1,13 +1,21 @@
|
||||
pluginManagement {
|
||||
resolutionStrategy {
|
||||
eachPlugin {
|
||||
if (requested.id.id == "org.jetbrains.dokka") {
|
||||
useModule("org.jetbrains.dokka:dokka-gradle-plugin:${requested.version}")
|
||||
}
|
||||
}
|
||||
}
|
||||
repositories {
|
||||
gradlePluginPortal()
|
||||
jcenter()
|
||||
}
|
||||
}
|
||||
|
||||
include ":tgbotapi.core"
|
||||
include ":tgbotapi.extensions.api"
|
||||
include ":tgbotapi.extensions.utils"
|
||||
include ":tgbotapi.extensions.behaviour_builder"
|
||||
include ":tgbotapi.api"
|
||||
include ":tgbotapi.utils"
|
||||
include ":tgbotapi.behaviour_builder"
|
||||
include ":tgbotapi.behaviour_builder.fsm"
|
||||
include ":tgbotapi"
|
||||
include ":tgbotapi.webapps"
|
||||
include ":docs"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# TelegramBotAPI extensions
|
||||
# TelegramBotAPI API extensions
|
||||
|
||||
[ ](https://bintray.com/insanusmokrassar/TelegramBotAPI/tgbotapi.extensions.api/_latestVersion)
|
||||
[](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.api)
|
||||
[](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.api)
|
||||
|
||||
## What is it?
|
||||
|
||||
@@ -17,10 +16,9 @@ This library always compatible with original `tgbotapi.core` library version
|
||||
|
||||
Common ways to implement this library are presented here. In some cases it will require additional steps
|
||||
like inserting of additional libraries (like `kotlin stdlib`). In the examples will be used variable
|
||||
`telegrambotapi-extensions-api.version`, which must be set up by developer. Available versions are presented on
|
||||
[bintray](https://bintray.com/insanusmokrassar/TelegramBotAPI/tgbotapi.extensions.api), next version is last published:
|
||||
`telegrambotapi-extensions-api.version`, which must be set up by developer.
|
||||
|
||||
[ ](https://bintray.com/insanusmokrassar/TelegramBotAPI/tgbotapi.extensions.api/_latestVersion)
|
||||
[](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.api)
|
||||
|
||||
### Maven
|
||||
|
||||
@@ -29,7 +27,7 @@ Dependency config presented here:
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>dev.inmo</groupId>
|
||||
<artifactId>tgbotapi.extensions.api</artifactId>
|
||||
<artifactId>tgbotapi.api</artifactId>
|
||||
<version>${telegrambotapi-extensions-api.version}</version>
|
||||
</dependency>
|
||||
```
|
||||
@@ -38,18 +36,18 @@ Dependency config presented here:
|
||||
|
||||
To use last versions you will need to add one line in repositories block of your `build.gradle`:
|
||||
|
||||
`jcenter()` or `mavenCentral()`
|
||||
`mavenCentral()`
|
||||
|
||||
And add next line to your dependencies block:
|
||||
|
||||
```groovy
|
||||
implementation "dev.inmo:tgbotapi.extensions.api:$telegrambotapi_extensions_api_version"
|
||||
implementation "dev.inmo:tgbotapi.api:$telegrambotapi_extensions_api_version"
|
||||
```
|
||||
|
||||
or for old gradle:
|
||||
|
||||
```groovy
|
||||
compile "dev.inmo:tgbotapi.extensions.api:$telegrambotapi_extensions_api_version"
|
||||
compile "dev.inmo:tgbotapi.api:$telegrambotapi_extensions_api_version"
|
||||
```
|
||||
|
||||
## Example of usage and comparison with `TelegramBotAPI`
|
||||
@@ -71,7 +69,7 @@ val bot = telegramBot("IT IS YOUR TOKEN") {
|
||||
|
||||
In all examples supposed that you have created bot.
|
||||
|
||||
| tgbotapi.core | tgbotapi.extensions.api |
|
||||
| tgbotapi.core | tgbotapi.api |
|
||||
|---------------------|-------------------------------|
|
||||
| bot.execute(GetMe) | bot.getMe() |
|
||||
| bot.execute(SendTextMessage(someChatId, text)) | bot.sendTextMessage(chat, text) |
|
||||
@@ -79,8 +77,8 @@ In all examples supposed that you have created bot.
|
||||
## Updates
|
||||
|
||||
**Currently, these paragraphs almost outdated due to the fact that extensions for listening of updates and webhooks were
|
||||
replaced into `tgbotapi.extensions.utils`. But, most part of information below is correct with small fixes and
|
||||
adding of `tgbotapi.extensions.utils` dependency.**
|
||||
replaced into `tgbotapi.utils`. But, most part of information below is correct with small fixes and
|
||||
adding of `tgbotapi.utils` dependency.**
|
||||
|
||||
Usually, it is more comfortable to use filter object to get separated types of updates:
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
@@ -18,19 +17,24 @@ plugins {
|
||||
|
||||
project.version = "$library_version"
|
||||
project.group = "$library_group"
|
||||
project.description = "API extensions with \"Telegram Bot API\"-like extensions for TelegramBot and RequestsExecutor"
|
||||
|
||||
apply from: "publish.gradle"
|
||||
apply from: "../publish.gradle"
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
maven { url "https://kotlin.bintray.com/kotlinx" }
|
||||
}
|
||||
|
||||
kotlin {
|
||||
jvm()
|
||||
js(BOTH) {
|
||||
jvm {
|
||||
compilations.main {
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
}
|
||||
}
|
||||
js(IR) {
|
||||
browser()
|
||||
nodejs()
|
||||
}
|
||||
@@ -39,8 +43,14 @@ kotlin {
|
||||
commonMain {
|
||||
dependencies {
|
||||
implementation kotlin('stdlib')
|
||||
api project(":tgbotapi.extensions.utils")
|
||||
api project(":tgbotapi.core")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
java {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
@@ -40,8 +40,9 @@ data class BotBuilder internal constructor(
|
||||
fun buildBot(
|
||||
token: String,
|
||||
apiUrl: String = telegramBotAPIDefaultUrl,
|
||||
testServer: Boolean = false,
|
||||
block: BotBuilder.() -> Unit
|
||||
) = telegramBot(
|
||||
TelegramAPIUrlsKeeper(token, apiUrl),
|
||||
TelegramAPIUrlsKeeper(token, testServer, apiUrl),
|
||||
BotBuilder().apply(block).createHttpClient()
|
||||
)
|
||||
@@ -1,6 +1,6 @@
|
||||
package dev.inmo.tgbotapi.extensions.api
|
||||
|
||||
import dev.inmo.tgbotapi.bot.Ktor.telegramBot
|
||||
import dev.inmo.tgbotapi.bot.ktor.telegramBot
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.utils.TelegramAPIUrlsKeeper
|
||||
import dev.inmo.tgbotapi.utils.telegramBotAPIDefaultUrl
|
||||
@@ -13,7 +13,7 @@ import io.ktor.client.engine.*
|
||||
*/
|
||||
fun telegramBot(
|
||||
urlsKeeper: TelegramAPIUrlsKeeper,
|
||||
client: HttpClient
|
||||
client: HttpClient = HttpClient()
|
||||
): TelegramBot = telegramBot(urlsKeeper) {
|
||||
this.client = client
|
||||
}
|
||||
@@ -66,17 +66,19 @@ inline fun telegramBot(
|
||||
inline fun telegramBot(
|
||||
token: String,
|
||||
apiUrl: String = telegramBotAPIDefaultUrl,
|
||||
client: HttpClient
|
||||
): TelegramBot = telegramBot(TelegramAPIUrlsKeeper(token, apiUrl), client)
|
||||
testServer: Boolean = false,
|
||||
client: HttpClient = HttpClient()
|
||||
): TelegramBot = telegramBot(TelegramAPIUrlsKeeper(token, testServer, apiUrl), client)
|
||||
|
||||
@Suppress("NOTHING_TO_INLINE")
|
||||
inline fun <T: HttpClientEngineConfig> telegramBot(
|
||||
token: String,
|
||||
clientFactory: HttpClientEngineFactory<T>,
|
||||
apiUrl: String = telegramBotAPIDefaultUrl,
|
||||
testServer: Boolean = false,
|
||||
noinline clientConfig: HttpClientConfig<T>.() -> Unit = {}
|
||||
) = telegramBot(
|
||||
TelegramAPIUrlsKeeper(token, apiUrl),
|
||||
TelegramAPIUrlsKeeper(token, testServer, apiUrl),
|
||||
clientFactory,
|
||||
clientConfig
|
||||
)
|
||||
@@ -90,9 +92,10 @@ inline fun telegramBot(
|
||||
token: String,
|
||||
clientEngine: HttpClientEngine,
|
||||
apiUrl: String = telegramBotAPIDefaultUrl,
|
||||
testServer: Boolean = false,
|
||||
noinline clientConfig: HttpClientConfig<*>.() -> Unit = {}
|
||||
) = telegramBot(
|
||||
TelegramAPIUrlsKeeper(token, apiUrl),
|
||||
TelegramAPIUrlsKeeper(token, testServer, apiUrl),
|
||||
clientEngine,
|
||||
clientConfig
|
||||
)
|
||||
@@ -105,8 +108,9 @@ inline fun telegramBot(
|
||||
inline fun telegramBot(
|
||||
token: String,
|
||||
apiUrl: String = telegramBotAPIDefaultUrl,
|
||||
testServer: Boolean = false,
|
||||
noinline clientConfig: HttpClientConfig<*>.() -> Unit
|
||||
) = telegramBot(
|
||||
TelegramAPIUrlsKeeper(token, apiUrl),
|
||||
TelegramAPIUrlsKeeper(token, testServer, apiUrl),
|
||||
clientConfig
|
||||
)
|
||||
@@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.DeleteMessage
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
suspend fun TelegramBot.deleteMessage(
|
||||
@@ -4,47 +4,53 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.ForwardMessage
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
suspend fun TelegramBot.forwardMessage(
|
||||
fromChatId: ChatIdentifier,
|
||||
toChatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
disableNotification: Boolean = false
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
) = execute(
|
||||
ForwardMessage(fromChatId, toChatId, messageId, disableNotification)
|
||||
ForwardMessage(fromChatId, toChatId, messageId, disableNotification, protectContent)
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.forwardMessage(
|
||||
fromChat: Chat,
|
||||
toChatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
disableNotification: Boolean = false
|
||||
) = forwardMessage(fromChat.id, toChatId, messageId, disableNotification)
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
) = forwardMessage(fromChat.id, toChatId, messageId, disableNotification, protectContent)
|
||||
|
||||
suspend fun TelegramBot.forwardMessage(
|
||||
fromChatId: ChatIdentifier,
|
||||
toChat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
disableNotification: Boolean = false
|
||||
) = forwardMessage(fromChatId, toChat.id, messageId, disableNotification)
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
) = forwardMessage(fromChatId, toChat.id, messageId, disableNotification, protectContent)
|
||||
|
||||
suspend fun TelegramBot.forwardMessage(
|
||||
fromChat: Chat,
|
||||
toChat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
disableNotification: Boolean = false
|
||||
) = forwardMessage(fromChat.id, toChat.id, messageId, disableNotification)
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
) = forwardMessage(fromChat.id, toChat.id, messageId, disableNotification, protectContent)
|
||||
|
||||
suspend fun TelegramBot.forwardMessage(
|
||||
toChatId: ChatIdentifier,
|
||||
message: Message,
|
||||
disableNotification: Boolean = false
|
||||
) = forwardMessage(message.chat, toChatId, message.messageId, disableNotification)
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
) = forwardMessage(message.chat, toChatId, message.messageId, disableNotification, protectContent)
|
||||
|
||||
suspend fun TelegramBot.forwardMessage(
|
||||
toChat: Chat,
|
||||
message: Message,
|
||||
disableNotification: Boolean = false
|
||||
) = forwardMessage(message.chat, toChat, message.messageId, disableNotification)
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false
|
||||
) = forwardMessage(message.chat, toChat, message.messageId, disableNotification, protectContent)
|
||||
@@ -4,8 +4,8 @@ import dev.inmo.tgbotapi.types.MediaGroupIdentifier
|
||||
import dev.inmo.tgbotapi.types.UpdateIdentifier
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.MediaGroupMessage
|
||||
import dev.inmo.tgbotapi.types.update.*
|
||||
import dev.inmo.tgbotapi.types.update.MediaGroupUpdates.*
|
||||
import dev.inmo.tgbotapi.types.update.abstracts.*
|
||||
import dev.inmo.tgbotapi.types.update.media_group.*
|
||||
|
||||
internal fun Update.lastUpdateIdentifier(): UpdateIdentifier {
|
||||
return if (this is SentMediaGroupUpdate) {
|
||||
@@ -23,7 +23,7 @@ internal fun List<Update>.convertWithMediaGroupUpdates(): List<Update> {
|
||||
val resultUpdates = mutableListOf<Update>()
|
||||
val mediaGroups = mutableMapOf<MediaGroupIdentifier, MutableList<BaseSentMessageUpdate>>()
|
||||
for (update in this) {
|
||||
val data = (update.data as? MediaGroupMessage)
|
||||
val data = (update.data as? MediaGroupMessage<*>)
|
||||
if (data == null) {
|
||||
resultUpdates.add(update)
|
||||
continue
|
||||
@@ -3,13 +3,13 @@ package dev.inmo.tgbotapi.extensions.api
|
||||
import com.soywiz.klock.DateTime
|
||||
import com.soywiz.klock.TimeSpan
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.LiveLocation.editLiveLocation
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.LiveLocation.stopLiveLocation
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.location.live.stopLiveLocation
|
||||
import dev.inmo.tgbotapi.requests.send.SendLiveLocation
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.buttons.KeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.location.LiveLocation
|
||||
import dev.inmo.tgbotapi.types.location.StaticLocation
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
@@ -21,6 +21,10 @@ import kotlinx.coroutines.launch
|
||||
import kotlin.math.ceil
|
||||
|
||||
val defaultLivePeriodDelayMillis = (livePeriodLimit.last - 60L) * 1000L
|
||||
|
||||
/**
|
||||
* @see startLiveLocation
|
||||
*/
|
||||
class LiveLocationProvider internal constructor(
|
||||
private val requestsExecutor: TelegramBot,
|
||||
scope: CoroutineScope,
|
||||
@@ -44,6 +48,10 @@ class LiveLocationProvider internal constructor(
|
||||
val lastLocation: LiveLocation
|
||||
get() = message.content.location as LiveLocation
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun updateLocation(
|
||||
location: LiveLocation,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
@@ -69,6 +77,10 @@ class LiveLocationProvider internal constructor(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.startLiveLocation(
|
||||
scope: CoroutineScope,
|
||||
chatId: ChatIdentifier,
|
||||
@@ -79,6 +91,7 @@ suspend fun TelegramBot.startLiveLocation(
|
||||
initHeading: Degrees? = null,
|
||||
initProximityAlertRadius: Meters? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
replyToMessageId: MessageIdentifier? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
@@ -94,6 +107,7 @@ suspend fun TelegramBot.startLiveLocation(
|
||||
initHeading,
|
||||
initProximityAlertRadius,
|
||||
disableNotification,
|
||||
protectContent,
|
||||
replyToMessageId,
|
||||
allowSendingWithoutReply,
|
||||
replyMarkup
|
||||
@@ -108,6 +122,10 @@ suspend fun TelegramBot.startLiveLocation(
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.startLiveLocation(
|
||||
scope: CoroutineScope,
|
||||
chat: Chat,
|
||||
@@ -118,6 +136,7 @@ suspend fun TelegramBot.startLiveLocation(
|
||||
initHeading: Degrees? = null,
|
||||
initProximityAlertRadius: Meters? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
replyToMessageId: MessageIdentifier? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
@@ -131,11 +150,16 @@ suspend fun TelegramBot.startLiveLocation(
|
||||
initHeading,
|
||||
initProximityAlertRadius,
|
||||
disableNotification,
|
||||
protectContent,
|
||||
replyToMessageId,
|
||||
allowSendingWithoutReply,
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.startLiveLocation(
|
||||
scope: CoroutineScope,
|
||||
chatId: ChatId,
|
||||
@@ -145,6 +169,7 @@ suspend fun TelegramBot.startLiveLocation(
|
||||
initHeading: Degrees? = null,
|
||||
initProximityAlertRadius: Meters? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
replyToMessageId: MessageIdentifier? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
@@ -158,11 +183,16 @@ suspend fun TelegramBot.startLiveLocation(
|
||||
initHeading,
|
||||
initProximityAlertRadius,
|
||||
disableNotification,
|
||||
protectContent,
|
||||
replyToMessageId,
|
||||
allowSendingWithoutReply,
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend fun TelegramBot.startLiveLocation(
|
||||
scope: CoroutineScope,
|
||||
chat: Chat,
|
||||
@@ -172,6 +202,7 @@ suspend fun TelegramBot.startLiveLocation(
|
||||
initHeading: Degrees? = null,
|
||||
initProximityAlertRadius: Meters? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
replyToMessageId: MessageIdentifier? = null,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
@@ -185,11 +216,16 @@ suspend fun TelegramBot.startLiveLocation(
|
||||
initHeading,
|
||||
initProximityAlertRadius,
|
||||
disableNotification,
|
||||
protectContent,
|
||||
replyToMessageId,
|
||||
allowSendingWithoutReply,
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.replyWithLiveLocation(
|
||||
to: Message,
|
||||
scope: CoroutineScope,
|
||||
@@ -200,6 +236,7 @@ suspend inline fun TelegramBot.replyWithLiveLocation(
|
||||
initHeading: Degrees? = null,
|
||||
initProximityAlertRadius: Meters? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = startLiveLocation(
|
||||
@@ -212,11 +249,16 @@ suspend inline fun TelegramBot.replyWithLiveLocation(
|
||||
initHeading,
|
||||
initProximityAlertRadius,
|
||||
disableNotification,
|
||||
protectContent,
|
||||
to.messageId,
|
||||
allowSendingWithoutReply,
|
||||
replyMarkup
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some of [KeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.replyKeyboard] or
|
||||
* [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard] as a builders for that param
|
||||
*/
|
||||
suspend inline fun TelegramBot.replyWithLiveLocation(
|
||||
to: Message,
|
||||
scope: CoroutineScope,
|
||||
@@ -226,6 +268,7 @@ suspend inline fun TelegramBot.replyWithLiveLocation(
|
||||
initHeading: Degrees? = null,
|
||||
initProximityAlertRadius: Meters? = null,
|
||||
disableNotification: Boolean = false,
|
||||
protectContent: Boolean = false,
|
||||
allowSendingWithoutReply: Boolean? = null,
|
||||
replyMarkup: KeyboardMarkup? = null
|
||||
) = startLiveLocation(
|
||||
@@ -237,6 +280,7 @@ suspend inline fun TelegramBot.replyWithLiveLocation(
|
||||
initHeading,
|
||||
initProximityAlertRadius,
|
||||
disableNotification,
|
||||
protectContent,
|
||||
to.messageId,
|
||||
allowSendingWithoutReply,
|
||||
replyMarkup
|
||||
@@ -4,9 +4,13 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.StopPoll
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopPoll(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@@ -15,18 +19,30 @@ suspend fun TelegramBot.stopPoll(
|
||||
StopPoll(chatId, messageId, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopPoll(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopPoll(chat.id, messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopPoll(
|
||||
chatId: ChatId,
|
||||
message: Message,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopPoll(chatId, message.messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopPoll(
|
||||
chat: Chat,
|
||||
message: Message,
|
||||
@@ -2,7 +2,7 @@ package dev.inmo.tgbotapi.extensions.api.answers
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.answers.AnswerCallbackQuery
|
||||
import dev.inmo.tgbotapi.types.CallbackQuery.CallbackQuery
|
||||
import dev.inmo.tgbotapi.types.queries.callback.CallbackQuery
|
||||
import dev.inmo.tgbotapi.types.CallbackQueryIdentifier
|
||||
|
||||
suspend fun TelegramBot.answerCallbackQuery(
|
||||
@@ -20,3 +20,11 @@ suspend fun TelegramBot.answerCallbackQuery(
|
||||
url: String? = null,
|
||||
cachedTimeSeconds: Int? = null
|
||||
) = answerCallbackQuery(callbackQuery.id, text, showAlert, url, cachedTimeSeconds)
|
||||
|
||||
suspend fun TelegramBot.answer(
|
||||
callbackQuery: CallbackQuery,
|
||||
text: String? = null,
|
||||
showAlert: Boolean? = null,
|
||||
url: String? = null,
|
||||
cachedTimeSeconds: Int? = null
|
||||
) = answerCallbackQuery(callbackQuery.id, text, showAlert, url, cachedTimeSeconds)
|
||||
@@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.answers
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.answers.AnswerInlineQuery
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.abstracts.InlineQuery
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.query.InlineQuery
|
||||
import dev.inmo.tgbotapi.types.InlineQueryIdentifier
|
||||
|
||||
suspend fun TelegramBot.answerInlineQuery(
|
||||
@@ -27,3 +27,13 @@ suspend fun TelegramBot.answerInlineQuery(
|
||||
switchPmText: String? = null,
|
||||
switchPmParameter: String? = null
|
||||
) = answerInlineQuery(inlineQuery.id, results, cachedTime, isPersonal, nextOffset, switchPmText, switchPmParameter)
|
||||
|
||||
suspend fun TelegramBot.answer(
|
||||
inlineQuery: InlineQuery,
|
||||
results: List<InlineQueryResult> = emptyList(),
|
||||
cachedTime: Int? = null,
|
||||
isPersonal: Boolean? = null,
|
||||
nextOffset: String? = null,
|
||||
switchPmText: String? = null,
|
||||
switchPmParameter: String? = null
|
||||
) = answerInlineQuery(inlineQuery.id, results, cachedTime, isPersonal, nextOffset, switchPmText, switchPmParameter)
|
||||
@@ -0,0 +1,16 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.answers
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.answers.AnswerWebAppQuery
|
||||
import dev.inmo.tgbotapi.types.InlineQueries.InlineQueryResult.abstracts.InlineQueryResult
|
||||
import dev.inmo.tgbotapi.types.WebAppQueryId
|
||||
|
||||
suspend fun TelegramBot.answerWebAppQuery(
|
||||
webAppQueryId: WebAppQueryId,
|
||||
result: InlineQueryResult
|
||||
) = execute(AnswerWebAppQuery(webAppQueryId, result))
|
||||
|
||||
suspend fun TelegramBot.answer(
|
||||
webAppQueryId: WebAppQueryId,
|
||||
result: InlineQueryResult
|
||||
) = execute(AnswerWebAppQuery(webAppQueryId, result))
|
||||
@@ -0,0 +1,12 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.bot
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.bot.ClearMyDefaultAdministratorRights
|
||||
|
||||
suspend fun TelegramBot.clearMyDefaultAdministratorRights(
|
||||
forChannels: Boolean? = null
|
||||
) = execute(ClearMyDefaultAdministratorRights(forChannels))
|
||||
|
||||
suspend fun TelegramBot.clearMyDefaultAdministratorRightsForChannels() = clearMyDefaultAdministratorRights(forChannels = true)
|
||||
|
||||
suspend fun TelegramBot.clearMyDefaultAdministratorRightsForGroupsAndSupergroups() = clearMyDefaultAdministratorRights(forChannels = false)
|
||||
@@ -0,0 +1,17 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.bot
|
||||
|
||||
import dev.inmo.micro_utils.language_codes.IetfLanguageCode
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.bot.DeleteMyCommands
|
||||
import dev.inmo.tgbotapi.types.commands.BotCommandScope
|
||||
import dev.inmo.tgbotapi.types.commands.BotCommandScopeDefault
|
||||
|
||||
suspend fun TelegramBot.deleteMyCommands(
|
||||
scope: BotCommandScope = BotCommandScopeDefault,
|
||||
languageCode: IetfLanguageCode?
|
||||
) = execute(DeleteMyCommands(scope, languageCode))
|
||||
|
||||
suspend fun TelegramBot.deleteMyCommands(
|
||||
scope: BotCommandScope = BotCommandScopeDefault,
|
||||
languageCode: String? = null
|
||||
) = deleteMyCommands(scope, languageCode ?.let(::IetfLanguageCode))
|
||||
@@ -0,0 +1,17 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.bot
|
||||
|
||||
import dev.inmo.micro_utils.language_codes.IetfLanguageCode
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.bot.GetMyCommands
|
||||
import dev.inmo.tgbotapi.types.commands.BotCommandScope
|
||||
import dev.inmo.tgbotapi.types.commands.BotCommandScopeDefault
|
||||
|
||||
suspend fun TelegramBot.getMyCommands(
|
||||
scope: BotCommandScope = BotCommandScopeDefault,
|
||||
languageCode: IetfLanguageCode? = null
|
||||
) = execute(GetMyCommands(scope, languageCode))
|
||||
|
||||
suspend fun TelegramBot.getMyCommands(
|
||||
scope: BotCommandScope = BotCommandScopeDefault,
|
||||
languageCode: String?
|
||||
) = getMyCommands(scope, languageCode ?.let(::IetfLanguageCode))
|
||||
@@ -0,0 +1,12 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.bot
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.bot.GetMyDefaultAdministratorRights
|
||||
|
||||
suspend fun TelegramBot.getMyDefaultAdministratorRights(
|
||||
forChannels: Boolean? = null
|
||||
) = execute(GetMyDefaultAdministratorRights(forChannels))
|
||||
|
||||
suspend fun TelegramBot.getMyDefaultAdministratorRightsForChannels() = getMyDefaultAdministratorRights(forChannels = true)
|
||||
|
||||
suspend fun TelegramBot.getMyDefaultAdministratorRightsForGroupsAndSupergroups() = getMyDefaultAdministratorRights(forChannels = false)
|
||||
@@ -0,0 +1,32 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.bot
|
||||
|
||||
import dev.inmo.micro_utils.language_codes.IetfLanguageCode
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.bot.SetMyCommands
|
||||
import dev.inmo.tgbotapi.types.BotCommand
|
||||
import dev.inmo.tgbotapi.types.commands.BotCommandScope
|
||||
import dev.inmo.tgbotapi.types.commands.BotCommandScopeDefault
|
||||
|
||||
suspend fun TelegramBot.setMyCommands(
|
||||
commands: List<BotCommand>,
|
||||
scope: BotCommandScope = BotCommandScopeDefault,
|
||||
languageCode: IetfLanguageCode?
|
||||
) = execute(SetMyCommands(commands, scope, languageCode))
|
||||
|
||||
suspend fun TelegramBot.setMyCommands(
|
||||
vararg commands: BotCommand,
|
||||
scope: BotCommandScope = BotCommandScopeDefault,
|
||||
languageCode: IetfLanguageCode?
|
||||
) = setMyCommands(commands.toList(), scope, languageCode)
|
||||
|
||||
suspend fun TelegramBot.setMyCommands(
|
||||
commands: List<BotCommand>,
|
||||
scope: BotCommandScope = BotCommandScopeDefault,
|
||||
languageCode: String? = null
|
||||
) = setMyCommands(commands, scope, languageCode ?.let(::IetfLanguageCode))
|
||||
|
||||
suspend fun TelegramBot.setMyCommands(
|
||||
vararg commands: BotCommand,
|
||||
scope: BotCommandScope = BotCommandScopeDefault,
|
||||
languageCode: String? = null
|
||||
) = setMyCommands(commands.toList(), scope, languageCode)
|
||||
@@ -0,0 +1,18 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.bot
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.bot.SetMyDefaultAdministratorRights
|
||||
import dev.inmo.tgbotapi.types.chat.member.ChatAdministratorRightsImpl
|
||||
|
||||
suspend fun TelegramBot.setMyDefaultAdministratorRights(
|
||||
rights: ChatAdministratorRightsImpl,
|
||||
forChannels: Boolean? = null
|
||||
) = execute(SetMyDefaultAdministratorRights(rights, forChannels))
|
||||
|
||||
suspend fun TelegramBot.setMyDefaultAdministratorRightsForChannels(
|
||||
rights: ChatAdministratorRightsImpl
|
||||
) = setMyDefaultAdministratorRights(rights, forChannels = true)
|
||||
|
||||
suspend fun TelegramBot.setMyDefaultAdministratorRightsForGroupsAndSupergroups(
|
||||
rights: ChatAdministratorRightsImpl
|
||||
) = setMyDefaultAdministratorRights(rights, forChannels = false)
|
||||
@@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.ExportChatInviteLink
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
|
||||
suspend fun TelegramBot.exportChatInviteLink(
|
||||
chatId: ChatIdentifier
|
||||
@@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.LeaveChat
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
|
||||
suspend fun TelegramBot.leaveChat(
|
||||
chatId: ChatIdentifier
|
||||
@@ -2,11 +2,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.get
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.get.GetChat
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.*
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.*
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.extended.*
|
||||
import dev.inmo.tgbotapi.types.chat.extended.*
|
||||
import dev.inmo.tgbotapi.utils.PreviewFeature
|
||||
|
||||
suspend fun TelegramBot.getChat(
|
||||
@@ -18,7 +15,7 @@ suspend fun TelegramBot.getChat(
|
||||
) = getChat(chat.id)
|
||||
|
||||
/**
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||
* [ExtendedPublicChat] with unsafe operator "as"
|
||||
*
|
||||
* @throws ClassCastException
|
||||
@@ -30,7 +27,7 @@ suspend fun TelegramBot.getChat(
|
||||
|
||||
|
||||
/**
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||
* [ExtendedChannelChat] with unsafe operator "as"
|
||||
*
|
||||
* @throws ClassCastException
|
||||
@@ -41,7 +38,7 @@ suspend fun TelegramBot.getChat(
|
||||
) = getChat(chat.id) as ExtendedChannelChat
|
||||
|
||||
/**
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||
* [ExtendedChannelChatImpl] with unsafe operator "as"
|
||||
*
|
||||
* @throws ClassCastException
|
||||
@@ -53,7 +50,7 @@ suspend fun TelegramBot.getChat(
|
||||
|
||||
|
||||
/**
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||
* [ExtendedGroupChat] with unsafe operator "as"
|
||||
*
|
||||
* @throws ClassCastException
|
||||
@@ -64,7 +61,7 @@ suspend fun TelegramBot.getChat(
|
||||
) = getChat(chat.id) as ExtendedGroupChat
|
||||
|
||||
/**
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||
* [ExtendedGroupChatImpl] with unsafe operator "as"
|
||||
*
|
||||
* @throws ClassCastException
|
||||
@@ -76,7 +73,7 @@ suspend fun TelegramBot.getChat(
|
||||
|
||||
|
||||
/**
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||
* [ExtendedSupergroupChat] with unsafe operator "as"
|
||||
*
|
||||
* @throws ClassCastException
|
||||
@@ -87,7 +84,7 @@ suspend fun TelegramBot.getChat(
|
||||
) = getChat(chat.id) as ExtendedSupergroupChat
|
||||
|
||||
/**
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||
* [ExtendedSupergroupChatImpl] with unsafe operator "as"
|
||||
*
|
||||
* @throws ClassCastException
|
||||
@@ -99,7 +96,7 @@ suspend fun TelegramBot.getChat(
|
||||
|
||||
|
||||
/**
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||
* [ExtendedPrivateChat] with unsafe operator "as"
|
||||
*
|
||||
* @throws ClassCastException
|
||||
@@ -110,7 +107,7 @@ suspend fun TelegramBot.getChat(
|
||||
) = getChat(chat.id) as ExtendedPrivateChat
|
||||
|
||||
/**
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||
* [ExtendedPrivateChatImpl] with unsafe operator "as"
|
||||
*
|
||||
* @throws ClassCastException
|
||||
@@ -121,7 +118,7 @@ suspend fun TelegramBot.getChat(
|
||||
) = getChat(chat.id) as ExtendedPrivateChatImpl
|
||||
|
||||
/**
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.abstracts.extended.ExtendedChat] to a
|
||||
* Will cast incoming [dev.inmo.tgbotapi.types.chat.ExtendedChat] to a
|
||||
* [ExtendedUser] with unsafe operator "as"
|
||||
*
|
||||
* @throws ClassCastException
|
||||
@@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.get
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.get.GetChatAdministrators
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
|
||||
suspend fun TelegramBot.getChatAdministrators(
|
||||
chatId: ChatIdentifier
|
||||
@@ -0,0 +1,14 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.get
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.get.GetChatMemberCount
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
|
||||
suspend fun TelegramBot.getChatMemberCount(
|
||||
chatId: ChatIdentifier
|
||||
) = execute(GetChatMemberCount(chatId))
|
||||
|
||||
suspend fun TelegramBot.getChatMemberCount(
|
||||
chat: PublicChat
|
||||
) = getChatMemberCount(chat.id)
|
||||
@@ -0,0 +1,14 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.get
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.get.GetChatMenuButton
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.PrivateChat
|
||||
|
||||
suspend fun TelegramBot.getChatMenuButton(
|
||||
chatId: ChatId
|
||||
) = execute(GetChatMenuButton(chatId))
|
||||
|
||||
suspend fun TelegramBot.getChatMenuButton(
|
||||
chat: PrivateChat
|
||||
) = getChatMenuButton(chat.id)
|
||||
@@ -0,0 +1,8 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.get
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.get.GetDefaultChatMenuButton
|
||||
import dev.inmo.tgbotapi.requests.chat.modify.SetDefaultChatMenuButton
|
||||
import dev.inmo.tgbotapi.types.MenuButton
|
||||
|
||||
suspend fun TelegramBot.getDefaultChatMenuButton() = execute(GetDefaultChatMenuButton)
|
||||
@@ -0,0 +1,40 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.invite_links
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.invite_links.ApproveChatJoinRequest
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.*
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate
|
||||
|
||||
suspend fun TelegramBot.approveChatJoinRequest(
|
||||
chatId: ChatIdentifier,
|
||||
userId: UserId
|
||||
) = execute(ApproveChatJoinRequest(chatId, userId))
|
||||
|
||||
suspend fun TelegramBot.approveChatJoinRequest(
|
||||
chat: PublicChat,
|
||||
userId: UserId
|
||||
) = approveChatJoinRequest(chat.id, userId)
|
||||
|
||||
suspend fun TelegramBot.approveChatJoinRequest(
|
||||
chatId: ChatIdentifier,
|
||||
user: User
|
||||
) = approveChatJoinRequest(chatId, user.id)
|
||||
|
||||
suspend fun TelegramBot.approveChatJoinRequest(
|
||||
chat: PublicChat,
|
||||
user: User
|
||||
) = approveChatJoinRequest(chat.id, user.id)
|
||||
|
||||
suspend fun TelegramBot.approveChatJoinRequest(
|
||||
chatJoinRequest: ChatJoinRequest
|
||||
) = approveChatJoinRequest(chatJoinRequest.chat, chatJoinRequest.user)
|
||||
|
||||
suspend fun TelegramBot.approve(
|
||||
chatJoinRequest: ChatJoinRequest
|
||||
) = approveChatJoinRequest(chatJoinRequest)
|
||||
|
||||
suspend fun TelegramBot.approveChatJoinRequest(
|
||||
chatJoinRequestUpdate: ChatJoinRequestUpdate
|
||||
) = approveChatJoinRequest(chatJoinRequestUpdate.data)
|
||||
@@ -0,0 +1,83 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.invite_links
|
||||
|
||||
import com.soywiz.klock.DateTime
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.invite_links.CreateChatInviteLink
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
|
||||
suspend fun TelegramBot.createChatInviteLinkUnlimited(
|
||||
chatId: ChatIdentifier,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null
|
||||
) = execute(CreateChatInviteLink.unlimited(chatId, name, expiration))
|
||||
|
||||
suspend fun TelegramBot.createChatInviteLinkUnlimited(
|
||||
chat: PublicChat,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null,
|
||||
) = createChatInviteLinkUnlimited(chat.id, name, expiration)
|
||||
|
||||
suspend fun TelegramBot.createChatInviteLinkUnlimited(
|
||||
chatId: ChatIdentifier,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = createChatInviteLinkUnlimited(chatId, name, expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.createChatInviteLinkUnlimited(
|
||||
chat: PublicChat,
|
||||
expiration: DateTime,
|
||||
name: String? = null
|
||||
) = createChatInviteLinkUnlimited(chat.id, name, expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.createChatInviteLinkWithLimitedMembers(
|
||||
chatId: ChatIdentifier,
|
||||
membersLimit: MembersLimit,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null
|
||||
) = execute(CreateChatInviteLink.withLimitedMembers(chatId, membersLimit, name, expiration))
|
||||
|
||||
suspend fun TelegramBot.createChatInviteLinkWithLimitedMembers(
|
||||
chat: PublicChat,
|
||||
membersLimit: MembersLimit,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null,
|
||||
) = createChatInviteLinkWithLimitedMembers(chat.id, membersLimit, name, expiration)
|
||||
|
||||
suspend fun TelegramBot.createChatInviteLinkWithLimitedMembers(
|
||||
chatId: ChatIdentifier,
|
||||
membersLimit: MembersLimit,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = createChatInviteLinkWithLimitedMembers(chatId, membersLimit, name, expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.createChatInviteLinkWithLimitedMembers(
|
||||
chat: PublicChat,
|
||||
membersLimit: MembersLimit,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = createChatInviteLinkWithLimitedMembers(chat.id, membersLimit, name, expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.createChatInviteLinkWithJoinRequest(
|
||||
chatId: ChatIdentifier,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null
|
||||
) = execute(CreateChatInviteLink.withJoinRequest(chatId, name, expiration))
|
||||
|
||||
suspend fun TelegramBot.createChatInviteLinkWithJoinRequest(
|
||||
chat: PublicChat,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null,
|
||||
) = createChatInviteLinkWithJoinRequest(chat.id, name, expiration)
|
||||
|
||||
suspend fun TelegramBot.createChatInviteLinkWithJoinRequest(
|
||||
chatId: ChatIdentifier,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = createChatInviteLinkWithJoinRequest(chatId, name, expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.createChatInviteLinkWithJoinRequest(
|
||||
chat: PublicChat,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = createChatInviteLinkWithJoinRequest(chat.id, name, expiration.toTelegramDate())
|
||||
@@ -0,0 +1,40 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.invite_links
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.invite_links.DeclineChatJoinRequest
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.*
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
import dev.inmo.tgbotapi.types.update.ChatJoinRequestUpdate
|
||||
|
||||
suspend fun TelegramBot.declineChatJoinRequest(
|
||||
chatId: ChatIdentifier,
|
||||
userId: UserId
|
||||
) = execute(DeclineChatJoinRequest(chatId, userId))
|
||||
|
||||
suspend fun TelegramBot.declineChatJoinRequest(
|
||||
chat: PublicChat,
|
||||
userId: UserId
|
||||
) = declineChatJoinRequest(chat.id, userId)
|
||||
|
||||
suspend fun TelegramBot.declineChatJoinRequest(
|
||||
chatId: ChatIdentifier,
|
||||
user: User
|
||||
) = declineChatJoinRequest(chatId, user.id)
|
||||
|
||||
suspend fun TelegramBot.declineChatJoinRequest(
|
||||
chat: PublicChat,
|
||||
user: User
|
||||
) = declineChatJoinRequest(chat.id, user.id)
|
||||
|
||||
suspend fun TelegramBot.declineChatJoinRequest(
|
||||
chatJoinRequest: ChatJoinRequest
|
||||
) = declineChatJoinRequest(chatJoinRequest.chat, chatJoinRequest.user)
|
||||
|
||||
suspend fun TelegramBot.decline(
|
||||
chatJoinRequest: ChatJoinRequest
|
||||
) = declineChatJoinRequest(chatJoinRequest)
|
||||
|
||||
suspend fun TelegramBot.declineChatJoinRequest(
|
||||
chatJoinRequestUpdate: ChatJoinRequestUpdate
|
||||
) = declineChatJoinRequest(chatJoinRequestUpdate.data)
|
||||
@@ -0,0 +1,183 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.invite_links
|
||||
|
||||
import com.soywiz.klock.DateTime
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.invite_links.EditChatInviteLink
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkUnlimited(
|
||||
chatId: ChatIdentifier,
|
||||
previousLink: String,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null
|
||||
) = execute(EditChatInviteLink.unlimited(chatId, previousLink, name, expiration))
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkUnlimited(
|
||||
chat: PublicChat,
|
||||
previousLink: String,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null,
|
||||
) = editChatInviteLinkUnlimited(chat.id, previousLink, name, expiration)
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkUnlimited(
|
||||
chatId: ChatIdentifier,
|
||||
previousLink: String,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = editChatInviteLinkUnlimited(chatId, previousLink, name , expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkUnlimited(
|
||||
chat: PublicChat,
|
||||
previousLink: String,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = editChatInviteLinkUnlimited(chat.id, previousLink, name , expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithLimitedMembers(
|
||||
chatId: ChatIdentifier,
|
||||
previousLink: String,
|
||||
membersLimit: MembersLimit,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null
|
||||
) = execute(EditChatInviteLink.withLimitedMembers(chatId, previousLink, membersLimit, name, expiration))
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithLimitedMembers(
|
||||
chat: PublicChat,
|
||||
previousLink: String,
|
||||
membersLimit: MembersLimit,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null,
|
||||
) = editChatInviteLinkWithLimitedMembers(chat.id, previousLink, membersLimit, name, expiration)
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithLimitedMembers(
|
||||
chatId: ChatIdentifier,
|
||||
previousLink: String,
|
||||
membersLimit: MembersLimit,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = editChatInviteLinkWithLimitedMembers(chatId, previousLink, membersLimit, name , expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithLimitedMembers(
|
||||
chat: PublicChat,
|
||||
previousLink: String,
|
||||
membersLimit: MembersLimit,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = editChatInviteLinkWithLimitedMembers(chat.id, previousLink, membersLimit, name , expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithJoinRequest(
|
||||
chatId: ChatIdentifier,
|
||||
previousLink: String,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null
|
||||
) = execute(EditChatInviteLink.withJoinRequest(chatId, previousLink, name, expiration))
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithJoinRequest(
|
||||
chat: PublicChat,
|
||||
previousLink: String,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null,
|
||||
) = editChatInviteLinkWithJoinRequest(chat.id, previousLink, name, expiration)
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithJoinRequest(
|
||||
chatId: ChatIdentifier,
|
||||
previousLink: String,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = editChatInviteLinkWithJoinRequest(chatId, previousLink, name , expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithJoinRequest(
|
||||
chat: PublicChat,
|
||||
previousLink: String,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = editChatInviteLinkWithJoinRequest(chat.id, previousLink, name , expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkUnlimited(
|
||||
chatId: ChatIdentifier,
|
||||
previousLink: ChatInviteLink,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null
|
||||
) = editChatInviteLinkUnlimited(chatId, previousLink.inviteLink, name, expiration)
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkUnlimited(
|
||||
chat: PublicChat,
|
||||
previousLink: ChatInviteLink,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null,
|
||||
) = editChatInviteLinkUnlimited(chat.id, previousLink, name, expiration)
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkUnlimited(
|
||||
chatId: ChatIdentifier,
|
||||
previousLink: ChatInviteLink,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = editChatInviteLinkUnlimited(chatId, previousLink, name, expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkUnlimited(
|
||||
chat: PublicChat,
|
||||
previousLink: ChatInviteLink,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = editChatInviteLinkUnlimited(chat.id, previousLink, name , expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithLimitedMembers(
|
||||
chatId: ChatIdentifier,
|
||||
previousLink: ChatInviteLink,
|
||||
membersLimit: MembersLimit,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null
|
||||
) = editChatInviteLinkWithLimitedMembers(chatId, previousLink.inviteLink, membersLimit, name, expiration)
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithLimitedMembers(
|
||||
chat: PublicChat,
|
||||
previousLink: ChatInviteLink,
|
||||
membersLimit: MembersLimit,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null,
|
||||
) = editChatInviteLinkWithLimitedMembers(chat.id, previousLink, membersLimit, name, expiration)
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithLimitedMembers(
|
||||
chatId: ChatIdentifier,
|
||||
previousLink: ChatInviteLink,
|
||||
membersLimit: MembersLimit,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = editChatInviteLinkWithLimitedMembers(chatId, previousLink, membersLimit, name , expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithLimitedMembers(
|
||||
chat: PublicChat,
|
||||
previousLink: ChatInviteLink,
|
||||
membersLimit: MembersLimit,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = editChatInviteLinkWithLimitedMembers(chat.id, previousLink, membersLimit, name , expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithJoinRequest(
|
||||
chatId: ChatIdentifier,
|
||||
previousLink: ChatInviteLink,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null
|
||||
) = editChatInviteLinkWithJoinRequest(chatId, previousLink.inviteLink, name, expiration)
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithJoinRequest(
|
||||
chat: PublicChat,
|
||||
previousLink: ChatInviteLink,
|
||||
name: String? = null,
|
||||
expiration: TelegramDate? = null,
|
||||
) = editChatInviteLinkWithJoinRequest(chat.id, previousLink, name, expiration)
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithJoinRequest(
|
||||
chatId: ChatIdentifier,
|
||||
previousLink: ChatInviteLink,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = editChatInviteLinkWithJoinRequest(chatId, previousLink, name , expiration.toTelegramDate())
|
||||
|
||||
suspend fun TelegramBot.editChatInviteLinkWithJoinRequest(
|
||||
chat: PublicChat,
|
||||
previousLink: ChatInviteLink,
|
||||
expiration: DateTime,
|
||||
name: String? = null,
|
||||
) = editChatInviteLinkWithJoinRequest(chat.id, previousLink, name , expiration.toTelegramDate())
|
||||
@@ -0,0 +1,27 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.invite_links
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.invite_links.RevokeChatInviteLink
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.ChatInviteLink
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
|
||||
suspend fun TelegramBot.revokeChatInviteLink(
|
||||
chatId: ChatIdentifier,
|
||||
previousLink: String
|
||||
) = execute(RevokeChatInviteLink(chatId, previousLink))
|
||||
|
||||
suspend fun TelegramBot.revokeChatInviteLink(
|
||||
chat: PublicChat,
|
||||
previousLink: String
|
||||
) = revokeChatInviteLink(chat.id, previousLink)
|
||||
|
||||
suspend fun TelegramBot.revokeChatInviteLink(
|
||||
chatId: ChatIdentifier,
|
||||
previousLink: ChatInviteLink
|
||||
) = revokeChatInviteLink(chatId, previousLink.inviteLink)
|
||||
|
||||
suspend fun TelegramBot.revokeChatInviteLink(
|
||||
chat: PublicChat,
|
||||
previousLink: ChatInviteLink
|
||||
) = revokeChatInviteLink(chat, previousLink.inviteLink)
|
||||
@@ -0,0 +1,35 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.members
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.members.BanChatMember
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
|
||||
suspend fun TelegramBot.banChatMember(
|
||||
chatId: ChatIdentifier,
|
||||
userId: UserId,
|
||||
untilDate: TelegramDate? = null,
|
||||
revokeMessages: Boolean? = null
|
||||
) = execute(BanChatMember(chatId, userId, untilDate, revokeMessages))
|
||||
|
||||
suspend fun TelegramBot.banChatMember(
|
||||
chat: PublicChat,
|
||||
userId: UserId,
|
||||
untilDate: TelegramDate? = null,
|
||||
revokeMessages: Boolean? = null
|
||||
) = banChatMember(chat.id, userId, untilDate, revokeMessages)
|
||||
|
||||
suspend fun TelegramBot.banChatMember(
|
||||
chatId: ChatId,
|
||||
user: User,
|
||||
untilDate: TelegramDate? = null,
|
||||
revokeMessages: Boolean? = null
|
||||
) = banChatMember(chatId, user.id, untilDate, revokeMessages)
|
||||
|
||||
suspend fun TelegramBot.banChatMember(
|
||||
chat: PublicChat,
|
||||
user: User,
|
||||
untilDate: TelegramDate? = null,
|
||||
revokeMessages: Boolean? = null
|
||||
) = banChatMember(chat.id, user.id, untilDate, revokeMessages)
|
||||
@@ -0,0 +1,26 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.members
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.members.BanChatSenderChat
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
|
||||
suspend fun TelegramBot.banChatSenderChat(
|
||||
chatId: ChatIdentifier,
|
||||
senderChatId: ChatId
|
||||
) = execute(BanChatSenderChat(chatId, senderChatId))
|
||||
|
||||
suspend fun TelegramBot.banChatSenderChat(
|
||||
chat: PublicChat,
|
||||
senderChatId: ChatId
|
||||
) = banChatSenderChat(chat.id, senderChatId)
|
||||
|
||||
suspend fun TelegramBot.banChatSenderChat(
|
||||
chatId: ChatId,
|
||||
senderChat: PublicChat
|
||||
) = banChatSenderChat(chatId, senderChat.id)
|
||||
|
||||
suspend fun TelegramBot.banChatSenderChat(
|
||||
chat: PublicChat,
|
||||
senderChat: PublicChat,
|
||||
) = banChatSenderChat(chat.id, senderChat)
|
||||
@@ -3,7 +3,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.members.GetChatMember
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
|
||||
suspend fun TelegramBot.getChatMember(
|
||||
chatId: ChatIdentifier,
|
||||
@@ -3,7 +3,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.members.PromoteChatMember
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
|
||||
suspend fun TelegramBot.promoteChatMember(
|
||||
chatId: ChatIdentifier,
|
||||
@@ -17,7 +18,9 @@ suspend fun TelegramBot.promoteChatMember(
|
||||
canInviteUsers: Boolean? = null,
|
||||
canRestrictMembers: Boolean? = null,
|
||||
canPinMessages: Boolean? = null,
|
||||
canPromoteMembers: Boolean? = null
|
||||
canPromoteMembers: Boolean? = null,
|
||||
canManageVideoChats: Boolean? = null,
|
||||
canManageChat: Boolean?
|
||||
) = execute(
|
||||
PromoteChatMember(
|
||||
chatId,
|
||||
@@ -31,7 +34,9 @@ suspend fun TelegramBot.promoteChatMember(
|
||||
canInviteUsers,
|
||||
canRestrictMembers,
|
||||
canPinMessages,
|
||||
canPromoteMembers
|
||||
canPromoteMembers,
|
||||
canManageVideoChats,
|
||||
canManageChat
|
||||
)
|
||||
)
|
||||
|
||||
@@ -47,7 +52,9 @@ suspend fun TelegramBot.promoteChatMember(
|
||||
canInviteUsers: Boolean? = null,
|
||||
canRestrictMembers: Boolean? = null,
|
||||
canPinMessages: Boolean? = null,
|
||||
canPromoteMembers: Boolean? = null
|
||||
canPromoteMembers: Boolean? = null,
|
||||
canManageVideoChats: Boolean? = null,
|
||||
canManageChat: Boolean? = null
|
||||
) = promoteChatMember(
|
||||
chat.id,
|
||||
userId,
|
||||
@@ -60,7 +67,9 @@ suspend fun TelegramBot.promoteChatMember(
|
||||
canInviteUsers,
|
||||
canRestrictMembers,
|
||||
canPinMessages,
|
||||
canPromoteMembers
|
||||
canPromoteMembers,
|
||||
canManageVideoChats,
|
||||
canManageChat
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.promoteChatMember(
|
||||
@@ -75,7 +84,9 @@ suspend fun TelegramBot.promoteChatMember(
|
||||
canInviteUsers: Boolean? = null,
|
||||
canRestrictMembers: Boolean? = null,
|
||||
canPinMessages: Boolean? = null,
|
||||
canPromoteMembers: Boolean? = null
|
||||
canPromoteMembers: Boolean? = null,
|
||||
canManageVideoChats: Boolean? = null,
|
||||
canManageChat: Boolean? = null
|
||||
) = promoteChatMember(
|
||||
chatId,
|
||||
user.id,
|
||||
@@ -88,7 +99,9 @@ suspend fun TelegramBot.promoteChatMember(
|
||||
canInviteUsers,
|
||||
canRestrictMembers,
|
||||
canPinMessages,
|
||||
canPromoteMembers
|
||||
canPromoteMembers,
|
||||
canManageVideoChats,
|
||||
canManageChat
|
||||
)
|
||||
|
||||
suspend fun TelegramBot.promoteChatMember(
|
||||
@@ -103,7 +116,9 @@ suspend fun TelegramBot.promoteChatMember(
|
||||
canInviteUsers: Boolean? = null,
|
||||
canRestrictMembers: Boolean? = null,
|
||||
canPinMessages: Boolean? = null,
|
||||
canPromoteMembers: Boolean? = null
|
||||
canPromoteMembers: Boolean? = null,
|
||||
canManageVideoChats: Boolean? = null,
|
||||
canManageChat: Boolean? = null
|
||||
) = promoteChatMember(
|
||||
chat.id,
|
||||
user.id,
|
||||
@@ -116,5 +131,7 @@ suspend fun TelegramBot.promoteChatMember(
|
||||
canInviteUsers,
|
||||
canRestrictMembers,
|
||||
canPinMessages,
|
||||
canPromoteMembers
|
||||
canPromoteMembers,
|
||||
canManageVideoChats,
|
||||
canManageChat
|
||||
)
|
||||
@@ -3,8 +3,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.members.RestrictChatMember
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.ChatPermissions
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.*
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
|
||||
suspend fun TelegramBot.restrictChatMember(
|
||||
chatId: ChatIdentifier,
|
||||
@@ -3,7 +3,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.members.SetChatAdministratorCustomTitle
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
|
||||
suspend fun TelegramBot.setChatAdministratorCustomTitle(
|
||||
chatId: ChatId,
|
||||
@@ -27,4 +28,4 @@ suspend fun TelegramBot.setChatAdministratorCustomTitle(
|
||||
chat: PublicChat,
|
||||
user: User,
|
||||
customTitle: String
|
||||
) = setChatAdministratorCustomTitle(chat.id, user.id, customTitle)
|
||||
) = setChatAdministratorCustomTitle(chat.id, user.id, customTitle)
|
||||
@@ -3,7 +3,8 @@ package dev.inmo.tgbotapi.extensions.api.chat.members
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.members.UnbanChatMember
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.User
|
||||
|
||||
suspend fun TelegramBot.unbanChatMember(
|
||||
chatId: ChatIdentifier,
|
||||
@@ -0,0 +1,26 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.members
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.members.*
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
|
||||
suspend fun TelegramBot.unbanChatSenderChat(
|
||||
chatId: ChatIdentifier,
|
||||
senderChatId: ChatId
|
||||
) = execute(UnbanChatSenderChat(chatId, senderChatId))
|
||||
|
||||
suspend fun TelegramBot.unbanChatSenderChat(
|
||||
chat: PublicChat,
|
||||
senderChatId: ChatId
|
||||
) = unbanChatSenderChat(chat.id, senderChatId)
|
||||
|
||||
suspend fun TelegramBot.unbanChatSenderChat(
|
||||
chatId: ChatId,
|
||||
senderChat: PublicChat
|
||||
) = unbanChatSenderChat(chatId, senderChat.id)
|
||||
|
||||
suspend fun TelegramBot.unbanChatSenderChat(
|
||||
chat: PublicChat,
|
||||
senderChat: PublicChat,
|
||||
) = unbanChatSenderChat(chat.id, senderChat)
|
||||
@@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.modify
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.modify.DeleteChatPhoto
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
|
||||
suspend fun TelegramBot.deleteChatPhoto(
|
||||
chatId: ChatIdentifier
|
||||
@@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.modify.PinChatMessage
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
suspend fun TelegramBot.pinChatMessage(
|
||||
@@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.modify
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.modify.SetChatDescription
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
|
||||
suspend fun TelegramBot.setChatDescription(
|
||||
chatId: ChatIdentifier,
|
||||
@@ -0,0 +1,16 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.modify
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.modify.*
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.chat.PrivateChat
|
||||
|
||||
suspend fun TelegramBot.setChatMenuButton(
|
||||
chatId: ChatId,
|
||||
menuButton: MenuButton
|
||||
) = execute(SetChatMenuButton(chatId, menuButton))
|
||||
|
||||
suspend fun TelegramBot.setChatMenuButton(
|
||||
chat: PrivateChat,
|
||||
menuButton: MenuButton
|
||||
) = setChatMenuButton(chat.id, menuButton)
|
||||
@@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.modify.SetChatPermissions
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.ChatPermissions
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
|
||||
suspend fun TelegramBot.setDefaultChatMembersPermissions(
|
||||
chatId: ChatIdentifier,
|
||||
@@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.abstracts.MultipartFile
|
||||
import dev.inmo.tgbotapi.requests.chat.modify.SetChatPhoto
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
|
||||
suspend fun TelegramBot.setChatPhoto(
|
||||
chatId: ChatIdentifier,
|
||||
@@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.modify
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.modify.SetChatTitle
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.PublicChat
|
||||
import dev.inmo.tgbotapi.types.chat.PublicChat
|
||||
|
||||
suspend fun TelegramBot.setChatTitle(
|
||||
chatId: ChatIdentifier,
|
||||
@@ -0,0 +1,9 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.chat.modify
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.modify.SetDefaultChatMenuButton
|
||||
import dev.inmo.tgbotapi.types.MenuButton
|
||||
|
||||
suspend fun TelegramBot.setDefaultChatMenuButton(
|
||||
menuButton: MenuButton
|
||||
) = execute(SetDefaultChatMenuButton(menuButton))
|
||||
@@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.modify
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.modify.UnpinAllChatMessages
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
|
||||
suspend fun TelegramBot.unpinAllChatMessages(
|
||||
chatId: ChatIdentifier
|
||||
@@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.modify.UnpinChatMessage
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
suspend fun TelegramBot.unpinChatMessage(
|
||||
@@ -3,7 +3,7 @@ package dev.inmo.tgbotapi.extensions.api.chat.stickers
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.stickers.DeleteChatStickerSet
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.SupergroupChat
|
||||
import dev.inmo.tgbotapi.types.chat.SupergroupChat
|
||||
|
||||
suspend fun TelegramBot.deleteChatStickerSet(
|
||||
chatId: ChatIdentifier
|
||||
@@ -4,7 +4,7 @@ import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.chat.stickers.SetChatStickerSet
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.StickerSetName
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.SupergroupChat
|
||||
import dev.inmo.tgbotapi.types.chat.SupergroupChat
|
||||
|
||||
suspend fun TelegramBot.setChatStickerSet(
|
||||
chatId: ChatIdentifier,
|
||||
@@ -0,0 +1,92 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.LiveLocation
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.location.LiveLocation
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
horizontalAccuracy: Meters? = null,
|
||||
heading: Degrees? = null,
|
||||
proximityAlertRadius: Meters? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(chatId, messageId, latitude, longitude, horizontalAccuracy, heading, proximityAlertRadius, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
horizontalAccuracy: Meters? = null,
|
||||
heading: Degrees? = null,
|
||||
proximityAlertRadius: Meters? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(chat, messageId, latitude, longitude, horizontalAccuracy, heading, proximityAlertRadius, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
horizontalAccuracy: Meters? = null,
|
||||
heading: Degrees? = null,
|
||||
proximityAlertRadius: Meters? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(message, latitude, longitude, horizontalAccuracy, heading, proximityAlertRadius, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
location: LiveLocation,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(chatId, messageId, location, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
location: LiveLocation,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(chat, messageId, location, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
location: LiveLocation,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(message, location, replyMarkup)
|
||||
@@ -0,0 +1,25 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.LiveLocation
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation
|
||||
import dev.inmo.tgbotapi.requests.edit.location.live.EditInlineMessageLiveLocation
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.location.LiveLocation
|
||||
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
latitude: Double,
|
||||
longitude: Double,
|
||||
horizontalAccuracy: Meters? = null,
|
||||
heading: Degrees? = null,
|
||||
proximityAlertRadius: Meters? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(inlineMessageId, latitude, longitude, horizontalAccuracy, heading, proximityAlertRadius, replyMarkup)
|
||||
@Deprecated("Replaced", ReplaceWith("editLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.editLiveLocation"))
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
location: LiveLocation,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(inlineMessageId, location, replyMarkup)
|
||||
@@ -0,0 +1,43 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.LiveLocation
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.location.live.stopLiveLocation
|
||||
import dev.inmo.tgbotapi.requests.edit.location.live.StopChatMessageLiveLocation
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("stopLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.stopLiveLocation"))
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopLiveLocation(chatId, messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("stopLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.stopLiveLocation"))
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopLiveLocation(chat, messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("stopLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.stopLiveLocation"))
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopLiveLocation(message, replyMarkup)
|
||||
@@ -0,0 +1,17 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.LiveLocation
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.location.live.stopLiveLocation
|
||||
import dev.inmo.tgbotapi.requests.edit.location.live.StopInlineMessageLiveLocation
|
||||
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("stopLiveLocation", "dev.inmo.tgbotapi.extensions.api.edit.location.live.stopLiveLocation"))
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopLiveLocation(inlineMessageId, replyMarkup)
|
||||
@@ -0,0 +1,42 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.ReplyMarkup
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editMessageReplyMarkup", "dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup"))
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageReplyMarkup(chatId, messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editMessageReplyMarkup", "dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup"))
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageReplyMarkup(chat, messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editMessageReplyMarkup", "dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup"))
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
message: Message,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageReplyMarkup(message, replyMarkup)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.ReplyMarkup
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup
|
||||
import dev.inmo.tgbotapi.requests.edit.reply_markup.EditInlineMessageReplyMarkup
|
||||
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
@Deprecated("Replaced", ReplaceWith("editMessageReplyMarkup", "dev.inmo.tgbotapi.extensions.api.edit.reply_markup.editMessageReplyMarkup"))
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageReplyMarkup(inlineMessageId, replyMarkup)
|
||||
@@ -1,17 +1,22 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.caption
|
||||
|
||||
import dev.inmo.tgbotapi.CommonAbstracts.CaptionedInput
|
||||
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
|
||||
import dev.inmo.tgbotapi.abstracts.TextedWithTextSources
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.caption.EditChatMessageCaption
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSource
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
|
||||
import dev.inmo.tgbotapi.types.message.content.MediaContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@@ -22,6 +27,10 @@ suspend fun TelegramBot.editMessageCaption(
|
||||
EditChatMessageCaption(chatId, messageId, text, parseMode, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
@@ -30,24 +39,36 @@ suspend fun TelegramBot.editMessageCaption(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageCaption(chat.id, messageId, text, parseMode, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun <T> TelegramBot.editMessageCaption(
|
||||
message: ContentMessage<T>,
|
||||
text: String,
|
||||
parseMode: ParseMode? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): ContentMessage<MediaContent> where T : CaptionedInput, T : MediaContent {
|
||||
): ContentMessage<MediaContent> where T : TextedWithTextSources, T : MediaContent {
|
||||
return editMessageCaption(message.chat.id, message.messageId, text, parseMode, replyMarkup)
|
||||
}
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
entities: List<TextSource>,
|
||||
entities: TextSourcesList,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = execute(
|
||||
EditChatMessageCaption(chatId, messageId, entities, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
@@ -55,10 +76,14 @@ suspend fun TelegramBot.editMessageCaption(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageCaption(chat.id, messageId, entities, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun <T> TelegramBot.editMessageCaption(
|
||||
message: ContentMessage<T>,
|
||||
entities: List<TextSource>,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
): ContentMessage<MediaContent> where T : CaptionedInput, T : MediaContent {
|
||||
): ContentMessage<MediaContent> where T : TextedWithTextSources, T : MediaContent {
|
||||
return editMessageCaption(message.chat.id, message.messageId, entities, replyMarkup)
|
||||
}
|
||||
@@ -1,12 +1,16 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.caption
|
||||
|
||||
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.caption.EditInlineMessageCaption
|
||||
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
text: String,
|
||||
@@ -14,8 +18,12 @@ suspend fun TelegramBot.editMessageCaption(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = execute(EditInlineMessageCaption(inlineMessageId, text, parseMode, replyMarkup))
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
entities: List<TextSource>,
|
||||
entities: TextSourcesList,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = execute(EditInlineMessageCaption(inlineMessageId, entities, replyMarkup))
|
||||
@@ -1,14 +1,18 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.LiveLocation
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.location.live
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.LiveLocation.EditChatMessageLiveLocation
|
||||
import dev.inmo.tgbotapi.requests.edit.location.live.EditChatMessageLiveLocation
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.location.LiveLocation
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@@ -24,6 +28,10 @@ suspend fun TelegramBot.editLiveLocation(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
@@ -35,6 +43,10 @@ suspend fun TelegramBot.editLiveLocation(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(chat.id, messageId, latitude, longitude, horizontalAccuracy, heading, proximityAlertRadius, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
latitude: Double,
|
||||
@@ -45,6 +57,10 @@ suspend fun TelegramBot.editLiveLocation(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(message.chat, message.messageId, latitude, longitude, horizontalAccuracy, heading, proximityAlertRadius, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@@ -56,6 +72,10 @@ suspend fun TelegramBot.editLiveLocation(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
@@ -63,6 +83,10 @@ suspend fun TelegramBot.editLiveLocation(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editLiveLocation(chat.id, messageId, location.latitude, location.longitude, location.horizontalAccuracy, location.heading, location.proximityAlertRadius, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
location: LiveLocation,
|
||||
@@ -1,7 +1,7 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.LiveLocation
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.location.live
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.LiveLocation.EditInlineMessageLiveLocation
|
||||
import dev.inmo.tgbotapi.requests.edit.location.live.EditInlineMessageLiveLocation
|
||||
import dev.inmo.tgbotapi.types.*
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.location.LiveLocation
|
||||
@@ -1,14 +1,18 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.LiveLocation
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.location.live
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.LiveLocation.StopChatMessageLiveLocation
|
||||
import dev.inmo.tgbotapi.requests.edit.location.live.StopChatMessageLiveLocation
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.LocationContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@@ -19,12 +23,20 @@ suspend fun TelegramBot.stopLiveLocation(
|
||||
)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = stopLiveLocation(chat.id, messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
message: ContentMessage<LocationContent>,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
@@ -1,10 +1,14 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.LiveLocation
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.location.live
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.LiveLocation.StopInlineMessageLiveLocation
|
||||
import dev.inmo.tgbotapi.requests.edit.location.live.StopInlineMessageLiveLocation
|
||||
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.stopLiveLocation(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
@@ -3,31 +3,43 @@ package dev.inmo.tgbotapi.extensions.api.edit.media
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.media.EditChatMessageMedia
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.InputMedia.InputMedia
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMedia
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.abstracts.MediaContent
|
||||
import dev.inmo.tgbotapi.types.message.content.MediaContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageMedia(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
media: InputMedia,
|
||||
media: TelegramMedia,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = execute(
|
||||
EditChatMessageMedia(chatId, messageId, media, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageMedia(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
media: InputMedia,
|
||||
media: TelegramMedia,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageMedia(chat.id, messageId, media, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageMedia(
|
||||
message: ContentMessage<out MediaContent>,
|
||||
media: InputMedia,
|
||||
media: TelegramMedia,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageMedia(message.chat.id, message.messageId, media, replyMarkup)
|
||||
@@ -3,11 +3,15 @@ package dev.inmo.tgbotapi.extensions.api.edit.media
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.media.EditInlineMessageMedia
|
||||
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.InputMedia.InputMedia
|
||||
import dev.inmo.tgbotapi.types.media.TelegramMedia
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageCaption(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
media: InputMedia,
|
||||
media: TelegramMedia,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = execute(EditInlineMessageMedia(inlineMessageId, media, replyMarkup))
|
||||
@@ -1,13 +1,17 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.ReplyMarkup
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.reply_markup
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.ReplyMarkup.EditChatMessageReplyMarkup
|
||||
import dev.inmo.tgbotapi.requests.edit.reply_markup.EditChatMessageReplyMarkup
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.Message
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@@ -16,12 +20,20 @@ suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
EditChatMessageReplyMarkup(chatId, messageId, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageReplyMarkup(chat.id, messageId, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
message: Message,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
@@ -1,10 +1,14 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.ReplyMarkup
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.reply_markup
|
||||
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.ReplyMarkup.EditInlineMessageReplyMarkup
|
||||
import dev.inmo.tgbotapi.requests.edit.reply_markup.EditInlineMessageReplyMarkup
|
||||
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageReplyMarkup(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
@@ -1,16 +1,20 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.text
|
||||
|
||||
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.text.EditChatMessageText
|
||||
import dev.inmo.tgbotapi.types.ChatIdentifier
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.MessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
import dev.inmo.tgbotapi.types.chat.abstracts.Chat
|
||||
import dev.inmo.tgbotapi.types.chat.Chat
|
||||
import dev.inmo.tgbotapi.types.message.abstracts.ContentMessage
|
||||
import dev.inmo.tgbotapi.types.message.content.TextContent
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
@@ -22,6 +26,10 @@ suspend fun TelegramBot.editMessageText(
|
||||
EditChatMessageText(chatId, messageId, text, parseMode, disableWebPagePreview, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
@@ -31,6 +39,10 @@ suspend fun TelegramBot.editMessageText(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageText(chat.id, messageId, text, parseMode, disableWebPagePreview, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
message: ContentMessage<TextContent>,
|
||||
text: String,
|
||||
@@ -39,27 +51,39 @@ suspend fun TelegramBot.editMessageText(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageText(message.chat.id, message.messageId, text, parseMode, disableWebPagePreview, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
chatId: ChatIdentifier,
|
||||
messageId: MessageIdentifier,
|
||||
entities: List<TextSource>,
|
||||
entities: TextSourcesList,
|
||||
disableWebPagePreview: Boolean? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = execute(
|
||||
EditChatMessageText(chatId, messageId, entities, disableWebPagePreview, replyMarkup)
|
||||
)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
chat: Chat,
|
||||
messageId: MessageIdentifier,
|
||||
entities: List<TextSource>,
|
||||
entities: TextSourcesList,
|
||||
disableWebPagePreview: Boolean? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageText(chat.id, messageId, entities, disableWebPagePreview, replyMarkup)
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
message: ContentMessage<TextContent>,
|
||||
entities: List<TextSource>,
|
||||
entities: TextSourcesList,
|
||||
disableWebPagePreview: Boolean? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = editMessageText(message.chat.id, message.messageId, entities, disableWebPagePreview, replyMarkup)
|
||||
) = editMessageText(message.chat.id, message.messageId, entities, disableWebPagePreview, replyMarkup)
|
||||
@@ -1,12 +1,16 @@
|
||||
package dev.inmo.tgbotapi.extensions.api.edit.text
|
||||
|
||||
import dev.inmo.tgbotapi.CommonAbstracts.TextSource
|
||||
import dev.inmo.tgbotapi.bot.TelegramBot
|
||||
import dev.inmo.tgbotapi.requests.edit.text.EditInlineMessageText
|
||||
import dev.inmo.tgbotapi.types.InlineMessageIdentifier
|
||||
import dev.inmo.tgbotapi.types.ParseMode.ParseMode
|
||||
import dev.inmo.tgbotapi.types.message.textsources.TextSourcesList
|
||||
import dev.inmo.tgbotapi.types.message.ParseMode
|
||||
import dev.inmo.tgbotapi.types.buttons.InlineKeyboardMarkup
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
text: String,
|
||||
@@ -15,9 +19,13 @@ suspend fun TelegramBot.editMessageText(
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = execute(EditInlineMessageText(inlineMessageId, text, parseMode, disableWebPagePreview, replyMarkup))
|
||||
|
||||
/**
|
||||
* @param replyMarkup Some [InlineKeyboardMarkup]. See [dev.inmo.tgbotapi.extensions.utils.types.buttons.inlineKeyboard]
|
||||
* as a builder for that
|
||||
*/
|
||||
suspend fun TelegramBot.editMessageText(
|
||||
inlineMessageId: InlineMessageIdentifier,
|
||||
entities: List<TextSource>,
|
||||
entities: TextSourcesList,
|
||||
disableWebPagePreview: Boolean? = null,
|
||||
replyMarkup: InlineKeyboardMarkup? = null
|
||||
) = execute(EditInlineMessageText(inlineMessageId, entities, disableWebPagePreview, replyMarkup))
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user