Compare commits

..
Author SHA1 Message Date
InsanusMokrassar 113621f619 Merge branch '4.0.0' into task/676-rework_of_media_groups 2022-11-08 13:07:55 +06:00
InsanusMokrassar 6a899f1217 add threadIdOrNull extension 2022-11-08 13:07:16 +06:00
InsanusMokrassar 6bc96162a8 add waiters and small improvement of triggers 2022-11-08 12:17:56 +06:00
InsanusMokrassar 4736610aa8 several fixes 2022-11-08 02:50:22 +06:00
InsanusMokrassar f6f07a5e8a fixes 2022-11-08 02:27:38 +06:00
InsanusMokrassar b32ce88a97 fixes 2022-11-08 01:51:27 +06:00
InsanusMokrassar 47f514a635 Merge branch '4.0.0' into task/676-rework_of_media_groups 2022-11-08 00:36:46 +06:00
InsanusMokrassar a80ed2ec57 fixes in replies 2022-11-08 00:21:16 +06:00
InsanusMokrassar b1bba43f29 update api according to new topics api 2022-11-08 00:11:14 +06:00
InsanusMokrassar 9df258805d add support of threads in send requests of core module 2022-11-07 23:02:58 +06:00
InsanusMokrassar 8654437293 add TelegramBot#getForumTopicIconStickers 2022-11-06 16:01:05 +06:00
InsanusMokrassar bdbca92fe5 add api extensions for topics requests 2022-11-06 15:55:15 +06:00
InsanusMokrassar aca4d90608 add support of forum requests 2022-11-06 15:29:48 +06:00
InsanusMokrassar ad75aef64f add support of forum topic service messages 2022-11-06 14:56:01 +06:00
InsanusMokrassar 5bf30bc6c6 fix 2022-11-06 14:28:16 +06:00
InsanusMokrassar acd3298d4d active_usernames support 2022-11-06 14:26:51 +06:00
InsanusMokrassar 3f6f04d00f add support of emoji_status_custom_emoji_id 2022-11-06 14:21:28 +06:00
InsanusMokrassar c7f372c1e3 can_manage_topics support 2022-11-06 14:18:34 +06:00
InsanusMokrassar 1ed620df85 add support of message thread id in media group messages 2022-11-06 14:10:09 +06:00
InsanusMokrassar 541e00fa03 start rework 2022-11-06 14:07:31 +06:00
InsanusMokrassar 867a46d397 add support of forum chats 2022-11-06 12:51:53 +06:00
InsanusMokrassar 8f4eb74e39 Update CHANGELOG.md 2022-11-05 20:07:23 +06:00
InsanusMokrassar 16cc49e412 start 4.0.0 2022-11-05 20:05:18 +06:00
InsanusMokrassar f58614e5be Merge pull request #674 from InsanusMokrassar/renovate/ksp
Update ksp to v1.7.20-1.0.8
2022-11-05 01:16:51 +06:00
renovate[bot] c3a09b53fc Update ksp to v1.7.20-1.0.8 2022-11-03 23:26:46 +00:00
InsanusMokrassar c8413e1d18 Merge pull request #671 from InsanusMokrassar/3.3.1
3.3.1
2022-11-01 12:43:18 +06:00
InsanusMokrassar 8b15296ee7 Update CHANGELOG.md 2022-11-01 12:41:35 +06:00
InsanusMokrassar 0fcc717269 Update libs.versions.toml 2022-11-01 12:41:24 +06:00
InsanusMokrassar 2ce26b4f1e Update CHANGELOG.md 2022-10-31 02:28:23 +06:00
InsanusMokrassar b5d499b623 Update libs.versions.toml 2022-10-31 02:27:23 +06:00
InsanusMokrassar 102515dc8a Update CHANGELOG.md 2022-10-31 02:25:16 +06:00
InsanusMokrassar 777a58ce9a a little bit refactor hasCommands 2022-10-30 20:10:12 +06:00
InsanusMokrassar 7471da4ff0 update version of library 2022-10-30 19:48:04 +06:00
InsanusMokrassar e753db0e71 Merge pull request #662 from InsanusMokrassar/renovate/korlibs
Update korlibs to v3.3.0
2022-10-28 18:54:53 +06:00
InsanusMokrassar 70984424e3 Merge pull request #669 from madhead/feature/initial-filters
Add `hasCommands` / `hasNoCommands` extensions on `CommonMessage`
2022-10-28 18:54:16 +06:00
InsanusMokrassar c8354a330e Merge pull request #670 from InsanusMokrassar/renovate/ktor
Update ktor to v2.1.3
2022-10-28 18:53:38 +06:00
InsanusMokrassar 037ad8b87c Update gradle.properties 2022-10-28 18:51:52 +06:00
renovate[bot] 89550107d6 Update ktor to v2.1.3 2022-10-28 11:44:50 +00:00
madhead 86cc7cfb3d Add hasCommands / hasNoCommands extensions on CommonMessage
These extensions are meant to be used as arguments to the `initialFilter` parameter in behaviour builder triggers.
2022-10-24 03:46:30 +02:00
renovate[bot] 858586e608 Update korlibs to v3.3.0 2022-10-23 00:42:04 +00:00
InsanusMokrassar d9846f27c9 Merge pull request #665 from InsanusMokrassar/3.3.0
3.3.0
2022-10-22 18:00:02 +06:00
InsanusMokrassar c10da2a10a Update CHANGELOG.md 2022-10-22 17:59:54 +06:00
InsanusMokrassar 8ed216619d deprecate TelegramBot#getStickerSet 2022-10-22 17:41:55 +06:00
InsanusMokrassar 62a9c687d5 update dependencies and changelog 2022-10-22 14:33:43 +06:00
InsanusMokrassar c2918c308f Merge pull request #668 from d1snin/wait-command-message
Added `BehaviourContext.waitCommandMessage` supporting `BotCommand`
2022-10-20 06:56:06 +06:00
d1snin 81fbff0bf5 added BehaviourContext.waitCommandMessage supporting BotCommand 2022-10-19 22:15:15 +03:00
InsanusMokrassar 54fb58de81 Update CHANGELOG.md 2022-10-19 19:25:01 +06:00
InsanusMokrassar 94ed4fed10 Update libs.versions.toml 2022-10-19 19:19:14 +06:00
InsanusMokrassar 63ceec70ca Merge pull request #664 from d1snin/bot-command
added `EntitiesBuilder.botCommand` and `EntitiesBuilder.botCommandln`…
2022-10-13 23:32:58 +06:00
root 636382fc8f Update EntitiesBuilder.kt 2022-10-13 23:31:41 +06:00
root ac7bf60182 Update BotCommandTextSource.kt 2022-10-13 23:30:34 +06:00
root bd91d4a0c0 Update CommandHandling.kt 2022-10-13 23:29:36 +06:00
d1snin 7488eb9d4b added botCommand text source factory function supporting BotCommand 2022-10-13 19:56:26 +03:00
InsanusMokrassar 6fcd248aff update microutils 2022-10-13 18:25:44 +06:00
InsanusMokrassar 5fa1804003 start 0.3.3 2022-10-13 18:24:59 +06:00
d1snin 0c9919e9e7 added command handling functions supporting BotCommand 2022-10-12 21:04:20 +03:00
d1snin 9405aa4467 added EntitiesBuilder.botCommand and EntitiesBuilder.botCommandln overloads supporting BotCommand 2022-10-12 20:57:42 +03:00
InsanusMokrassar 4f75bc792d Merge pull request #659 from InsanusMokrassar/3.2.7
3.2.7
2022-10-01 23:36:51 +06:00
InsanusMokrassar fda53cf171 update dependencies 2022-10-01 22:09:01 +06:00
InsanusMokrassar b588622c3d deprecate old row methods for keyboard builders 2022-09-28 20:48:55 +06:00
InsanusMokrassar 8b64a0c94e keyboard builders become typealiases 2022-09-28 20:38:16 +06:00
InsanusMokrassar 959f0dffba start 3.2.7 2022-09-28 20:02:45 +06:00
InsanusMokrassar 8fc9185884 Merge pull request #656 from InsanusMokrassar/3.2.6
3.2.6
2022-09-19 14:59:34 +06:00
InsanusMokrassar 3a9cf03958 add edit extensions with builders of text sources 2022-09-19 14:34:19 +06:00
InsanusMokrassar 7cd97ac779 All the extensions related to text messages (replies, sending, editing) got their duplicates with buildEntities lambda and separator 2022-09-19 13:52:14 +06:00
InsanusMokrassar c460b4eacc small refactoring inside of entities builder 2022-09-19 12:57:22 +06:00
InsanusMokrassar 0aa58bd9f6 improve deprecation messages in old entities builder 2022-09-19 12:10:17 +06:00
InsanusMokrassar a4a82f69c6 replace entities builder 2022-09-19 11:18:01 +06:00
InsanusMokrassar d450ed9126 Fixes in ChatMemberSerializer#serialize method 2022-09-19 02:17:40 +06:00
InsanusMokrassar 69c5f1ae7d start 3.2.6 2022-09-19 02:16:12 +06:00
InsanusMokrassar e4e8eadfb5 Merge pull request #655 from InsanusMokrassar/3.2.5
3.2.5
2022-09-19 01:51:49 +06:00
InsanusMokrassar c1374c118d Improve support of new exceptions recovering mechanism 2022-09-19 01:39:23 +06:00
InsanusMokrassar 6004b159ec 3.2.5 2022-09-19 00:17:30 +06:00
InsanusMokrassar 67f95682d5 Merge pull request #654 from InsanusMokrassar/3.2.4
3.2.4
2022-09-16 21:29:21 +06:00
InsanusMokrassar 5aa5460a43 new edits 2022-09-16 16:36:21 +06:00
InsanusMokrassar e937845fc7 start 3.2.4 2022-09-16 15:43:40 +06:00
InsanusMokrassar 96f40e55bc Merge pull request #653 from InsanusMokrassar/3.2.3
3.2.3
2022-09-15 15:28:54 +06:00
InsanusMokrassar d3d8603c35 upfix 2022-09-15 15:22:08 +06:00
InsanusMokrassar 759650892c fix in DeleteMyCommands 2022-09-15 15:06:19 +06:00
InsanusMokrassar b58550a9ec start 3.2.3 2022-09-15 15:05:38 +06:00
InsanusMokrassar e15817e7c5 Merge pull request #652 from InsanusMokrassar/3.2.2
3.2.2
2022-09-15 13:11:29 +06:00
InsanusMokrassar 4cd1316e27 fix build 2022-09-15 12:46:17 +06:00
InsanusMokrassar 3575a62f34 MessageIdentifier -> MessageId, replies with chatsIds/messageIds 2022-09-15 00:17:18 +06:00
InsanusMokrassar 82f7d5bd4f start 3.2.2 2022-09-15 00:02:22 +06:00
InsanusMokrassar 7a5e6a69a1 Update README.md 2022-09-14 10:58:03 +06:00
InsanusMokrassar fd25db5633 Merge pull request #651 from InsanusMokrassar/3.2.1
3.2.1
2022-09-08 14:45:27 +06:00
InsanusMokrassar f539a24740 Update CHANGELOG.md 2022-09-08 14:36:10 +06:00
InsanusMokrassar 1d7b4ea862 Update libs.versions.toml 2022-09-08 14:35:17 +06:00
InsanusMokrassar 2d6f296c20 update dependencies 2022-09-07 16:33:29 +06:00
InsanusMokrassar 0ba1aa1127 start 3.2.1 2022-09-07 16:32:37 +06:00
InsanusMokrassar ae8a461e9d Merge pull request #648 from InsanusMokrassar/3.2.0
3.2.0
2022-08-26 16:36:27 +06:00
InsanusMokrassar 99f16e33a6 Update CHANGELOG.md 2022-08-26 12:44:11 +06:00
InsanusMokrassar e029b29f7f fixes 2022-08-26 12:20:20 +06:00
InsanusMokrassar c04f795fdd migrate onto 3.2.0 from 3.1.2 2022-08-26 11:00:36 +06:00
InsanusMokrassar b873898100 wrap client request exception into exception handling 2022-08-25 13:35:15 +06:00
InsanusMokrassar 61ac9df5e3 BotException 2022-08-25 13:32:12 +06:00
InsanusMokrassar b1931900e7 Update BotCommandTextSource.kt 2022-08-25 02:11:04 +06:00
InsanusMokrassar fab3af48d6 Update WaitCommandsMessages.kt 2022-08-25 02:04:19 +06:00
InsanusMokrassar 8d7563b6e4 Update WaitCommandsMessages.kt 2022-08-25 02:02:45 +06:00
InsanusMokrassar 05112afe0c add deeplinks triggers 2022-08-24 15:32:34 +06:00
InsanusMokrassar 9ea06de27c add waitCommands* expectations 2022-08-24 15:03:54 +06:00
InsanusMokrassar fff05a40d9 revert adding of mention waiters 2022-08-24 13:29:57 +06:00
InsanusMokrassar 5c6428f220 update microutils 2022-08-23 13:13:06 +06:00
InsanusMokrassar 766b7ca205 add waiters for mentions 2022-08-23 13:12:22 +06:00
InsanusMokrassar 41e6c52369 allowedUpdates is ALL_UPDATES_LIST by default everywhere 2022-08-23 11:55:28 +06:00
InsanusMokrassar 06013f624f update dependencies 2022-08-23 11:48:55 +06:00
InsanusMokrassar d8bba89f3f start 3.1.2 2022-08-23 11:47:31 +06:00
InsanusMokrassar 141281f96d Merge pull request #643 from InsanusMokrassar/3.1.1
3.1.1
2022-08-15 01:31:59 +06:00
InsanusMokrassar be7aaa7845 fixes and improvements in webapps 2022-08-15 01:29:24 +06:00
InsanusMokrassar 78c224ffa8 fix on asUser fun 2022-08-15 01:21:10 +06:00
InsanusMokrassar a08d07f7b3 fixes in popup params and buttons 2022-08-15 01:20:29 +06:00
InsanusMokrassar 69dde19543 Update CHANGELOG.md 2022-08-14 22:13:03 +06:00
InsanusMokrassar e8a3b93831 Update Extended.kt 2022-08-14 22:11:55 +06:00
InsanusMokrassar e10caa3171 add support of has_restricted_voice_and_video_messages 2022-08-14 21:56:25 +06:00
InsanusMokrassar d4fe4e09fc add support of Bot API 6.2 in webapp parts 2022-08-14 21:52:26 +06:00
InsanusMokrassar ad453afba2 start 3.1.1 2022-08-14 18:55:08 +06:00
InsanusMokrassar a0daca28b1 Merge pull request #642 from InsanusMokrassar/3.1.0
3.1.0
2022-08-13 14:44:00 +06:00
InsanusMokrassar cd62a9ef3c fixes 2022-08-13 14:40:00 +06:00
InsanusMokrassar 3c084d70e5 fix of #588 2022-08-13 13:13:07 +06:00
InsanusMokrassar 2611d4ecc1 fill changelog with dependnecies updates 2022-08-13 13:06:18 +06:00
InsanusMokrassar b4d853dfa0 update bot api support info 2022-08-13 13:03:34 +06:00
InsanusMokrassar 5044075adf add support of sticker_type for new sticker sets and rework create new sticker set requests 2022-08-13 13:01:09 +06:00
InsanusMokrassar 5f2660b804 fill raw sticker data 2022-08-13 12:20:28 +06:00
InsanusMokrassar c72dccc0f9 rework of stickers and stickersets 2022-08-13 11:58:42 +06:00
InsanusMokrassar 3fc1058491 start rework of stickers and stickersets 2022-08-13 00:02:48 +06:00
InsanusMokrassar c3668e978b add support of custom emojis 2022-08-12 23:21:53 +06:00
InsanusMokrassar 5a4a6d5710 start 3.1.0 2022-08-12 22:42:47 +06:00
InsanusMokrassar ed1d8beb2e Update libs.versions.toml 2022-08-12 13:28:45 +06:00
InsanusMokrassar 881ede7d2a start 3.0.3 2022-08-12 13:25:58 +06:00
InsanusMokrassar 60d3d279e7 Update gradle-wrapper.properties 2022-08-06 10:19:22 +06:00
InsanusMokrassar 4b84518dbb Merge pull request #637 from InsanusMokrassar/3.0.2
3.0.2
2022-08-06 00:40:46 +06:00
InsanusMokrassar 8b451791dd fixes 2022-08-06 00:39:46 +06:00
InsanusMokrassar 771fb5c288 Update build.gradle 2022-08-05 23:48:15 +06:00
InsanusMokrassar d19ee74f8b Update CHANGELOG.md 2022-08-05 23:47:43 +06:00
InsanusMokrassar aaf489c2ed Update gradle.properties 2022-08-05 23:47:06 +06:00
InsanusMokrassar 1b06b63703 update to hotfix up to 3.0.1 2022-08-05 22:49:32 +06:00
InsanusMokrassar bf7fc25285 make lib dependency implementation instead of api 2022-08-05 22:30:11 +06:00
InsanusMokrassar 4df242747f fix dokka build 2022-08-05 22:03:10 +06:00
InsanusMokrassar e831ca143e Merge pull request #634 from InsanusMokrassar/3.0.0
3.0.0
2022-08-05 21:54:31 +06:00
InsanusMokrassar 44838a2088 optimize imports in behaviour builder common 2022-08-05 21:44:36 +06:00
InsanusMokrassar 3823b03453 fixes 2022-08-05 21:43:15 +06:00
InsanusMokrassar ec48708195 start to fill changelog 2022-08-05 21:27:45 +06:00
InsanusMokrassar 6a06775bc4 add file annotations generation to the class casts 2022-08-05 18:57:50 +06:00
InsanusMokrassar bbdff0b31a rename file with new classcasts 2022-08-05 17:31:45 +06:00
InsanusMokrassar cb4880bd00 optimize imports in utils 2022-08-05 16:35:07 +06:00
InsanusMokrassar a18eda3db6 add generation of class casts 2022-08-05 16:31:39 +06:00
InsanusMokrassar d8f6429385 solution for #636 2022-08-05 11:49:04 +06:00
InsanusMokrassar be74249b67 Update README.md 2022-08-05 01:48:44 +06:00
InsanusMokrassar 69f658e4a8 rewrite hierarchy of forward info classes 2022-08-04 22:45:26 +06:00
InsanusMokrassar 8c51ca9d72 fixes in forward from public chat info 2022-08-04 22:27:40 +06:00
InsanusMokrassar 48c4a3156b fix of build 2022-08-04 18:15:51 +06:00
InsanusMokrassar 92407c9010 remove deprecations from copyMessage 2022-08-04 18:09:25 +06:00
InsanusMokrassar 86937cc096 remove deprecations 2022-08-04 18:01:35 +06:00
InsanusMokrassar ea614b790b update serialization 2022-08-04 17:45:35 +06:00
InsanusMokrassar c994332cb9 update dependencies 2022-08-04 17:18:05 +06:00
InsanusMokrassar 9d893ffa48 start 3.0.0 2022-08-04 17:12:34 +06:00
InsanusMokrassar 57d2fe85c5 Merge pull request #632 from InsanusMokrassar/2.2.2
2.2.2
2022-07-31 19:26:47 +06:00
InsanusMokrassar c68b148d5e inline buildEntities 2022-07-31 18:26:07 +06:00
InsanusMokrassar 0a0a7cea0e fixes in callback query triggers 2022-07-31 17:49:48 +06:00
InsanusMokrassar ea981605f6 start 0.2.2 2022-07-31 17:46:59 +06:00
InsanusMokrassar fe1e65a83c Merge pull request #630 from InsanusMokrassar/2.2.1
2.2.1
2022-07-22 20:00:27 +06:00
InsanusMokrassar c85983bd59 update microutils 2022-07-22 18:45:09 +06:00
InsanusMokrassar d72e1029d3 fill changelog 2022-07-22 16:50:20 +06:00
InsanusMokrassar 4b89563cff fixes in classcasts, withContentOrNull and withContentOrThrow 2022-07-22 16:45:54 +06:00
InsanusMokrassar 542079f4bf Merge pull request #629 from d1snin/tgbotapi-627
Add content-oriented typealiases for messages
2022-07-22 16:15:02 +06:00
d1snin 5c7164e864 refactored the handlers to use new typealiases when possible 2022-07-18 11:59:01 +03:00
InsanusMokrassar 6329905f62 Update libs.versions.toml 2022-07-18 14:53:10 +06:00
InsanusMokrassar c54945e4cc Update gradle-wrapper.properties 2022-07-18 14:52:16 +06:00
InsanusMokrassar 8f20e1d617 Update gradle.properties 2022-07-18 14:48:52 +06:00
d1snin edbfedb74e added logically missing typealiases 2022-07-18 11:26:18 +03:00
d1snin b5006cd1e0 Add content-oriented typealiases for messages 2022-07-18 11:02:13 +03:00
InsanusMokrassar ca01ce7843 Merge pull request #628 from InsanusMokrassar/tg_channel_imh
Tg Channel QR
2022-07-18 13:44:04 +06:00
root 54fad3f338 Add files via upload 2022-07-18 13:43:06 +06:00
InsanusMokrassar 15ef481fd7 Update README.md 2022-07-18 13:42:17 +06:00
InsanusMokrassar 91e1202674 Delete 68a81ca4-7950-48df-b842-85f285ce3741.jpg 2022-07-18 13:33:23 +06:00
root bdd39963a8 Add files via upload 2022-07-18 13:31:30 +06:00
InsanusMokrassar 01dfedf540 Merge pull request #623 from InsanusMokrassar/2.2.0
2.2.0
2022-07-11 11:18:07 +06:00
InsanusMokrassar 8ded892b72 new class casts 2022-07-11 02:20:28 +06:00
InsanusMokrassar d0b606469b fixes related to owner chat member 2022-07-11 02:05:10 +06:00
InsanusMokrassar 678f79da04 CreatorChatMember -> OwnerChatMember 2022-07-11 01:56:31 +06:00
InsanusMokrassar fde2c79f4c extract force_reply field into constant 2022-07-11 01:43:04 +06:00
InsanusMokrassar acaf46e015 ReplyForce companion improvements 2022-07-11 01:27:28 +06:00
InsanusMokrassar 3f9237b5de flatInlineKeyboard and flatReplyKeyboard 2022-07-11 01:10:35 +06:00
InsanusMokrassar 3d7334dd62 sameChat 2022-07-11 00:57:13 +06:00
InsanusMokrassar 26306f1567 sameMessage 2022-07-11 00:53:20 +06:00
InsanusMokrassar 247553d990 add note about parameters order 2022-07-11 00:45:11 +06:00
InsanusMokrassar 049a8a3263 copy message order of parameters changed 2022-07-11 00:26:57 +06:00
InsanusMokrassar cc67a31e97 start 2.2.0 2022-07-11 00:10:30 +06:00
InsanusMokrassar 8791573145 Update build.gradle 2022-07-10 00:04:36 +06:00
InsanusMokrassar 5752f7a4fb Merge pull request #622 from InsanusMokrassar/2.1.3
2.1.3
2022-07-09 23:54:18 +06:00
InsanusMokrassar ade236eaa3 update microutils 2022-07-09 23:52:16 +06:00
InsanusMokrassar e7340a483a fixes 2022-07-09 23:45:24 +06:00
InsanusMokrassar c7dc69d09f ChatJoinRequest#inviteLink fix 2022-07-09 23:09:52 +06:00
InsanusMokrassar c2487c5adc fixes in links 2022-07-09 22:43:19 +06:00
InsanusMokrassar 7c4808f163 start 2.1.3 2022-07-09 22:37:58 +06:00
InsanusMokrassar b91b516659 Merge pull request #618 from InsanusMokrassar/2.1.2
2.1.2
2022-06-29 14:42:01 +06:00
InsanusMokrassar 57cdc4ff2a fill changelog 2022-06-29 14:27:29 +06:00
InsanusMokrassar 864992aff0 complete rewriting on libs.versions.toml 2022-06-29 14:23:45 +06:00
InsanusMokrassar e18e8ba6df start to use more unified way of scripts organization 2022-06-29 13:47:21 +06:00
InsanusMokrassar 02cedc6626 start 2.1.2 2022-06-29 13:27:35 +06:00
InsanusMokrassar 619b890956 Merge pull request #615 from InsanusMokrassar/2.1.1
2.1.1
2022-06-26 13:42:26 +06:00
InsanusMokrassar 100a76a832 Update CHANGELOG.md 2022-06-26 13:36:13 +06:00
InsanusMokrassar c583ae6761 replace all the edits into one file 2022-06-26 13:18:22 +06:00
InsanusMokrassar 7429ffb514 add TelegramBot#send extensions 2022-06-25 23:06:41 +06:00
InsanusMokrassar 95aeedfb94 Update DeleteMessage.kt 2022-06-25 18:34:41 +06:00
InsanusMokrassar 095e318a78 Update DeleteMessage.kt 2022-06-25 18:04:20 +06:00
InsanusMokrassar 4aa2d2ae41 Update gradle.properties 2022-06-25 03:13:46 +06:00
InsanusMokrassar e936d25c13 TelegramBot#edit 2022-06-25 02:49:38 +06:00
InsanusMokrassar 97a2a5d9fd exists methods of editing text/caption improvements 2022-06-25 02:19:20 +06:00
InsanusMokrassar 00ab532eac start 2.1.1 2022-06-25 02:11:23 +06:00
InsanusMokrassar c2cc6ee1ec Merge pull request #613 from InsanusMokrassar/2.1.0
2.1.0
2022-06-21 23:09:27 +06:00
InsanusMokrassar d20b94e52c rename PremiumChat -> PossiblyPremiumChat 2022-06-21 23:06:36 +06:00
InsanusMokrassar 9f3cc6eafb add mention about 6.1 telegram bot api support 2022-06-21 18:58:01 +06:00
InsanusMokrassar f86a095421 CreateInvoiceLink 2022-06-21 18:52:55 +06:00
InsanusMokrassar b0c6b80d8b small improvements 2022-06-21 18:30:31 +06:00
InsanusMokrassar 1df653f428 SetWebhook#secretToken 2022-06-21 17:55:21 +06:00
InsanusMokrassar 8dfaca7648 CommonUser#addedToAttachmentMenu 2022-06-21 17:52:16 +06:00
InsanusMokrassar 04db76831f add support of premium fields 2022-06-21 17:34:14 +06:00
InsanusMokrassar f2e9bf6bd8 update webapps support 2022-06-21 16:35:48 +06:00
InsanusMokrassar cde8fdeffd start 2.1.0 2022-06-21 15:22:34 +06:00
InsanusMokrassar e74f339ae2 Merge pull request #609 from InsanusMokrassar/2.0.3
2.0.3
2022-06-17 14:34:23 +06:00
InsanusMokrassar ff7702486f downloadFileToTemp 2022-06-17 13:49:44 +06:00
InsanusMokrassar c7818fe4df Update gradle.properties 2022-06-17 11:04:31 +06:00
InsanusMokrassar 8243acd69e regularln 2022-06-17 02:51:22 +06:00
InsanusMokrassar 8081602a39 update microutils 2022-06-17 00:20:30 +06:00
InsanusMokrassar 6fd85dbc56 start 2.0.3 2022-06-17 00:16:23 +06:00
InsanusMokrassar 8d6f4ba136 Merge pull request #602 from InsanusMokrassar/2.0.2
2.0.2
2022-06-05 21:01:10 +06:00
InsanusMokrassar b95b339ad1 Update CHANGELOG.md 2022-06-05 17:40:53 +06:00
InsanusMokrassar 637979100b Update gradle.properties 2022-06-05 17:40:13 +06:00
InsanusMokrassar 4067439a13 update micro_utils 2022-06-04 21:01:40 +06:00
InsanusMokrassar 03583ff6c1 start 2.0.2 2022-06-04 21:00:33 +06:00
InsanusMokrassar c1330f8e32 Merge pull request #598 from InsanusMokrassar/2.0.1
2.0.1
2022-05-29 23:06:15 +06:00
InsanusMokrassar db36c6aacb Update CHANGELOG.md 2022-05-29 22:16:55 +06:00
InsanusMokrassar 757e317e70 Update gradle.properties 2022-05-29 22:15:56 +06:00
InsanusMokrassar cb708a1ba4 Update CHANGELOG.md 2022-05-29 09:03:18 +06:00
InsanusMokrassar 551276f78e Update gradle.properties 2022-05-29 09:02:52 +06:00
InsanusMokrassar 88339a4977 Update CHANGELOG.md 2022-05-28 09:56:40 +06:00
InsanusMokrassar a13371e14c Update gradle.properties 2022-05-28 09:55:10 +06:00
InsanusMokrassar ad7fdc6211 improvements in longPolling extension 2022-05-22 22:36:56 +06:00
InsanusMokrassar c870a48a22 start 2.0.1 2022-05-22 22:35:45 +06:00
InsanusMokrassar 3149fd0231 Merge pull request #597 from InsanusMokrassar/2.0.0
2.0.0
2022-05-22 12:58:46 +06:00
InsanusMokrassar 7430490499 fixes for build 2022-05-22 01:46:11 +06:00
InsanusMokrassar 416187e079 remove deprecations 2022-05-22 01:40:03 +06:00
InsanusMokrassar e7aec75aca removing of filters for the wait triggers 2022-05-22 01:27:52 +06:00
InsanusMokrassar 95a466a08b start 2.0.0 2022-05-21 23:53:45 +06:00
InsanusMokrassar 507cb2af26 cleanup waiters in behaviour builder and add withEvent 2022-05-21 23:38:42 +06:00
InsanusMokrassar 126a07cdc7 start 1.2.0 2022-05-21 23:32:36 +06:00
InsanusMokrassar 27a24a18a6 fix of updates funnel in subsequent behaviour contexts 2022-05-21 21:44:33 +06:00
InsanusMokrassar 562e8c7429 improvements in Beheviour Context 2022-05-21 17:33:44 +06:00
InsanusMokrassar be027efc43 start 1.1.4 2022-05-21 17:27:04 +06:00
InsanusMokrassar e55195b308 Merge pull request #593 from InsanusMokrassar/1.1.3
1.1.3
2022-05-19 13:38:05 -04:00
InsanusMokrassar 14afb59b5f StateHandlingErrorHandler in microutils 2022-05-19 20:37:52 +06:00
InsanusMokrassar 6b23347d56 start 1.1.3 2022-05-19 20:24:55 +06:00
InsanusMokrassar f54843fb60 Merge pull request #592 from InsanusMokrassar/1.1.2
1.1.2
2022-05-18 07:10:31 -04:00
InsanusMokrassar 8a3538d9c7 fixes in relate to main behaviourBuilder fun 2022-05-18 17:05:47 +06:00
InsanusMokrassar e3db4250bb add default copy realization in BehaviourContextWithFSM 2022-05-18 16:52:52 +06:00
InsanusMokrassar 4643ac906a StateHandlingErrorHandler 2022-05-18 16:45:08 +06:00
InsanusMokrassar 497974e45c fix of #591 2022-05-18 16:31:14 +06:00
InsanusMokrassar 78a00f0efb start 1.1.2 2022-05-18 16:27:30 +06:00
InsanusMokrassar 14ecb9d948 Merge pull request #590 from InsanusMokrassar/1.1.1
1.1.1
2022-05-17 09:56:47 -04:00
InsanusMokrassar c759b9a466 deprecate hmac and hex extensions for CryptoJS in webapp 2022-05-17 19:54:13 +06:00
InsanusMokrassar 58c1f2ee6a fixes in TelegramAPIUrlsKeeper#checkWebAppLink 2022-05-17 19:51:14 +06:00
InsanusMokrassar 9d16ca3b7e small refactor of buildBehaviourWithLongPolling 2022-05-16 18:59:30 +06:00
InsanusMokrassar 9d40e598f1 buildBehaciour returns BehaviourContext 2022-05-16 18:58:19 +06:00
InsanusMokrassar f1be8bf16e start 1.1.1 2022-05-16 18:53:15 +06:00
InsanusMokrassar 56a8804e99 Merge pull request #589 from InsanusMokrassar/1.1.0
1.1.0
2022-05-14 12:21:08 +06:00
InsanusMokrassar 1e73aac750 Update Webhook.kt 2022-05-14 02:32:39 +06:00
InsanusMokrassar 82c6eda0b7 Update Webhook.kt 2022-05-14 02:31:36 +06:00
InsanusMokrassar e9ff93cde1 improvements in webhooks 2022-05-14 01:35:38 +06:00
InsanusMokrassar 9b179ea1c9 start 1.1.0 2022-05-14 00:06:32 +06:00
InsanusMokrassar 72d20d2344 Merge pull request #586 from InsanusMokrassar/1.0.1
1.0.1
2022-05-13 00:52:50 +06:00
InsanusMokrassar bcd288fe05 update dependencies 2022-05-12 17:51:42 +06:00
InsanusMokrassar 75477060e9 start 1.0.1 2022-05-12 17:50:04 +06:00
InsanusMokrassar 60df609486 Merge pull request #564 from InsanusMokrassar/1.0.0
1.0.0
2022-05-12 00:05:05 +06:00
InsanusMokrassar 556b492b35 remove redundant changelog part 2022-05-11 19:54:33 +06:00
InsanusMokrassar 53e8c53fb1 extract ReplyKeyboardMarkup fields names to the constants 2022-05-11 12:08:20 +06:00
InsanusMokrassar 69d36c5c1b a little refactor 2022-05-11 11:04:21 +06:00
InsanusMokrassar ad97008f12 refactoring and fixes 2022-05-11 10:56:31 +06:00
InsanusMokrassar 3e58114eeb Update BehaviourWithFSMStateHandlerHolder.kt 2022-05-11 10:30:47 +06:00
InsanusMokrassar d55d8fa000 fixes in behaviour builders 2022-05-11 02:47:00 +06:00
InsanusMokrassar bd32dbb3ab update dependencies note in changelog 2022-05-10 23:59:40 +06:00
InsanusMokrassar 8e0389f032 update microutils 2022-05-10 23:53:05 +06:00
InsanusMokrassar cb37b85234 update previews 2022-05-09 02:27:06 +06:00
InsanusMokrassar df01976ea8 fix of build 2022-05-08 00:39:41 +06:00
InsanusMokrassar 7be74e468b Merge branch 'master' into 1.0.0 2022-05-08 00:38:05 +06:00
InsanusMokrassar 437176203a Merge pull request #584 from InsanusMokrassar/0.38.23
0.38.23
2022-05-08 00:33:27 +06:00
InsanusMokrassar 7b25862035 optimize imports 2022-05-08 00:30:47 +06:00
InsanusMokrassar 45585caab0 fix of #560 2022-05-08 00:28:00 +06:00
InsanusMokrassar 6fea2a12d8 start 0.38.23 2022-05-07 23:26:26 +06:00
InsanusMokrassar ae639d38e0 Merge branch 'master' into 1.0.0 2022-05-05 14:58:07 +06:00
InsanusMokrassar 0510f72859 Merge pull request #583 from InsanusMokrassar/0.38.22
0.38.22
2022-05-05 14:33:59 +06:00
InsanusMokrassar 233c789054 improvements in keyboards and add tgWebAppStartParamField 2022-05-04 23:11:20 +06:00
InsanusMokrassar 52f405c3b1 start 0.38.22 2022-05-04 23:10:31 +06:00
InsanusMokrassar 199856acce Merge pull request #581 from InsanusMokrassar/0.38.21
0.38.21
2022-05-04 13:35:08 +06:00
InsanusMokrassar f36d642ec8 sendDataOrWorkWithQueryId 2022-05-04 13:05:54 +06:00
InsanusMokrassar aa6e5b2284 fix of WebAppInitData#queryId js name 2022-05-04 12:58:06 +06:00
InsanusMokrassar 32b83ac687 start 0.38.21 2022-05-04 12:51:14 +06:00
InsanusMokrassar a2206b99a2 Merge branch 'master' into 1.0.0 2022-05-04 11:13:17 +06:00
InsanusMokrassar 90e0b1ac81 Merge pull request #580 from InsanusMokrassar/0.38.20
0.38.20
2022-05-04 11:11:53 +06:00
InsanusMokrassar 1b5b3af45b add handleResult 2022-05-04 11:01:48 +06:00
InsanusMokrassar 7ff6412ec5 TelegramBot#answerWebAppQuery 2022-05-04 10:51:38 +06:00
InsanusMokrassar bd23d3fbdb hotfixes 2022-05-03 23:12:03 +06:00
InsanusMokrassar 08147fc33b start 0.38.20 2022-05-03 23:11:02 +06:00
InsanusMokrassar ba4c153659 Merge pull request #579 from InsanusMokrassar/0.38.19
0.38.19
2022-05-03 14:36:22 +06:00
InsanusMokrassar 3c3607d817 fill changelog 2022-05-03 14:32:29 +06:00
InsanusMokrassar d0add888c4 now the handlers from the upstream lists are not modified in the whole fsm behaviour context 2022-05-03 14:28:03 +06:00
InsanusMokrassar 3e3adab46b complete fix of issue with subcontexts 2022-05-03 13:58:13 +06:00
InsanusMokrassar 89d13de307 deprecation of BehaviourContextWithFSMBuilder 2022-05-03 10:38:48 +06:00
InsanusMokrassar 32451f4e1c start 0.38.19 2022-05-03 09:44:39 +06:00
InsanusMokrassar 721c3f2430 fix after merge 2022-05-02 14:19:56 +06:00
InsanusMokrassar fc92df8fbe Merge branch 'master' into 1.0.0 2022-05-02 13:50:31 +06:00
InsanusMokrassar ad50f41d1e Merge pull request #578 from InsanusMokrassar/0.38.18
0.38.18
2022-05-02 13:49:24 +06:00
InsanusMokrassar 8c9cd9df67 fix of #577 2022-05-02 13:21:43 +06:00
InsanusMokrassar 8e7f7a03c8 note about xzima help 2022-05-02 12:44:20 +06:00
InsanusMokrassar 484e09374d small refactor 2022-05-02 12:29:30 +06:00
Alex 619c82bb32 fix: new BehaviourContext ignored 2022-05-02 12:29:21 +06:00
InsanusMokrassar 33fb75a5eb start 0.38.18 2022-05-02 12:28:39 +06:00
InsanusMokrassar 901c1e8956 Merge pull request #576 from xzima/fix_new_BehaviourContext_ignored
fix: new BehaviourContext ignored
2022-05-02 08:50:20 +06:00
InsanusMokrassar 2ae105cb15 small refactor 2022-05-02 08:49:58 +06:00
Alex db14eee3b6 fix: new BehaviourContext ignored 2022-05-02 01:16:24 +03:00
InsanusMokrassar 6f8b881668 replaces of CommonAbstracts 2022-05-01 22:13:40 +06:00
InsanusMokrassar d113d4f0f5 replace ReplyMarkups and api extensions for live locations 2022-05-01 21:33:36 +06:00
InsanusMokrassar dd893b14d3 replaces of live location editing requests 2022-05-01 21:20:31 +06:00
InsanusMokrassar 19ddff2999 MediaGroupUpdates replaces 2022-05-01 21:01:03 +06:00
InsanusMokrassar 7f08fd9d66 replace ParseMode 2022-05-01 20:43:03 +06:00
InsanusMokrassar d3cb44490b TextSources replacements 2022-05-01 20:36:07 +06:00
InsanusMokrassar 4d3cad16a4 Merge branch 'master' into 1.0.0 2022-05-01 17:26:21 +06:00
InsanusMokrassar a52f31f4c9 Merge pull request #575 from InsanusMokrassar/0.38.17
0.38.17
2022-05-01 17:23:33 +06:00
InsanusMokrassar 682f696866 fill changelog 2022-05-01 17:23:12 +06:00
InsanusMokrassar 87fff2e5d0 add BotCommandScope helper extensions 2022-05-01 17:18:44 +06:00
InsanusMokrassar 92b4ba2ff0 fix of #574 2022-05-01 16:50:03 +06:00
InsanusMokrassar 9014cdbc99 start 0.38.17 2022-05-01 16:41:47 +06:00
InsanusMokrassar d0709a509f cleanup in message contents 2022-05-01 11:52:02 +06:00
InsanusMokrassar 0273d07777 update ktor 2022-05-01 11:22:23 +06:00
InsanusMokrassar bafb0c2459 fix incosistences after updating of dependencies 2022-05-01 11:21:01 +06:00
InsanusMokrassar 9be2b899cb Merge branch 'master' into 1.0.0 2022-05-01 11:07:22 +06:00
InsanusMokrassar 37317a1055 Merge pull request #573 from InsanusMokrassar/0.38.16
0.38.16
2022-04-29 23:28:12 +06:00
InsanusMokrassar 60c21002e1 fixes 2022-04-29 19:50:02 +06:00
InsanusMokrassar 78a7a3546a remove checking of webapp data from webapp module due to its existing in core 2022-04-29 19:18:22 +06:00
InsanusMokrassar 4799617ced "TelegramAPIUrlsKeeper" now have two new things: properties "webAppDataSecretKey" and fun "checkWebAppLink" 2022-04-29 19:11:38 +06:00
InsanusMokrassar c70484076d start 0.38.16 2022-04-29 18:56:38 +06:00
InsanusMokrassar 9f451f25f7 update dependencies 2022-04-28 10:40:44 +06:00
InsanusMokrassar 506c2b4a09 Merge branch 'master' into 1.0.0 2022-04-26 15:20:59 +06:00
InsanusMokrassar 0c92e6eeb4 Merge pull request #570 from InsanusMokrassar/0.38.15
0.38.15
2022-04-26 13:45:09 +06:00
InsanusMokrassar efd1c8f83a add additional onDataCallbackQuery variants with regex filters 2022-04-26 13:22:00 +06:00
InsanusMokrassar 7e57a0e4e0 revert update of microutils version 2022-04-26 13:07:16 +06:00
InsanusMokrassar 6b977e67d0 Revert "add telegram update handler"
This reverts commit ab5937449c.
2022-04-26 13:05:56 +06:00
InsanusMokrassar ab5937449c add telegram update handler 2022-04-25 22:28:35 +06:00
InsanusMokrassar 61d3131bf2 update micro_utils 2022-04-25 21:58:25 +06:00
InsanusMokrassar 048f244449 update microutils 2022-04-25 21:19:49 +06:00
InsanusMokrassar 6ebf4ff652 fixes in MessageContent#serializationModule 2022-04-25 21:19:08 +06:00
InsanusMokrassar b4c41d7dd8 start 0.38.15 2022-04-24 18:39:07 +06:00
InsanusMokrassar 6cbe313e42 Merge branch 'master' into 1.0.0 2022-04-23 12:50:12 +06:00
InsanusMokrassar 930507ab80 Merge pull request #568 from InsanusMokrassar/0.38.14
0.38.14
2022-04-23 12:43:02 +06:00
InsanusMokrassar 56d3628dd3 add support of menu buttons 2022-04-23 12:39:14 +06:00
InsanusMokrassar 56d7853f68 update defaults in telegramBot factories 2022-04-23 12:34:38 +06:00
InsanusMokrassar 0a27d9bf28 add shortcuts for telegram and webApp in webapps 2022-04-23 12:34:26 +06:00
InsanusMokrassar c74df3960c fixes in viewport changed events 2022-04-23 12:34:13 +06:00
InsanusMokrassar f4b080cb45 now WebAppData is data class 2022-04-23 12:34:05 +06:00
InsanusMokrassar 350b77f6ff add webAppButton overload with url as string 2022-04-23 12:33:56 +06:00
InsanusMokrassar 955e14f67c add trigger and expectation for WebAppData 2022-04-23 12:33:45 +06:00
InsanusMokrassar ae88b7d94d fix dokka 2022-04-23 12:33:34 +06:00
InsanusMokrassar 88c62bd51c add checking of data in web app 2022-04-23 12:33:23 +06:00
InsanusMokrassar 705bcbe352 webapps 2022-04-23 12:32:39 +06:00
InsanusMokrassar ffcc149c40 update info about supported telegram bot api version 2022-04-23 12:31:37 +06:00
InsanusMokrassar 402d91f9f2 add support of SentWebAppMessage 2022-04-23 12:31:22 +06:00
InsanusMokrassar c19bccc7d1 add support of WebAppInfo 2022-04-23 12:30:35 +06:00
InsanusMokrassar 2c71377058 voice(_c/C)hat* -> video(_c/C)hat* renames 2022-04-23 12:30:15 +06:00
InsanusMokrassar 12d2c05110 add support of WebhookInfo#lastSynchronizationErrorDate 2022-04-23 12:28:40 +06:00
InsanusMokrassar ddf46c1afd add support of ChatAdministratorRights 2022-04-23 12:27:24 +06:00
InsanusMokrassar dd0a8b99c7 add WebAppData 2022-04-23 12:26:28 +06:00
InsanusMokrassar 75fb72936f fix of 563 2022-04-23 12:25:39 +06:00
InsanusMokrassar 1a6a010446 start 0.38.14 2022-04-23 12:24:52 +06:00
InsanusMokrassar 900ef28404 rename InputMedia -> TelegramMedia and replace all InputMedia to media package 2022-04-22 13:54:06 +06:00
InsanusMokrassar a930423955 chats sealing 2022-04-22 00:16:41 +06:00
InsanusMokrassar 323c4de858 replace of ChatMember 2022-04-21 23:24:01 +06:00
InsanusMokrassar cdd5649c04 CallbackQuery package -> queries.callback 2022-04-21 22:42:54 +06:00
InsanusMokrassar 2275a61d73 deprecation of dev.inmo.tgbotapi.bot.Ktor 2022-04-21 21:57:11 +06:00
InsanusMokrassar bf8f4c75f8 update defaults in telegramBot factories 2022-04-21 21:48:25 +06:00
InsanusMokrassar b5334c2b72 fix of #556 2022-04-21 17:54:21 +06:00
InsanusMokrassar 8331d4edd7 fix of #546 2022-04-21 15:42:32 +06:00
InsanusMokrassar 0e6a708eea add shortcuts for telegram and webApp in webapps 2022-04-21 14:49:52 +06:00
InsanusMokrassar fbc5e9f8c4 fixes in viewport changed events 2022-04-21 14:49:52 +06:00
InsanusMokrassar 040a996df6 now WebAppData is data class 2022-04-21 14:49:52 +06:00
InsanusMokrassar cf27600fb5 add webAppButton overload with url as string 2022-04-21 14:49:52 +06:00
InsanusMokrassar 1d42f86623 add trigger and expectation for WebAppData 2022-04-21 14:49:52 +06:00
InsanusMokrassar a9cb07fa0d fix dokka 2022-04-21 14:49:52 +06:00
InsanusMokrassar dd7567f43c add checking of data in web app 2022-04-21 14:49:52 +06:00
InsanusMokrassar d0006bb089 webapps 2022-04-21 14:49:52 +06:00
InsanusMokrassar 7d8b990ec4 remove tgbotapi.extensions.* 2022-04-21 14:49:52 +06:00
InsanusMokrassar 4d20e2cd1c update info about supported telegram bot api version 2022-04-21 14:49:52 +06:00
InsanusMokrassar 4ffe6f915f add support of SentWebAppMessage 2022-04-21 14:49:52 +06:00
InsanusMokrassar 22a7697447 add support of WebAppInfo 2022-04-21 14:49:52 +06:00
InsanusMokrassar ef9941134e voice(_c/C)hat* -> video(_c/C)hat* renames 2022-04-21 14:49:52 +06:00
InsanusMokrassar ba85b8657d add support of WebhookInfo#lastSynchronizationErrorDate 2022-04-21 14:49:52 +06:00
InsanusMokrassar 2dcbc0df32 add support of ChatAdministratorRights 2022-04-21 14:49:52 +06:00
InsanusMokrassar 7bac4a3a32 add support of menu buttons 2022-04-21 14:49:52 +06:00
InsanusMokrassar 63bcc4bcf8 add WebAppData 2022-04-21 14:49:52 +06:00
InsanusMokrassar 643f8e577e fix of #550 2022-04-21 14:49:52 +06:00
InsanusMokrassar 721b82f912 fix of 563 2022-04-21 14:49:52 +06:00
InsanusMokrassar 892aef738d start 1.0.0 🎉 2022-04-21 14:49:52 +06:00
InsanusMokrassar 4c7bfe99c0 Merge pull request #567 from InsanusMokrassar/renovate/github_release_plugin_version
Update dependency com.github.breadmoirai:github-release to v2.3.7
2022-04-20 20:13:28 +06:00
Renovate Bot 1e4b8d405e Update dependency com.github.breadmoirai:github-release to v2.3.7 2022-04-19 00:27:10 +00:00
InsanusMokrassar 007112e67a Merge pull request #559 from InsanusMokrassar/0.38.13
0.38.13
2022-04-17 00:26:23 +06:00
InsanusMokrassar a87c21273d BehaviourContext#on*Message extensions 2022-04-17 00:22:00 +06:00
InsanusMokrassar ff2d1615da replace TODO for pipelineStepsHolder with default realization 2022-04-16 23:58:24 +06:00
InsanusMokrassar 08ef146daa Update gradle.properties 2022-04-13 23:12:32 +06:00
InsanusMokrassar a404a6c59c fixes in DownloadFIleChannelRequestCallFactory 2022-04-11 21:56:47 +06:00
InsanusMokrassar 1089c716f3 deprecate StorageFileInfo 2022-04-11 21:00:56 +06:00
InsanusMokrassar 81ad55b19f add KtorPipelineStepsHolder#onRequestReturnResult 2022-04-11 14:41:02 +06:00
InsanusMokrassar 863c872f35 start to add pipelines and fix mention creation 2022-04-11 12:46:33 +06:00
InsanusMokrassar ece6a917ed start 0.38.13 2022-04-11 11:59:37 +06:00
InsanusMokrassar 12248aa702 Merge pull request #555 from InsanusMokrassar/0.38.12
0.38.12
2022-04-09 12:24:57 +06:00
InsanusMokrassar 83ea4f6435 Update gradle.properties 2022-04-08 09:49:06 +06:00
InsanusMokrassar 52204d8df1 Experemtally update kotlin 2022-04-08 09:44:37 +06:00
InsanusMokrassar 81b9ccdf6a Update VideoContent.kt 2022-04-08 09:29:07 +06:00
InsanusMokrassar fa74f12505 Update CHANGELOG.md 2022-04-08 02:09:22 +06:00
InsanusMokrassar be284c4d96 Update dependencies 2022-04-08 02:08:21 +06:00
InsanusMokrassar 1769fcacfd update gradle 2022-04-06 11:45:08 +06:00
InsanusMokrassar 4207d89c92 accumulated updates improvements 2022-04-04 13:16:18 +06:00
InsanusMokrassar 87ee2f280b remove redundant TextedMediaInputMediaContent 2022-04-03 19:56:34 +06:00
InsanusMokrassar 3d458b2dc6 fixes in builds and filling up functionality related to new classes 2022-04-03 19:48:48 +06:00
InsanusMokrassar ee1c7c6533 TextedMediaGroupMediaInput 2022-04-03 19:37:56 +06:00
InsanusMokrassar 97d122c770 TextedMediaContent fixes 2022-04-03 19:29:48 +06:00
InsanusMokrassar 49da0faf45 replies with texted content 2022-04-03 19:21:38 +06:00
InsanusMokrassar d426cb1210 TextedMediaContent 2022-04-03 19:06:27 +06:00
InsanusMokrassar af83ac79e7 start 0.38.12 2022-04-03 18:35:17 +06:00
InsanusMokrassar 602f15c206 Update README.md 2022-04-01 00:01:25 +06:00
InsanusMokrassar c2f40534e6 Update README.md 2022-03-31 23:55:34 +06:00
InsanusMokrassar 5693d4d808 Merge pull request #548 from InsanusMokrassar/0.38.11
0.38.11
2022-03-29 23:40:04 +06:00
InsanusMokrassar 9fe55aa6ef Update CHANGELOG.md 2022-03-29 12:42:02 +06:00
InsanusMokrassar 8f817f1492 reply with any media file 2022-03-29 12:37:54 +06:00
InsanusMokrassar 0fd146655d old matrix and row deprecation 2022-03-29 12:27:03 +06:00
InsanusMokrassar 94e5f74a90 reply with content 2022-03-29 12:20:52 +06:00
InsanusMokrassar b9bffbb71b update dependencies 2022-03-27 13:47:38 +06:00
InsanusMokrassar 5ec5c3bdfd Fixes in "TextSourcesList" creating in from "RawMessageEntities" 2022-03-27 13:44:41 +06:00
InsanusMokrassar a5ed2a82bb start 0.38.11 2022-03-27 13:36:21 +06:00
InsanusMokrassar 1b7dd11e75 Merge pull request #545 from InsanusMokrassar/0.38.10
0.38.10
2022-03-25 10:36:21 +06:00
InsanusMokrassar 8d0307fb7f update github building yml 2022-03-24 16:49:08 +06:00
InsanusMokrassar c500f0a281 update reply and sendPhoto with PhotoSize 2022-03-24 16:47:07 +06:00
InsanusMokrassar b3abeaa5ae Update packages_publishing.yml 2022-03-23 17:03:08 +06:00
InsanusMokrassar 8930a66134 with*Action block called once 2022-03-23 11:48:20 +06:00
InsanusMokrassar 76a2a2ca74 start 0.38.10 2022-03-23 05:06:48 +06:00
InsanusMokrassar 7dff8af460 Update gradle.properties 2022-03-23 05:01:09 +06:00
InsanusMokrassar 5261ab1cf0 start 0.38.10 2022-03-23 05:00:28 +06:00
InsanusMokrassar f45c653fca Merge pull request #544 from InsanusMokrassar/0.38.9
0.38.9
2022-03-22 19:06:29 +06:00
InsanusMokrassar 5e03098ca8 fill changelog 2022-03-22 19:06:02 +06:00
InsanusMokrassar 2a3d8e6e73 publication scripts update 2022-03-22 16:26:18 +06:00
InsanusMokrassar 8c3dac7932 signature clashes fixes 2022-03-21 23:23:19 +06:00
InsanusMokrassar 83fb7f7bcb add opportunity to use several bots in one to serve bots requests 2022-03-21 23:06:23 +06:00
InsanusMokrassar 459414e7dd add RistFeature to SerializationModule 2022-03-21 17:03:37 +06:00
InsanusMokrassar 508d51f5a9 reply with copyMessage 2022-03-20 12:14:26 +06:00
InsanusMokrassar 36f22579b2 add MessageContent.Companion#serializationModule 2022-03-20 11:52:29 +06:00
InsanusMokrassar d3d5f7f2e6 start 0.38.9 2022-03-20 11:50:52 +06:00
InsanusMokrassar 1369680419 Merge pull request #543 from InsanusMokrassar/0.38.8
0.38.8
2022-03-19 21:15:03 +06:00
InsanusMokrassar f6e819be62 simpleFilter to list wrapper 2022-03-19 12:49:14 +06:00
InsanusMokrassar 553da0a3ee update dependencies and fill changelog 2022-03-19 12:27:46 +06:00
InsanusMokrassar bace2724da a little bit refactor MediaGroupTriggers.kt 2022-03-19 10:15:44 +06:00
InsanusMokrassar be710612b5 Update MediaGroupTriggers.kt 2022-03-19 09:55:48 +06:00
InsanusMokrassar ea19c10f41 start 0.38.8 2022-03-18 19:18:34 +06:00
InsanusMokrassar 1b88881c62 Update README.md 2022-03-14 02:50:38 +06:00
InsanusMokrassar be62c4fe37 Merge pull request #540 from InsanusMokrassar/0.38.7
0.38.7
2022-03-12 14:32:20 +06:00
InsanusMokrassar d3499cdde1 update microutils and fill changelog 2022-03-12 13:41:49 +06:00
InsanusMokrassar 01d04f9d2b Update gradle-wrapper.properties 2022-03-11 22:31:19 +06:00
InsanusMokrassar d290992e40 Update gradle.properties 2022-03-11 22:30:52 +06:00
InsanusMokrassar 867bdb8bd7 Update CHANGELOG.md 2022-03-08 00:18:25 +06:00
InsanusMokrassar 5f0a67187f add default votes in SimplePollOption 2022-03-08 00:15:29 +06:00
InsanusMokrassar d9638849e2 update dependencies 2022-03-07 12:44:55 +06:00
InsanusMokrassar 5568720b5b start 0.38.7 2022-03-07 12:44:08 +06:00
InsanusMokrassar c0c591fe08 Merge pull request #535 from InsanusMokrassar/0.38.6
0.38.6
2022-02-27 22:22:04 +06:00
InsanusMokrassar 3c1f8421c9 Update CHANGELOG.md 2022-02-27 10:04:28 +06:00
InsanusMokrassar 35b20d102c Update gradle.properties 2022-02-26 22:01:41 +06:00
InsanusMokrassar 70e6dc8fc9 update dependencies 2022-02-19 23:07:30 +06:00
InsanusMokrassar 4f0de376ab MentionTextSource#username 2022-02-19 23:02:58 +06:00
InsanusMokrassar 10c52c695c start 0.38.6 2022-02-19 22:54:41 +06:00
InsanusMokrassar 2d2c745527 Merge pull request #532 from InsanusMokrassar/0.38.5
0.38.5
2022-02-08 16:53:27 +06:00
InsanusMokrassar 1238843bde update dependencies 2022-02-08 16:50:38 +06:00
InsanusMokrassar 1ebaa1c387 deeplinking fixes and additions 2022-02-07 18:08:06 +06:00
InsanusMokrassar b2bc47ec04 start 0.38.5 2022-02-07 18:00:13 +06:00
root 514620b2bd Merge pull request #530 from InsanusMokrassar/0.38.4
0.38.4
2022-02-02 10:05:11 +06:00
root 054f06e18b Update gradle.properties 2022-02-01 23:39:07 +06:00
InsanusMokrassar 00d467d091 classcasts and raw fields updates 2022-02-01 23:25:22 +06:00
InsanusMokrassar 6426ed6571 fixes 2022-02-01 23:05:47 +06:00
InsanusMokrassar fba6707f44 fixes in create sticker set methods 2022-02-01 17:59:23 +06:00
InsanusMokrassar 0c2fe6bce7 support of Telegram Bot API 5.7 2022-02-01 16:23:26 +06:00
InsanusMokrassar eee9fe439f fix of #529 2022-01-31 17:52:01 +06:00
InsanusMokrassar 3547c09383 start 0.38.4 2022-01-31 17:48:10 +06:00
InsanusMokrassar 956f02d26d Merge pull request #526 from InsanusMokrassar/0.38.3
0.38.3
2022-01-14 16:47:49 +06:00
InsanusMokrassar 468fc0a49b Update CHANGELOG.md 2022-01-14 16:31:57 +06:00
InsanusMokrassar 441f3cee3d Update gradle.properties 2022-01-14 16:31:19 +06:00
InsanusMokrassar 1ea79b9f7f update changelog 2022-01-13 19:01:17 +06:00
InsanusMokrassar 094f88867d Update gradle.properties 2022-01-13 13:52:49 +06:00
InsanusMokrassar 85a8a8eedc update dokka version 2022-01-12 13:02:23 +06:00
InsanusMokrassar 28fce0b4c1 New extensions "TelegramBot#send*" for media groups with contents 2022-01-12 11:39:35 +06:00
InsanusMokrassar 2f5fdcdca0 start 0.38.3 2022-01-12 11:37:34 +06:00
InsanusMokrassar 21799d7e4a add exceptions handling readme 2022-01-11 21:22:10 +06:00
InsanusMokrassar ca409db0ee Merge pull request #525 from InsanusMokrassar/0.38.2
0.38.2
2022-01-10 23:08:50 +06:00
InsanusMokrassar 33c8ee0803 remove redundant copyMessage 2022-01-10 13:48:00 +06:00
InsanusMokrassar 0c0ec22348 update microutils dependency 2022-01-10 13:16:50 +06:00
InsanusMokrassar 24bffbbd97 addopportunity to copy messages using just content 2022-01-10 13:15:10 +06:00
InsanusMokrassar a615d1c4fd copyMessages for media groups 2022-01-10 13:06:18 +06:00
InsanusMokrassar a76b7977b3 start 0.38.2 2022-01-10 12:38:48 +06:00
InsanusMokrassar 6004879aef Merge pull request #524 from InsanusMokrassar/0.38.1
0.38.1
2022-01-07 13:37:06 +06:00
InsanusMokrassar 98ff2558e9 remove redundant dependency in utils 2022-01-07 13:32:34 +06:00
root 61c00b38b1 Update core publish scripts 2022-01-07 13:29:53 +06:00
InsanusMokrassar 2096671147 upfill raw extensions 2022-01-07 12:56:42 +06:00
InsanusMokrassar 094d58f59f upfill of changelog 2022-01-06 17:13:37 +06:00
InsanusMokrassar 578a66b758 fill changelog 2022-01-06 17:00:56 +06:00
InsanusMokrassar b5bb40576b optimize imports of utils 2022-01-06 16:59:15 +06:00
InsanusMokrassar 953638ddf5 add raw fields for CallbackQuery 2022-01-06 16:57:51 +06:00
InsanusMokrassar 1c9ca7a493 add raw fields for ChosenInlineResult 2022-01-06 16:52:28 +06:00
InsanusMokrassar c220412b02 add raw fields for InlineQuery 2022-01-06 16:45:50 +06:00
InsanusMokrassar 41852dde7c add raw fields for polls 2022-01-06 16:42:19 +06:00
InsanusMokrassar 3150cd6a37 fix build 2022-01-06 14:55:07 +06:00
InsanusMokrassar 07de18efd8 update changelog 2022-01-06 14:50:14 +06:00
InsanusMokrassar 9552550198 UserLoggedIn, additions in ClassCasts and partial fix of #511 2022-01-06 14:49:11 +06:00
InsanusMokrassar e1c94f772d MessageCallbackQuery#message now is ContentMessage<MessageContent> 2022-01-06 13:54:22 +06:00
InsanusMokrassar fbed81a1b3 start 0.38.1 2022-01-06 13:49:03 +06:00
InsanusMokrassar b61912d99a Merge pull request #522 from InsanusMokrassar/0.38.0
0.38.0
2022-01-02 03:34:45 +06:00
InsanusMokrassar 5efe74171d Update README.md 2022-01-02 03:33:52 +06:00
InsanusMokrassar 393981560c Update README.md 2022-01-02 03:32:59 +06:00
InsanusMokrassar 73b355df55 fixes 2022-01-02 02:00:22 +06:00
InsanusMokrassar 86885e7698 updates in CommonMessage implementers and removing of deprecations 2022-01-02 01:49:14 +06:00
InsanusMokrassar 4d9be1a995 fix in MessageAutoDeleteTimerChanged 2022-01-02 01:12:41 +06:00
InsanusMokrassar 596176ee93 simple rewrite of spoiler markdown 2022-01-01 20:20:48 +06:00
InsanusMokrassar 2348434048 add support of protect_content in forwardMessage 2022-01-01 20:16:07 +06:00
InsanusMokrassar 5c6a430f38 support of protect_content 2022-01-01 20:13:22 +06:00
InsanusMokrassar 148791ad68 extend InlineQueryResultGif fun with FileId and add ProtectContent + extend SendMessageRequest with it in advance 2022-01-01 13:42:39 +06:00
InsanusMokrassar 5c5a19c91a add spoiler support 2021-12-31 13:48:51 +06:00
InsanusMokrassar bd60c4f411 update gradle wrapper 2021-12-31 12:34:01 +06:00
InsanusMokrassar e5a36225f8 Merge branch 'master' into 0.38.0 2021-12-31 02:55:54 +06:00
InsanusMokrassar bd2c13c178 Merge pull request #515 from InsanusMokrassar/0.37.4
0.37.4
2021-12-30 23:06:15 +06:00
InsanusMokrassar 6f1f94299b fix of build 2021-12-30 12:30:09 +06:00
InsanusMokrassar 72b8231eab update gitignore and dokka version 2021-12-30 11:55:12 +06:00
InsanusMokrassar 323e5fb391 update dependencies 2021-12-30 11:50:58 +06:00
InsanusMokrassar dca5bb40e3 Update MigratedToSupergroup.kt 2021-12-27 23:06:51 +06:00
InsanusMokrassar c21975a150 Merge branch 'master' into 0.37.4 2021-12-27 23:01:45 +06:00
InsanusMokrassar 8675833b99 Update CHANGELOG.md 2021-12-27 22:50:09 +06:00
InsanusMokrassar faf669c035 Update gradle.properties 2021-12-27 22:48:21 +06:00
InsanusMokrassar 2f3a683fa0 Update CHANGELOG.md 2021-12-23 17:24:13 +06:00
InsanusMokrassar 2a617b5c4d Merge pull request #514 from madhead/feature/MigratedToSupergroup
Support for "migrated to supergroup" events
2021-12-22 09:47:21 +06:00
madhead aa1e7eea1d Support for "migrated to supergroup" events 2021-12-22 02:37:43 +01:00
InsanusMokrassar 22eac5414c start 0.37.4 2021-12-21 19:13:49 +06:00
InsanusMokrassar 8206aefbb6 Merge pull request #513 from InsanusMokrassar/0.37.3
0.37.3: hotfix of 0.37.2
2021-12-20 14:11:48 +06:00
InsanusMokrassar fb8cfed382 hotfix 2021-12-20 14:07:45 +06:00
InsanusMokrassar 2de22a08a3 Merge pull request #506 from InsanusMokrassar/0.37.2
0.37.2
2021-12-20 13:00:07 +06:00
InsanusMokrassar e8022a2ded add kdocs to the requests 2021-12-20 12:50:06 +06:00
InsanusMokrassar d6cef5984b filling of changelog and several fixes 2021-12-20 12:47:55 +06:00
InsanusMokrassar 49bea1bcef update gradle wrapper 2021-12-20 12:32:21 +06:00
InsanusMokrassar 85a4459072 Update RawMessage.kt 2021-12-19 00:46:06 +06:00
InsanusMokrassar ce74631580 actualizing of readmes 2021-12-18 23:19:05 +06:00
InsanusMokrassar 1e5ce6bb5c add ContentMessage#hasProtectedContent 2021-12-18 23:12:12 +06:00
InsanusMokrassar dc89e914a1 support of has_protected_content field 2021-12-18 23:11:28 +06:00
InsanusMokrassar ee815c7335 update micro_utils 2021-12-18 22:29:25 +06:00
InsanusMokrassar 69f4033807 add support of is_automatic_forward 2021-12-18 22:28:01 +06:00
InsanusMokrassar 0581587adf add support of has_private_forwards 2021-12-10 12:53:00 +06:00
InsanusMokrassar 23f93075a4 update microutils and add banChatSenderChat and unbanChatSenderChat support 2021-12-10 12:49:13 +06:00
InsanusMokrassar 6c3425d5f9 Update CHANGELOG.md 2021-12-04 21:23:34 +06:00
InsanusMokrassar d285590348 Update gradle-wrapper.properties 2021-12-04 21:12:12 +06:00
InsanusMokrassar 2e0ad6dd3c Merge pull request #505 from InsanusMokrassar/fix/linkln
Fix of linkln
2021-12-04 21:08:46 +06:00
InsanusMokrassar 96a5e55894 Merge pull request #499 from InsanusMokrassar/renovate/micro_utils_version
Update micro_utils_version to v0.8.5
2021-12-04 21:08:06 +06:00
InsanusMokrassar 4e3b085cdb start 0.37.2 2021-12-04 21:07:00 +06:00
InsanusMokrassar 8baa601af7 Fix of linkln 2021-12-04 12:51:55 +06:00
Renovate Bot facd732fa8 Update micro_utils_version to v0.8.5 2021-11-27 17:38:58 +00:00
InsanusMokrassar e19561367e Merge pull request #500 from InsanusMokrassar/0.37.1
0.37.1
2021-11-14 20:03:57 +06:00
InsanusMokrassar 249efeee7e update scripts 2021-11-14 19:42:03 +06:00
InsanusMokrassar b8cc2421b6 update dependencies 2021-11-14 19:15:09 +06:00
InsanusMokrassar 2fa1a064ec start 0.37.1 2021-11-14 19:14:06 +06:00
InsanusMokrassar 63e864741e update changelog and several kdocs 2021-11-11 12:24:10 +06:00
InsanusMokrassar e4f35c0eba update KDocs 2021-11-11 12:11:58 +06:00
InsanusMokrassar 944fe6d820 Update CHANGELOG.md 2021-11-11 11:14:05 +06:00
InsanusMokrassar 8ea50f36aa Merge pull request #493 from InsanusMokrassar/0.37.0
0.37.0
2021-11-10 14:48:53 +06:00
InsanusMokrassar 17308a6d99 update gradle distro 2021-11-10 13:06:43 +06:00
InsanusMokrassar 6eabea2529 Update CHANGELOG.md 2021-11-09 19:23:41 +06:00
InsanusMokrassar ffe9166fee Update gradle.properties 2021-11-09 19:23:27 +06:00
InsanusMokrassar f1be3e2819 Update README.md 2021-11-09 14:09:20 +06:00
InsanusMokrassar c4c016c438 update common readme 2021-11-09 13:40:38 +06:00
InsanusMokrassar a85e7d7387 fixes 2021-11-09 00:32:04 +06:00
InsanusMokrassar fc59ab0cdd add class casts for ChatInviteLink 2021-11-08 19:15:58 +06:00
InsanusMokrassar 9ed7ded967 fix texts of bot actions 2021-11-08 19:07:02 +06:00
InsanusMokrassar a76a7ae630 add choose_sticker 2021-11-08 18:36:17 +06:00
InsanusMokrassar 4715eb424f add support of join request approving/declining 2021-11-08 18:33:24 +06:00
InsanusMokrassar c24d536d4c add ChatJoinRequest 2021-11-08 18:21:55 +06:00
InsanusMokrassar c969d88bf0 update invite links and add name field 2021-11-08 18:00:43 +06:00
InsanusMokrassar 44e9dc9253 remove deprecations 2021-11-08 17:33:02 +06:00
InsanusMokrassar 10c62bf2c7 chat invite links update 2021-11-08 17:27:15 +06:00
InsanusMokrassar 20b1645935 start migrate fsm part 2021-11-06 21:21:49 +06:00
InsanusMokrassar c5bf9ab1a2 Update CHANGELOG.md 2021-11-05 22:04:55 +06:00
InsanusMokrassar cd6d108a9a Update gradle.properties 2021-11-05 22:03:42 +06:00
InsanusMokrassar 5369a85faa update dependencies 2021-11-03 17:31:24 +06:00
InsanusMokrassar 45a895f32f start 0.36.2 2021-11-03 17:29:10 +06:00
InsanusMokrassar 8c1d7203d2 Merge pull request #487 from InsanusMokrassar/0.36.1
0.36.1
2021-10-23 23:08:09 +06:00
InsanusMokrassar 7394a6e94b update microutils 2021-10-23 14:36:13 +06:00
InsanusMokrassar a962838012 Merge pull request #488 from Djaler/get-my-commands-overload
fix getMyCommands overloads conflict when no arguments provided
2021-10-23 10:31:13 +06:00
Kirill Romanov a5cc80a1eb fix getMyCommands overloads conflict when no arguments provided 2021-10-22 21:34:04 +03:00
InsanusMokrassar 064b6222e6 Merge pull request #486 from Djaler/build-entities-separator
Build entities separator
2021-10-23 00:05:28 +06:00
Kirill Romanov 8d97057d2c add separator parameter to buildEntities 2021-10-22 20:59:49 +03:00
Kirill Romanov 78f006e280 move entitiesList from EntitiesBuilder constructor 2021-10-22 20:55:10 +03:00
InsanusMokrassar db956a803c Update CHANGELOG.md 2021-10-22 23:51:47 +06:00
InsanusMokrassar aeb131b2f4 Update gradle.properties 2021-10-22 23:51:13 +06:00
InsanusMokrassar 6d80c2bddc Update README.md 2021-10-20 22:14:34 +06:00
InsanusMokrassar 6e32d4e863 update behaviour builder fsm readme 2021-10-18 20:08:55 +06:00
InsanusMokrassar 6b62070447 Merge pull request #474 from InsanusMokrassar/0.36.0
0.36.0
2021-10-18 17:13:30 +06:00
InsanusMokrassar ad8710db92 add telegraph note 2021-10-18 16:43:37 +06:00
InsanusMokrassar f385101e22 deprecate several behaviour builder methods 2021-10-18 15:48:24 +06:00
InsanusMokrassar 15386a63f9 small fix 2021-10-18 15:38:42 +06:00
InsanusMokrassar 576b25190a cleanup 'extension' suffix in readmes 2021-10-18 15:37:10 +06:00
InsanusMokrassar dd979d8626 update publish scripts of old packages 2021-10-18 15:23:43 +06:00
InsanusMokrassar e60eb68b67 packages update 2021-10-18 15:20:25 +06:00
InsanusMokrassar 91212eaa3a resolution of #484 2021-10-18 14:45:57 +06:00
InsanusMokrassar 65c1f018ac update microutils 2021-10-18 14:13:22 +06:00
InsanusMokrassar 5b13d3dded Merge pull request #485 from madhead/feature/possibly-reply-casts
PossiblyReplyMessage casts
2021-10-18 14:12:20 +06:00
madhead 2447d3e51f Don't run the labeler if the actor is not repo owner 2021-10-17 14:44:22 +02:00
Siarhei 4203a0fdfe PossiblyReplyMessage casts
Add asPossiblyReplyMessage / requirePossiblyReplyMessage / whenPossiblyReplyMessage
2021-10-17 14:33:14 +02:00
InsanusMokrassar ddd32a81c0 Update CHANGELOG.md 2021-10-16 08:54:53 +06:00
InsanusMokrassar db7a42fa9b Update gradle.properties 2021-10-16 08:54:36 +06:00
InsanusMokrassar 5e2df1cb4a a little fill of Readme for fsm behaviour builder 2021-10-15 18:24:06 +06:00
InsanusMokrassar 21c0e375f5 update kdocs of BehaviourContextWithFSM 2021-10-15 17:55:13 +06:00
InsanusMokrassar 4ac01d0104 update onSuccessPayment kdocs 2021-10-15 17:40:32 +06:00
InsanusMokrassar 9c15410c4e update kdoc of telegramBotWithBehaviourAndFSMAndStartLongPolling 2021-10-15 17:37:14 +06:00
InsanusMokrassar c5ff0dbc54 fixes 2021-10-15 17:13:03 +06:00
InsanusMokrassar 19d221fc29 fixes 2021-10-15 16:37:20 +06:00
InsanusMokrassar 179a724d20 several actualizations for behaviour builder with fsm 2021-10-15 16:28:17 +06:00
InsanusMokrassar ad9bc36f8c all triggers in behaviour builder now use accumulator flow 2021-10-14 23:05:11 +06:00
InsanusMokrassar 5a192b00d4 refactor of contentConverter 2021-10-14 22:57:04 +06:00
InsanusMokrassar 2a33b22afb BehaviourBuilder FSM extension 2021-10-13 14:22:01 +06:00
InsanusMokrassar db1e01688d Update FUNDING.yml 2021-10-05 23:52:03 +06:00
InsanusMokrassar 22e71354dd update dokka 2021-10-05 17:27:50 +06:00
InsanusMokrassar 2e560db865 update microutils 2021-10-05 17:08:19 +06:00
InsanusMokrassar 016fc81b71 update microutils 2021-10-04 15:56:30 +06:00
InsanusMokrassar b6e72c2399 rename poll updates triggers and fill changelog 2021-10-03 21:16:31 +06:00
InsanusMokrassar e1e2b93269 deprecate waitEditedPoll and rename poll updates waiters 2021-10-03 21:14:28 +06:00
InsanusMokrassar 834e31906a deprecate onEditPoll and rename poll updates triggers 2021-10-03 21:12:17 +06:00
InsanusMokrassar 5831cc6d37 hotfix for autorenames -.- 2021-10-03 20:40:42 +06:00
InsanusMokrassar 0cce72de8d cover all updates in behaviour builder 2021-10-03 20:37:14 +06:00
InsanusMokrassar 3919359f79 CommonGroupEvent -> PublicChatEvent 2021-10-03 18:44:29 +06:00
InsanusMokrassar e51a4b7702 SuccessfulPaymentEvent 2021-10-03 11:53:54 +06:00
InsanusMokrassar 702c1bc1ff fix build 2021-10-02 00:52:29 +06:00
InsanusMokrassar 6557e8af10 upfixes in changelog 2021-10-01 20:07:14 +06:00
InsanusMokrassar edcebb03c0 add note about deprecation of PayInlineKeyboardButton 2021-10-01 19:57:03 +06:00
InsanusMokrassar 9a3fc19992 update packages_publish workflow 2021-10-01 19:42:12 +06:00
InsanusMokrassar 7f9faa69c8 new dsls for keyboards #472 2021-10-01 19:38:51 +06:00
InsanusMokrassar 5b98c5f821 update dependencies 2021-10-01 16:40:04 +06:00
InsanusMokrassar 40bd8d0987 update dependencies 2021-10-01 15:46:07 +06:00
InsanusMokrassar 2aa6497374 start 0.36.0 2021-10-01 15:45:37 +06:00
InsanusMokrassar b9cb7b62fa setup toolchain for java targets 2021-09-23 13:15:44 +06:00
InsanusMokrassar 04679beb52 Update packages_publishing.yml 2021-09-22 20:15:48 +06:00
InsanusMokrassar 64e9289afb Delete build.yml 2021-09-22 20:14:58 +06:00
InsanusMokrassar d4f24ee0cd Merge pull request #461 from InsanusMokrassar/0.35.9
0.35.9
2021-09-21 23:17:32 +06:00
InsanusMokrassar 3e5d939ea5 factory functions of BehaviourContextReceiver's, updates in kdocs and operations for these receivers filters 2021-09-21 21:36:52 +06:00
InsanusMokrassar 24f91e4aee Fix of #464 2021-09-21 20:50:59 +06:00
InsanusMokrassar fe169fafaf add kdocs to LocationContent 2021-09-21 18:57:12 +06:00
InsanusMokrassar aeb6fad409 add LocationContent#copy 2021-09-21 18:49:29 +06:00
InsanusMokrassar 94ad758814 deprecate old API in Behaviour Builder 2021-09-21 18:39:05 +06:00
InsanusMokrassar 5f01e26377 Update CHANGELOG.md 2021-09-21 16:24:12 +06:00
InsanusMokrassar f82ac0ce9d Update gradle.properties 2021-09-21 16:23:47 +06:00
InsanusMokrassar c8491765e9 update dependencies 2021-09-19 15:27:01 +06:00
InsanusMokrassar 53a3e11836 fix CustomBotAction annotations 2021-09-17 16:50:54 +06:00
InsanusMokrassar fcccbe3252 Update CHANGELOG.md 2021-09-17 09:17:48 +06:00
InsanusMokrassar 584bf06109 Update gradle.properties 2021-09-17 09:17:28 +06:00
InsanusMokrassar ef0083079e Update gradle.properties 2021-09-16 10:09:28 +06:00
InsanusMokrassar 0d01e9bc78 add kdocs for filters 2021-09-15 15:07:38 +06:00
InsanusMokrassar 89aef3d77b kdocs for triggers in behaviour builder 2021-09-15 14:58:45 +06:00
InsanusMokrassar 24c47b00d4 BehaviourContext#followLocation 2021-09-14 16:16:06 +06:00
InsanusMokrassar a046a72392 waitEditedContent* extensions 2021-09-14 16:04:58 +06:00
InsanusMokrassar a5a530c9bd TelegramBot#answer 2021-09-14 15:51:05 +06:00
InsanusMokrassar 9cf82a3564 subcontext filter and inBlock filter in behaviour context triggers 2021-09-13 23:30:01 +06:00
InsanusMokrassar 46cc37be62 LocationContent -> LiveLocationContent / StaticLocationContent 2021-09-12 17:15:58 +06:00
InsanusMokrassar 1fbaf396aa update micro_utils 2021-09-12 15:48:33 +06:00
InsanusMokrassar 76985501f5 CustomBotAction 2021-09-12 15:32:36 +06:00
InsanusMokrassar 8d8bcfba01 start 0.35.9 2021-09-12 15:29:19 +06:00
InsanusMokrassar e0f3957249 Update CHANGELOG.md 2021-09-09 00:42:57 +06:00
InsanusMokrassar 3f1b018808 Merge pull request #457 from InsanusMokrassar/0.35.8
0.35.8
2021-09-08 22:43:23 +06:00
InsanusMokrassar 7af5ab17b7 Fixes in TelegramBot#withAction 2021-09-08 22:19:08 +06:00
InsanusMokrassar 0fec35f0dc BehaviourContext#commandWithArgs and BehaviourContext#onCommandWithArgs 2021-09-08 21:31:43 +06:00
InsanusMokrassar ee81f49a75 add docs for InputFile 2021-09-08 21:13:42 +06:00
InsanusMokrassar 807952201b MPPFile#asMultipartFile 2021-09-08 20:58:44 +06:00
InsanusMokrassar 5d6ba0f59e MultipartRequestCallFactory improvements 2021-09-08 20:05:53 +06:00
InsanusMokrassar 3a61b522ab update dependencies 2021-09-08 19:59:29 +06:00
InsanusMokrassar 83304023a6 start 0.35.8 2021-09-08 19:57:22 +06:00
InsanusMokrassar f62e13aaca Merge pull request #450 from InsanusMokrassar/0.35.7
0.35.7
2021-09-04 17:38:44 +06:00
InsanusMokrassar ae1fb25336 update dependencies 2021-09-04 17:25:29 +06:00
InsanusMokrassar 4e3ea6cd80 fixes of annotations 2021-08-30 21:02:51 +06:00
InsanusMokrassar 148203eabf update klock 2021-08-30 18:55:13 +06:00
InsanusMokrassar 4465b573ca update dependencies 2021-08-27 19:58:21 +06:00
InsanusMokrassar f0dda60630 start 0.35.7 2021-08-27 19:56:18 +06:00
InsanusMokrassar 47135a1b65 Merge pull request #444 from InsanusMokrassar/0.35.6
0.35.6
2021-08-23 22:26:56 +06:00
InsanusMokrassar d8f830c60f FlowsUpdatesFilter update 2021-08-22 23:14:56 +06:00
InsanusMokrassar 226b8dee21 deprecate allSentMessagesFlow and allSentMedaGroupsFlow 2021-08-22 23:13:59 +06:00
InsanusMokrassar a109771d20 update structure schema 2021-08-22 12:10:05 +06:00
InsanusMokrassar c028434f30 update gradle wrapper 2021-08-22 11:09:35 +06:00
InsanusMokrassar d5c6ce32bb fixes in readme :) 2021-08-22 11:02:14 +06:00
InsanusMokrassar d92cac5e07 small updates in readmes 2021-08-22 10:59:01 +06:00
InsanusMokrassar 9b21b5290c update dokka 2021-08-22 10:53:12 +06:00
InsanusMokrassar 13ca63d27d update dependencies 2021-08-22 10:47:23 +06:00
InsanusMokrassar ad917dda1b start 0.35.6 2021-08-22 10:35:55 +06:00
InsanusMokrassar 7b1344e9c8 Merge pull request #440 from InsanusMokrassar/0.35.5
0.35.5
2021-08-13 20:51:02 +06:00
InsanusMokrassar c4fbd2f1c6 revert type of BuiltinMimeTypes 2021-08-13 18:39:46 +06:00
InsanusMokrassar c90bcea42c add additional mime types 2021-08-13 18:39:08 +06:00
InsanusMokrassar e75c93d626 remove mime types from requests 2021-08-13 14:02:39 +06:00
InsanusMokrassar 58dcbe8751 StorageFile#asMultipartFile 2021-08-13 11:45:36 +06:00
InsanusMokrassar 17806cde25 add calculation of mimed type from TelegramMediaFile when it is MimedFile 2021-08-13 11:43:36 +06:00
InsanusMokrassar f147a3d620 fix of package for AdditionalContentAsStorageFile 2021-08-13 11:41:57 +06:00
InsanusMokrassar 9eb6008a73 convertToStorageFile 2021-08-13 11:37:01 +06:00
InsanusMokrassar f7d2c8bbd2 hotfix 2021-08-10 16:54:15 +06:00
InsanusMokrassar f42cf78969 fixes 2021-08-10 16:50:50 +06:00
InsanusMokrassar 9a14932511 small improvement of DownloadFileRequestCallFactory 2021-08-10 11:32:22 +06:00
InsanusMokrassar 149ecf175b small improvement of DownloadFileChannelRequestCallFactory 2021-08-10 11:29:46 +06:00
InsanusMokrassar 2049fea82a new asStorageFile 2021-08-10 11:08:08 +06:00
InsanusMokrassar 40d94cca70 improvements in files downloading api 2021-08-10 10:34:59 +06:00
InsanusMokrassar c8ad68ea69 make ByteReadChannelAllocatorSerializer -> ByteReadChannelAllocatorDeserializationStrategy 2021-08-10 10:12:22 +06:00
InsanusMokrassar c66d64adbc renames 2021-08-09 23:24:12 +06:00
InsanusMokrassar b475976ff1 add streaming file downloading feature 2021-08-09 23:22:08 +06:00
InsanusMokrassar ea8db5b851 rename JVM DownloadFile file 2021-08-09 20:01:26 +06:00
InsanusMokrassar af2fabf1ca fix changelog 2021-08-09 19:55:51 +06:00
InsanusMokrassar abc0457a36 files downloading improvements 2021-08-09 19:55:08 +06:00
InsanusMokrassar 8dbdbdee13 start 0.35.5 2021-08-09 19:39:03 +06:00
InsanusMokrassar 0c31379ff5 Merge pull request #439 from InsanusMokrassar/0.35.4
0.35.4
2021-08-09 14:18:19 +06:00
InsanusMokrassar 3b3cf81aaa Update CHANGELOG.md 2021-08-09 12:26:37 +06:00
InsanusMokrassar 1642075a75 Update microutils 2021-08-09 12:21:51 +06:00
InsanusMokrassar 760c9f2916 start 0.35.4 2021-08-09 12:21:27 +06:00
InsanusMokrassar 219238cf19 Merge pull request #436 from InsanusMokrassar/0.35.3
0.35.3
2021-08-08 18:48:45 +06:00
InsanusMokrassar 762087fc09 optimize imports 2021-08-08 18:00:42 +06:00
InsanusMokrassar 142fae1ede remove WithLanguageCode 2021-08-08 17:55:27 +06:00
InsanusMokrassar 95abc72bf3 WithOptionalLanguageCode?.javaLocale 2021-08-08 17:47:18 +06:00
InsanusMokrassar 1d37a7446c add companions for SimpleRequestCallFactory and MultipartRequestCallFactory 2021-08-08 17:44:20 +06:00
InsanusMokrassar 7d35114b5d classcasts fill for WithOptionalLanguageCode 2021-08-08 16:43:49 +06:00
InsanusMokrassar 75f4226772 base ktor request call factories became classes to avoid sharing of their cache between bots 2021-08-08 16:14:43 +06:00
InsanusMokrassar 96d980cb8a fix build 2021-08-06 12:02:26 +06:00
InsanusMokrassar ed077ae1bc filters in waiters 2021-08-06 10:32:31 +06:00
InsanusMokrassar 9540797ffc Revert "update classcasts"
This reverts commit 217b01994e.
2021-08-06 09:15:30 +06:00
InsanusMokrassar 217b01994e update classcasts 2021-08-05 23:54:30 +06:00
InsanusMokrassar 6b89c94ef1 include support of ietf language codes 2021-08-05 23:36:01 +06:00
InsanusMokrassar e25ce57f6a update microutils version 2021-08-05 23:12:17 +06:00
InsanusMokrassar 530394fd15 SimpleFilter 2021-08-03 11:46:23 +06:00
InsanusMokrassar 3e891d50fd downloadFile for MediaContent 2021-08-03 11:33:52 +06:00
InsanusMokrassar adf5fd6288 improvements in buildBehaviour 2021-08-03 11:27:39 +06:00
InsanusMokrassar e7a2dc51aa update dependencies 2021-08-03 11:18:30 +06:00
InsanusMokrassar 399793243b start 0.35.3 2021-08-03 11:14:21 +06:00
InsanusMokrassar 3801025ff1 Merge pull request #428 from InsanusMokrassar/0.35.2
0.35.2
2021-07-17 13:43:02 +06:00
InsanusMokrassar 0ad2d9afc4 Fill changelog with versions updates 2021-07-17 13:40:05 +06:00
InsanusMokrassar a303700b56 Update gradle.properties 2021-07-15 23:00:08 +06:00
InsanusMokrassar 42bf896f7a Update gradle.properties 2021-07-10 00:42:04 +06:00
InsanusMokrassar 0bce522101 Update gradle.properties 2021-07-10 00:03:20 +06:00
InsanusMokrassar 3c75d6a2c7 Update dependencies 2021-07-09 11:23:33 +06:00
InsanusMokrassar 93eebe37ce Update CHANGELOG.md 2021-07-09 11:20:33 +06:00
InsanusMokrassar f893803939 start 0.35.2 2021-07-09 11:18:54 +06:00
InsanusMokrassar 0b92edc05e Update gradle-wrapper.properties 2021-07-03 23:41:48 +06:00
InsanusMokrassar 190d83b22b Merge pull request #421 from InsanusMokrassar/0.35.1
0.35.1
2021-06-30 14:51:30 +06:00
InsanusMokrassar 7ec4fc460a fix build 2021-06-30 14:01:59 +06:00
InsanusMokrassar 75cebf5aa3 add GetUpdatesConflict 2021-06-30 13:57:20 +06:00
InsanusMokrassar a241c91adf waitContentMessage with includeMediaGroups 2021-06-30 11:45:56 +06:00
InsanusMokrassar 4f920abb61 upfixes 2021-06-30 11:26:31 +06:00
InsanusMokrassar 6ba9a31fb9 seal of MediaGroupUpdates 2021-06-30 11:12:09 +06:00
InsanusMokrassar 65801f5104 Update CHANGELOG.md 2021-06-30 10:40:23 +06:00
InsanusMokrassar 9e82211473 Merge pull request #422 from eboshare/0.35.1
Add Update#sourceUser method
2021-06-30 10:39:00 +06:00
Vasya 560179a574 simplify Update#sourceUser 2021-06-29 21:47:15 +03:00
Vasya cffcf2277e add asFromUser, whenFromUser, requireFromUser to ClassCasts.kt 2021-06-29 21:35:46 +03:00
Vasya cb9a20a9d1 Merge remote-tracking branch 'upstream/0.35.1' into 0.35.1
# Conflicts:
#	tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/types/InlineQueries/abstracts/ChosenInlineResult.kt
2021-06-29 21:23:20 +03:00
vasya 45ea103c9a bring back strange InsanusMokrassar's space :) 2021-06-29 21:08:41 +03:00
vasya c00adb0784 remove redundant import in LeftChatMember.kt 2021-06-29 21:07:18 +03:00
vasya 38826a5e7e remove FromUser interface from RawChosenInlineResult 2021-06-29 21:06:46 +03:00
InsanusMokrassar b2915857d7 remove usages of deprecated ChosenInlineResult 2021-06-29 11:55:46 +06:00
InsanusMokrassar 067e36adc6 ChosenInlineResult now is sealed 2021-06-29 11:53:36 +06:00
vasya 12a35da4b6 remove unnecessary FromUser usages 2021-06-29 03:34:27 +03:00
vasya 022e6f623a add FromUser interface to objects where field user is present 2021-06-29 00:57:32 +03:00
vasya 30c138029e add asFromUserMessage calls to Update#sourceUser 2021-06-29 00:37:53 +03:00
InsanusMokrassar 732e2a3906 serializable subclasses of MessageContent 2021-06-29 00:06:07 +06:00
InsanusMokrassar c5e089a45d make*String extensions 2021-06-29 00:01:40 +06:00
vasya 919b1590e3 add Update#sourceUser method 2021-06-28 20:30:12 +03:00
InsanusMokrassar 0c1017901f optimize imports 2021-06-28 11:12:51 +06:00
InsanusMokrassar fd6e4b0522 final refactor, fixes and upfilling of changelog 2021-06-28 11:10:09 +06:00
InsanusMokrassar 21c5d42dc2 BehaviourContext now is interface 2021-06-28 10:29:45 +06:00
InsanusMokrassar 77dff639f0 updates 2021-06-28 01:00:20 +06:00
InsanusMokrassar 47fe048b10 refactor and fixes in ContentTriggers 2021-06-27 19:28:21 +06:00
InsanusMokrassar ee8cc2aa46 defaultExceptionsHandler in behaviour builder 2021-06-26 17:05:34 +06:00
InsanusMokrassar b9de002517 rewrite to use subscribeSafelyWithoutExceptionsAsync in triggers of behaviour builder 2021-06-26 12:15:52 +06:00
InsanusMokrassar 449f2727c4 update dependencies 2021-06-26 02:04:08 +06:00
InsanusMokrassar 8712914126 update actuality of core 2021-06-26 01:59:25 +06:00
InsanusMokrassar 69b64e9908 and more... :) 2021-06-26 01:58:20 +06:00
InsanusMokrassar 656bb68739 add support of input_field_placeholder 2021-06-26 01:48:41 +06:00
InsanusMokrassar 7f69052dea *MyCommands actualization 2021-06-26 01:42:35 +06:00
InsanusMokrassar b60fab4871 BotCommandScope 2021-06-26 01:27:28 +06:00
InsanusMokrassar bf28a8b0a6 add performInParallel for behaviour builder 2021-06-25 12:45:20 +06:00
InsanusMokrassar 85270dd12d update micro_utils 2021-06-24 14:34:58 +06:00
InsanusMokrassar e39dd2d086 remove redundant fsm module 2021-06-24 12:56:40 +06:00
InsanusMokrassar e10d47b7e4 fill changelog 2021-06-24 12:56:15 +06:00
InsanusMokrassar 1e181bc042 fixes 2021-06-24 12:54:50 +06:00
InsanusMokrassar 61cf9936fb complete migration of replies 2021-06-24 12:49:47 +06:00
InsanusMokrassar 65fd3ced36 start replacement of reply methods 2021-06-24 11:21:02 +06:00
InsanusMokrassar 66d37b72eb add when* syntax 2021-06-23 22:14:45 +06:00
InsanusMokrassar 55b1d3734d telegramBotWithBehaviour 2021-06-23 21:51:30 +06:00
InsanusMokrassar 45b32fd6f7 start 0.35.1 2021-06-23 21:20:28 +06:00
InsanusMokrassar fcd8f20a90 Update README.md 2021-06-17 15:34:53 +06:00
InsanusMokrassar 18e6b9e471 Merge pull request #395 from InsanusMokrassar/0.35.0
0.35.0
2021-06-06 09:05:09 +06:00
InsanusMokrassar f5b248f534 update micro_utils 2021-06-05 15:48:38 +06:00
InsanusMokrassar 3ebcbe2860 builder extending 2021-06-04 01:07:53 +06:00
InsanusMokrassar 3829e04b0c Update CHANGELOG.md 2021-06-04 00:32:42 +06:00
InsanusMokrassar 39fa36426f Update CHANGELOG.md 2021-06-03 23:25:19 +06:00
InsanusMokrassar a265e5ecbf Update CHANGELOG.md 2021-06-03 23:09:46 +06:00
InsanusMokrassar 86e78c4ba0 Update packages_publishing.yml 2021-05-30 01:20:25 +06:00
InsanusMokrassar a6451ca394 update workflows to separate build and publishing 2021-05-29 17:05:18 +06:00
InsanusMokrassar 521a3a8c35 fix internal deprecations 2021-05-29 16:02:55 +06:00
InsanusMokrassar 173839c677 small refactoring 2021-05-29 15:51:45 +06:00
InsanusMokrassar bb7d47a33b fix build 2021-05-29 15:46:13 +06:00
InsanusMokrassar 5c0e58caec buildable except of jvm tests 2021-05-29 15:34:14 +06:00
InsanusMokrassar 72c3623d30 small fillup of changelog 2021-05-29 14:32:45 +06:00
InsanusMokrassar fe1831fc19 deprecations removed 2021-05-29 14:31:44 +06:00
InsanusMokrassar 7825ec3010 a lot of types has been converted to sealed 2021-05-29 14:23:25 +06:00
InsanusMokrassar 12184cd2be InlineKeyboardButton now is an interface 2021-05-29 13:40:48 +06:00
InsanusMokrassar e90e25ab01 BotAction now is an interface 2021-05-29 13:39:43 +06:00
InsanusMokrassar 004ff0b490 update dependencies and changelog 2021-05-29 13:29:01 +06:00
InsanusMokrassar 07faba7d38 Update CHANGELOG.md 2021-05-27 00:04:42 +06:00
InsanusMokrassar e5584cd8b4 Update gradle.properties 2021-05-27 00:04:11 +06:00
InsanusMokrassar 6acc9ef2b0 update klock 2021-05-26 22:00:57 +06:00
InsanusMokrassar 169fc0401a update dependencies 2021-05-26 21:55:09 +06:00
InsanusMokrassar dcfcea65cb start 0.35.0 2021-05-26 21:51:29 +06:00
InsanusMokrassar eedb36ede7 Merge pull request #383 from InsanusMokrassar/gradle-wrapper/6.9
Update gradle-wrapper
2021-05-08 17:19:21 +06:00
InsanusMokrassar eaee334ff6 Update gradle-wrapper.properties 2021-05-08 16:44:14 +06:00
InsanusMokrassar 5c694e8625 Update CHANGELOG.md 2021-05-06 13:24:23 +06:00
InsanusMokrassar 0306c40fb2 Update CHANGELOG.md 2021-05-06 13:24:11 +06:00
InsanusMokrassar fd915553e3 Merge pull request #381 from InsanusMokrassar/0.34.1
0.34.1
2021-05-05 19:37:32 +06:00
InsanusMokrassar ec1c0ba8bb update microutils 2021-05-05 19:20:51 +06:00
InsanusMokrassar 12a64ec1d1 update ktor 2021-05-05 19:12:59 +06:00
InsanusMokrassar 59d7a7c781 fix in text sources list creating 2021-05-05 19:02:22 +06:00
InsanusMokrassar cabfd7c76b start 0.34.1 2021-05-05 18:53:26 +06:00
InsanusMokrassar f12f52899c Merge pull request #369 from InsanusMokrassar/renovate/org.jetbrains.dokka-gfm-plugin-1.x
Update dependency org.jetbrains.dokka:gfm-plugin to v1.4.32
2021-04-30 09:55:54 +06:00
Renovate Bot ed067db20f Update dependency org.jetbrains.dokka:gfm-plugin to v1.4.32 2021-04-29 13:36:31 +00:00
InsanusMokrassar b055268979 Merge pull request #362 from InsanusMokrassar/0.34.0
0.34.0
2021-04-29 19:03:29 +06:00
InsanusMokrassar 2584839d66 update core readme 2021-04-29 19:02:51 +06:00
InsanusMokrassar 63946e860d note about UnknownExtendedChat 2021-04-29 17:45:19 +06:00
InsanusMokrassar 90df436c63 small refactor of usage TextedInput 2021-04-29 17:40:01 +06:00
InsanusMokrassar d3c8b49b10 Update CHANGELOG.md 2021-04-29 17:33:27 +06:00
InsanusMokrassar c1372b55bc Note about ChatType in CHANGRLOG 2021-04-29 15:26:08 +06:00
InsanusMokrassar b6c7ece995 small hotfix 2021-04-29 15:09:45 +06:00
InsanusMokrassar 44e7c80f43 remove redundant extensions for parseCommandsWithParams 2021-04-29 15:08:05 +06:00
InsanusMokrassar 1e41e95333 fixes in parseCommandsWithParams 2021-04-29 15:07:16 +06:00
InsanusMokrassar 03d4d715c0 hotfix 2021-04-29 11:59:44 +06:00
InsanusMokrassar ab060d02ea deprecate Explained 2021-04-29 11:59:44 +06:00
InsanusMokrassar f447be02dc Update InlineKeyboardMarkup.kt 2021-04-29 01:18:07 +06:00
InsanusMokrassar eb923a6338 fixes 2021-04-28 23:22:13 +06:00
InsanusMokrassar 0914710cc7 update voice chats 2021-04-28 20:08:02 +06:00
InsanusMokrassar 1f7450844f optimize imports 2021-04-28 19:59:30 +06:00
InsanusMokrassar 167c214e35 migration to avoid using of TextPart 2021-04-28 19:54:57 +06:00
InsanusMokrassar 42a8d649cd Update CHANGELOG.md 2021-04-27 23:43:04 +06:00
InsanusMokrassar eb3f180cc6 textSources now is main property 2021-04-27 16:08:36 +06:00
InsanusMokrassar 70f96ac8fa completing of captioned input deprecation 2021-04-26 21:34:13 +06:00
InsanusMokrassar d69b2e09d5 migration from CaptionedInput 2021-04-26 21:25:52 +06:00
InsanusMokrassar 946b0222df fix botaction tests 2021-04-26 21:10:38 +06:00
InsanusMokrassar 7da315dbaf fix botaction tests 2021-04-26 21:08:52 +06:00
InsanusMokrassar 87071ca52c deprecation of an old record audio and upload audio bot actions 2021-04-26 21:02:11 +06:00
InsanusMokrassar b2770e3ecc record_voice and upload_voice 2021-04-26 20:52:20 +06:00
InsanusMokrassar df63ccfe07 VoiceChatScheduled 2021-04-26 20:47:03 +06:00
InsanusMokrassar 694bec22a2 include chat_type 2021-04-26 20:42:26 +06:00
InsanusMokrassar 6a3588bb8d InputInvoiceMessageContent 2021-04-26 20:23:26 +06:00
InsanusMokrassar a26568aa29 maxTipAmounts and suggestedTipAmounts support in SendInvoice 2021-04-26 20:01:14 +06:00
InsanusMokrassar cd30660256 update SendInvoice 2021-04-26 19:28:19 +06:00
InsanusMokrassar 1846d20b0d start 0.34.0 2021-04-26 19:15:55 +06:00
InsanusMokrassar f13207064e Merge pull request #361 from InsanusMokrassar/0.33.4
0.33.4
2021-04-17 16:02:14 +06:00
InsanusMokrassar 61be689aca fix of build 2021-04-17 14:36:23 +06:00
InsanusMokrassar 03f8d65bb6 fix of build 2021-04-17 11:14:35 +06:00
InsanusMokrassar 2dc8beba8a update classcasts 2021-04-16 22:00:45 +06:00
InsanusMokrassar 5451adf4ac FromUserMessage extends Message 2021-04-16 18:07:27 +06:00
InsanusMokrassar 9982534001 updates in TextSourceSerializer 2021-04-15 14:34:05 +06:00
InsanusMokrassar c0451d4c8f Update gradle-wrapper.properties 2021-04-15 13:56:52 +06:00
InsanusMokrassar a9d65944e6 update MicroUtils 2021-04-13 15:53:35 +06:00
InsanusMokrassar 39598dcb69 fill CHANGELOG 2021-04-13 01:54:45 +06:00
InsanusMokrassar 3069a6084c fixes in parseCommandsWithParams 2021-04-13 01:50:41 +06:00
InsanusMokrassar e7bbce3fa7 update uuid dependency 2021-04-12 23:32:50 +06:00
InsanusMokrassar 0b361163f2 TextSourceSerializer 2021-04-12 23:23:18 +06:00
InsanusMokrassar 6aba2ff641 start 0.33.4 2021-04-12 20:57:12 +06:00
InsanusMokrassar 6b761ab37d Update gradle wrapper 2021-04-11 04:06:30 +06:00
InsanusMokrassar b9c8a89af9 Merge pull request #357 from InsanusMokrassar/0.33.3
0.33.3
2021-04-05 19:41:52 +06:00
InsanusMokrassar a42c5c63c4 fillup changelog 2021-04-05 19:08:12 +06:00
InsanusMokrassar fc1a029acb fix of #358 2021-04-05 19:06:49 +06:00
InsanusMokrassar f90ae2f918 include weakLaunch in behaviour builder 2021-04-05 18:15:10 +06:00
InsanusMokrassar 019b260888 update ktor 2021-04-05 18:11:29 +06:00
InsanusMokrassar 0831f2fa75 update microutils 2021-04-05 17:21:59 +06:00
InsanusMokrassar 32ae9d2b16 hotfix 2021-04-05 16:50:31 +06:00
InsanusMokrassar b975a1b036 updates in behaviour builder 2021-04-05 16:41:27 +06:00
InsanusMokrassar f4b1e4a150 start 0.33.3 2021-04-05 13:42:48 +06:00
InsanusMokrassar 97031512d4 Merge pull request #356 from InsanusMokrassar/0.33.2
0.33.2
2021-04-03 15:39:14 +06:00
InsanusMokrassar 353df43109 update microutils 2021-04-03 15:13:20 +06:00
InsanusMokrassar 4e55460834 fix in doInSubContext 2021-04-03 15:05:25 +06:00
InsanusMokrassar e2e235bd6c behaviour builder updates 2021-04-03 14:51:21 +06:00
InsanusMokrassar 8ced95bc2f start 0.33.2 2021-04-03 14:24:24 +06:00
InsanusMokrassar 685e4af8f5 Merge pull request #345 from InsanusMokrassar/0.33.1
0.33.1
2021-03-26 09:13:15 +06:00
InsanusMokrassar 0b2f7a3899 update condition for ReplyMessageNotFoundException 2021-03-26 07:03:33 +06:00
InsanusMokrassar 112c86c9da remove caption based messages extension for parsing of commands 2021-03-24 13:56:51 +06:00
InsanusMokrassar 1ddd138ff7 update kdocs for new function 2021-03-24 13:44:27 +06:00
InsanusMokrassar 1a5d1cde78 add parseCommandsWithParams for text inputs 2021-03-24 13:43:32 +06:00
InsanusMokrassar 5b620014cb update kotlin version 2021-03-24 13:14:09 +06:00
InsanusMokrassar 80093cb5a9 Update kdocs.yml 2021-03-21 23:22:16 +06:00
InsanusMokrassar 9f8e8ee21b update dependencies 2021-03-19 20:20:07 +06:00
InsanusMokrassar 3de3bb6133 start 0.33.1 2021-03-19 20:18:32 +06:00
InsanusMokrassar 308fb9274b Update kdocs.yml 2021-03-17 21:14:05 +06:00
InsanusMokrassar d14ca7bbdc Update kdocs.yml 2021-03-17 21:13:52 +06:00
InsanusMokrassar dbdd9b5ad2 update dokka 2021-03-16 23:01:26 +06:00
InsanusMokrassar 6dd27cb0bf fixes in names of workflows 2021-03-16 22:41:45 +06:00
InsanusMokrassar 210a52485b add kdocs yml config 2021-03-16 22:39:54 +06:00
InsanusMokrassar 5c11b60ea6 fix dokka config 2021-03-16 22:33:53 +06:00
InsanusMokrassar 60c3a0d7af update core info about current version 2021-03-16 22:21:15 +06:00
InsanusMokrassar 8d777e1c0e Update dokka version 2021-03-16 16:30:13 +06:00
InsanusMokrassar 4e019eb8bb Update packages_publishing.yml 2021-03-12 20:11:26 +06:00
InsanusMokrassar bd80562c2a Merge pull request #337 from InsanusMokrassar/0.33.0
0.33.0
2021-03-12 15:47:24 +06:00
InsanusMokrassar 9fc07f2ff3 fix build 2021-03-12 15:03:11 +06:00
InsanusMokrassar a4bae5133a fill changelog 2021-03-12 14:58:13 +06:00
InsanusMokrassar 7bb272f2fa update compatibility note 2021-03-12 14:39:27 +06:00
InsanusMokrassar 72cf38d3bb fill Behaviour Builder for ChatMemberUpdated 2021-03-12 14:36:10 +06:00
InsanusMokrassar 0adee13cba remove deprecations 2021-03-11 22:28:56 +06:00
InsanusMokrassar f9e3e57f24 migrate 0.32.10 -> 0.33.0 2021-03-11 21:44:08 +06:00
InsanusMokrassar d7d4adc8e4 optimize imports 2021-03-11 21:39:34 +06:00
InsanusMokrassar e9b074a36c updates of FlowsUpdatesFilter 2021-03-11 21:36:29 +06:00
InsanusMokrassar 65cba0f014 fill api of chat invite links 2021-03-11 21:25:11 +06:00
InsanusMokrassar 36202133a1 update classcasts 2021-03-11 21:06:25 +06:00
InsanusMokrassar 66f7801b32 fix ChatInviteLinkRequest 2021-03-11 20:41:47 +06:00
InsanusMokrassar e7265829d1 include ChatMemberUpdated functionality 2021-03-11 20:17:08 +06:00
InsanusMokrassar 9ad5bfbc57 remove BotInviteChatLink 2021-03-11 16:36:15 +06:00
InsanusMokrassar aba62ba930 chatmember serializers are public 2021-03-11 16:00:47 +06:00
InsanusMokrassar 40d702a311 add representations of all chat invite link functionality 2021-03-10 22:46:56 +06:00
InsanusMokrassar 233d893b5a add isOff extension for MessageAutoDeleteTimerChanged 2021-03-09 22:33:05 +06:00
InsanusMokrassar 0faca5838c fixes in events builder behaviours 2021-03-09 22:14:16 +06:00
InsanusMokrassar 838f62aa84 shortcuts seconds24Hours and seconds7Days are consts for now 2021-03-09 22:06:20 +06:00
InsanusMokrassar bc21a680bc fixes for MessageAutoDeleteTimerChanged 2021-03-09 22:00:17 +06:00
InsanusMokrassar 8bb60bea34 now MessageAutoDeleteTimerChanged implementing ChannelEvent and GroupEvent 2021-03-09 21:37:25 +06:00
InsanusMokrassar 8daadcff95 now MessageAutoDeleteTimerChanged implementing ChannelEvent and GroupEvent 2021-03-09 21:35:53 +06:00
InsanusMokrassar 2a1e624641 VoiceChatParticipantsInvited type now is data class 2021-03-09 20:23:03 +06:00
InsanusMokrassar 696822db02 add behaviour builder events updates 2021-03-09 20:04:44 +06:00
InsanusMokrassar ded501d963 remove regular build 2021-03-09 19:52:46 +06:00
InsanusMokrassar 86e506c33d include message_auto_delete_timer_change 2021-03-09 19:45:19 +06:00
InsanusMokrassar 9902b00e85 include revokeMessages in kickChatMember 2021-03-09 19:33:05 +06:00
InsanusMokrassar 53524abcbb include canManageChat 2021-03-09 19:26:30 +06:00
InsanusMokrassar 7639b15dc6 voice chats functionality included 2021-03-09 19:19:15 +06:00
InsanusMokrassar 61b720c61f fix of content waiters and expecters 2021-03-09 16:54:32 +06:00
InsanusMokrassar baf4c74b69 update micro_utils 2021-03-09 16:46:08 +06:00
InsanusMokrassar 367cfff2cb start 0.32.10 2021-03-09 16:45:13 +06:00
InsanusMokrassar 75e8d0f62d Merge pull request #325 from InsanusMokrassar/0.32.9
0.32.9
2021-03-05 01:08:58 +06:00
InsanusMokrassar c521a5f9a4 Update CHANGELOG.md 2021-03-03 22:32:44 +06:00
InsanusMokrassar c5513365c2 Update gradle.properties 2021-03-03 22:31:29 +06:00
InsanusMokrassar d184ce7a0f Update mpp_publish_template.kpsb 2021-03-03 01:39:18 +06:00
InsanusMokrassar a3bff3f24d Update publish.gradle 2021-03-03 01:37:38 +06:00
InsanusMokrassar a835b1dcbb Update mpp_publish_template.kpsb 2021-03-03 01:33:50 +06:00
InsanusMokrassar ffed2b80a5 update publish scripts to avoid useless repos 2021-03-02 16:45:13 +06:00
InsanusMokrassar ff24b9f35b add workflow for packages publication 2021-03-02 16:25:55 +06:00
InsanusMokrassar 1287852334 update microutils version 2021-03-02 15:26:52 +06:00
InsanusMokrassar fc2f177e38 update dependencies 2021-02-28 22:24:34 +06:00
InsanusMokrassar 1efd4dce6e start 0.32.9 2021-02-28 22:21:57 +06:00
InsanusMokrassar 69b5a16b17 Update gradle-wrapper.properties 2021-02-23 09:53:45 +06:00
InsanusMokrassar 77b531ad06 Merge pull request #307 from InsanusMokrassar/0.32.8
0.32.8
2021-02-22 01:35:40 +06:00
InsanusMokrassar a98d5d9abd update micro_utils 2021-02-21 22:50:47 +06:00
InsanusMokrassar 104653ac41 update serialization 2021-02-21 21:15:40 +06:00
InsanusMokrassar 63337b8285 start 0.32.8 2021-02-21 21:13:23 +06:00
InsanusMokrassar 5cc0bbb31b Merge pull request #303 from InsanusMokrassar/0.32.7
0.32.7
2021-02-18 00:34:46 +06:00
InsanusMokrassar 563d784603 RestrictionsChatPermissions 2021-02-18 00:28:36 +06:00
InsanusMokrassar 0d9f18f346 DiceAnimationType class casts 2021-02-17 22:29:29 +06:00
InsanusMokrassar 23ceaf8e97 LeftRestrictionsChatPermissions 2021-02-17 22:12:58 +06:00
InsanusMokrassar fe2dffd8b5 BehaviourContext updates 2021-02-17 22:11:26 +06:00
InsanusMokrassar eeb46817c3 start 0.32.7 2021-02-17 22:00:46 +06:00
InsanusMokrassar 5ab00da31d Merge pull request #300 from InsanusMokrassar/0.32.6
0.32.6
2021-02-17 17:15:40 +06:00
InsanusMokrassar 841ae73f7c replyWithDice 2021-02-17 17:10:21 +06:00
InsanusMokrassar 41b4d29917 updates in slot machine utils 2021-02-17 16:58:57 +06:00
InsanusMokrassar f8b3c44146 update micro_utils 2021-02-16 13:48:32 +06:00
InsanusMokrassar f0eb670c3f start 0.32.6 2021-02-16 13:47:31 +06:00
InsanusMokrassar fe5d94f31e Update README.md 2021-02-13 10:09:33 +06:00
InsanusMokrassar 7901d0a223 Update README.md 2021-02-13 01:42:35 +06:00
InsanusMokrassar 799f9123ba Update README.md 2021-02-13 01:38:31 +06:00
InsanusMokrassar f77f010e66 Update README.md 2021-02-11 13:38:55 +06:00
InsanusMokrassar 67ddf8d809 Update README.md 2021-02-11 13:37:24 +06:00
InsanusMokrassar 81afa46253 Update README.md 2021-02-11 13:36:53 +06:00
InsanusMokrassar a5bba76f07 Update README.md 2021-02-11 13:35:06 +06:00
InsanusMokrassar d882cf9c97 update readme 2021-02-11 12:06:34 +06:00
InsanusMokrassar 2e27b8b64d Merge pull request #295 from InsanusMokrassar/0.32.5
0.32.5
2021-02-09 19:13:42 +06:00
InsanusMokrassar 4df800eaa9 fix of #291 2021-02-09 19:07:31 +06:00
InsanusMokrassar 8d27349868 update content resends and different other things 2021-02-09 18:26:10 +06:00
InsanusMokrassar 2a89c41a58 fix of #292 2021-02-09 17:15:28 +06:00
InsanusMokrassar 098b5cc393 rewrite createAccumulatedUpdatesRetrieverFlow onto channelFlow 2021-02-09 16:33:48 +06:00
InsanusMokrassar 10f4817283 solution of #293 2021-02-08 19:35:32 +06:00
InsanusMokrassar 4449893608 fix of #294 2021-02-08 18:15:54 +06:00
InsanusMokrassar 3a53f41f66 start 0.32.5 2021-02-08 11:36:20 +06:00
InsanusMokrassar 7cd366d893 Update README.md 2021-02-07 18:02:20 +06:00
InsanusMokrassar 1309a4111c Merge pull request #290 from InsanusMokrassar/0.32.4
content messages renames
2021-02-07 16:59:51 +06:00
InsanusMokrassar 0ca815760b content messages renames 2021-02-07 16:54:48 +06:00
InsanusMokrassar eca0680f2f update readme 2021-02-07 12:44:38 +06:00
InsanusMokrassar d472d371ed Merge pull request #282 from InsanusMokrassar/0.32.4
0.32.4
2021-02-07 12:43:08 +06:00
InsanusMokrassar 4748b6813a ExceptionsOnlyLimiter now will not use Result to provide success/failure state of result 2021-02-07 12:40:05 +06:00
InsanusMokrassar a2ea15d4b0 update wrapper version 2021-02-07 11:02:13 +06:00
InsanusMokrassar 27dc302f5d update for compiling 2021-02-06 11:53:30 +06:00
InsanusMokrassar baf8ed3a77 now JVM part will be compiled with IR 2021-02-06 00:52:39 +06:00
InsanusMokrassar 18913af3c3 update publishing scripts 2021-02-06 00:50:51 +06:00
InsanusMokrassar 51871ea94c update micro_utils version 2021-02-05 16:08:45 +06:00
InsanusMokrassar 6a625d7b9f update publishing scripts 2021-02-05 16:08:28 +06:00
InsanusMokrassar 0b93b472a3 update klock 2021-02-05 14:22:42 +06:00
InsanusMokrassar ff16f9a315 Update README.md 2021-02-05 01:18:38 +06:00
InsanusMokrassar 86bfe043a5 update dependencies 2021-02-03 23:05:17 +06:00
InsanusMokrassar fa18e7299d 0.32.4 2021-02-03 22:59:37 +06:00
InsanusMokrassar c986025075 Merge pull request #277 from InsanusMokrassar/0.32.3
0.32.3
2021-02-02 11:44:53 +06:00
InsanusMokrassar e8a7ea9ce4 inline qieries expectators and waiters 2021-02-02 11:17:51 +06:00
InsanusMokrassar 30f35e5488 start 0.32.3 2021-02-02 11:07:30 +06:00
InsanusMokrassar b626974ea7 Create dependabot.yml 2021-02-01 23:22:26 +06:00
InsanusMokrassar 128b782a27 Merge pull request #276 from InsanusMokrassar/0.32.2
0.32.2
2021-02-01 21:43:21 +06:00
InsanusMokrassar dc83b8d77a fix of #275 and several other internal problems 2021-02-01 21:09:11 +06:00
InsanusMokrassar 2aac6c0bde start 0.32.2 2021-02-01 21:04:54 +06:00
InsanusMokrassar b637d0d2a6 Merge pull request #274 from InsanusMokrassar/0.32.1
0.32.1
2021-01-30 21:06:15 +06:00
InsanusMokrassar d12cba2343 replacing of withContent and requireWithContent and extending of extensions receivers types 2021-01-30 20:59:26 +06:00
InsanusMokrassar 450c7e6474 fix of #273 2021-01-30 20:05:07 +06:00
InsanusMokrassar a35fb40a66 fix of #272 2021-01-30 19:35:53 +06:00
InsanusMokrassar 8731aa2c26 start 0.32.1 2021-01-30 19:33:38 +06:00
InsanusMokrassar 32e305537d Merge pull request #260 from InsanusMokrassar/0.32.0
0.32.0
2021-01-29 17:00:06 +06:00
InsanusMokrassar ec0a10e36e fillup changelog 2021-01-29 13:28:18 +06:00
InsanusMokrassar 131ec4d6d5 renames of EncryptedPassportElements 2021-01-29 12:44:13 +06:00
InsanusMokrassar ecc608f51a add additional variant of doInDecryptionContextWithPKCS8Key 2021-01-29 10:44:11 +06:00
InsanusMokrassar 040654f131 refill readme 2021-01-29 01:18:44 +06:00
InsanusMokrassar 9e73d0c461 add opportunity to manually set up delay for media groups webhooks 2021-01-29 00:56:47 +06:00
InsanusMokrassar d67c80bc99 ClassCasts update for SecureValue 2021-01-28 22:21:21 +06:00
InsanusMokrassar b0eef4f82d update ktor 2021-01-28 22:06:52 +06:00
InsanusMokrassar fbe91a6321 complete preview tools for passport 2021-01-28 22:03:14 +06:00
InsanusMokrassar 15066c9d63 add SecureData and DecryptedCredentials 2021-01-28 17:08:25 +06:00
InsanusMokrassar e0bf67d8f9 global update of passport 2021-01-28 16:03:30 +06:00
InsanusMokrassar 1dc3ce2fb5 add passport in API 2021-01-25 10:43:51 +06:00
InsanusMokrassar 0c71133969 add expectations and triggers for passport 2021-01-25 10:29:11 +06:00
InsanusMokrassar 1359dd549f Create regular-build.yml 2021-01-25 04:42:23 +06:00
InsanusMokrassar c425e2ecc3 update classcasts 2021-01-23 21:10:57 +06:00
InsanusMokrassar 4d63e3a17d complete tools for handling of encrypted data 2021-01-23 20:50:46 +06:00
InsanusMokrassar d34deade0d temporal state (currently tools for files decryption in JS do work 2021-01-23 18:49:41 +06:00
InsanusMokrassar 2f52ad45a4 add tools for passport files hashes calculation 2021-01-23 12:21:57 +06:00
InsanusMokrassar 1d99e632a4 fix of SetPassportDataErrors request parent interface 2021-01-22 23:40:33 +06:00
InsanusMokrassar cdcfaf5a29 fixes in passport errors serialization and replacing of PassportElementError 2021-01-22 23:14:24 +06:00
InsanusMokrassar f3590762f3 add PassportElementError realization 2021-01-22 23:01:37 +06:00
InsanusMokrassar e0ff14b7fe update gradle wrapper 2021-01-22 21:57:23 +06:00
InsanusMokrassar 9983e111ec update EncryptedElementSerializer 2021-01-22 21:53:37 +06:00
InsanusMokrassar 08b8710772 add asAction and several variants of oneOf 2021-01-19 20:19:28 +06:00
InsanusMokrassar fc71e028c4 improving work of behaviour_builder 2021-01-19 18:50:45 +06:00
InsanusMokrassar 30a4a7bd8b update micro_utils dependency 2021-01-19 13:52:06 +06:00
InsanusMokrassar b973278b0a add note about breaking changes 2021-01-19 11:00:12 +06:00
InsanusMokrassar ae2f4579e2 start 0.32.0 as a migration from 0.31.1 due to breaking changes in MediaGroupMessage type 2021-01-19 10:52:30 +06:00
InsanusMokrassar a4bf6911c7 Update micro_utils version note 2021-01-19 00:40:29 +06:00
InsanusMokrassar 73b3daa68b Update micro_utils dependency 2021-01-19 00:39:46 +06:00
InsanusMokrassar 09748615ae optimize imports 2021-01-18 23:43:21 +06:00
InsanusMokrassar 2dc8521aed now all data field are predecrypted with Base64StringSerializer 2021-01-17 16:44:56 +06:00
InsanusMokrassar 81de59f37c fix of translations in UtilityBill 2021-01-17 16:34:05 +06:00
InsanusMokrassar fb61a94c5e fix defaults in encrypted passport data 2021-01-17 16:30:25 +06:00
InsanusMokrassar 26fd5e51bf filesSize in PassportFile is nullable for now 2021-01-17 16:24:33 +06:00
InsanusMokrassar c1ab9da4c4 fix error with deserialization of passport data 2021-01-17 16:11:38 +06:00
InsanusMokrassar 6b414d64b0 remove redundant imports 2021-01-17 15:45:20 +06:00
InsanusMokrassar 5a3edc2b44 add passportMessages extension 2021-01-17 15:43:08 +06:00
InsanusMokrassar 6dcdc2ab7f now PassportMessage contains user too 2021-01-17 15:35:25 +06:00
InsanusMokrassar a2ae4f71de new PassportMessage type 2021-01-15 16:27:22 +06:00
InsanusMokrassar 5d87b86afe update passport data to use Base64StringSerializer 2021-01-15 16:02:16 +06:00
InsanusMokrassar ef22735894 add base64 serialization dependency and update micro_utils up to 0.4.17 2021-01-14 21:27:58 +06:00
InsanusMokrassar c0ea479fe3 add primitives for Telegram Passport API 2021-01-14 14:03:25 +06:00
InsanusMokrassar 0846e816e9 start 0.31.1 2021-01-14 12:37:31 +06:00
InsanusMokrassar d837c9d605 update publication scripts 2021-01-13 14:21:35 +06:00
InsanusMokrassar d1993842c3 Merge pull request #257 from InsanusMokrassar/0.31.0
0.31.0
2021-01-10 13:08:00 +06:00
InsanusMokrassar 4e8a9dcff0 update changelog 2021-01-09 22:35:41 +06:00
InsanusMokrassar 10eb15e172 several RiskFeature updates 2021-01-09 22:18:31 +06:00
InsanusMokrassar 0320da7614 updates in long polling methods 2021-01-09 22:10:38 +06:00
InsanusMokrassar 7aa3ff180e several refactoring things and docs appending 2021-01-09 21:50:02 +06:00
InsanusMokrassar a882a212c2 remove different internal strings things 2021-01-09 21:24:13 +06:00
InsanusMokrassar 1b15748f65 optimize imports 2021-01-09 20:59:37 +06:00
InsanusMokrassar 044fe5eadf full removing of old redundant "fullEntitiesList" 2021-01-09 20:52:21 +06:00
InsanusMokrassar 9453ec37e7 update gradle wrapper 2021-01-09 19:01:14 +06:00
InsanusMokrassar 3d0cbc2d2b small refactor 2021-01-09 19:00:41 +06:00
InsanusMokrassar 198b551ebf deprecations removing 2021-01-09 18:25:11 +06:00
InsanusMokrassar 1452e32293 behaviours documentatio and changing of buildBehaviour signature 2021-01-09 18:04:45 +06:00
InsanusMokrassar 946b7abcae start 0.31.0 2021-01-08 16:58:25 +06:00
InsanusMokrassar 879943622a Merge pull request #254 from InsanusMokrassar/0.30.13
0.30.13
2021-01-08 16:50:14 +06:00
InsanusMokrassar c0b4b523cf update micro_utils version 2021-01-08 16:41:08 +06:00
InsanusMokrassar 49e6e9cfe3 fix in new project publication scripts 2021-01-08 16:39:29 +06:00
InsanusMokrassar ffadb6355b fixes in readme 2021-01-08 16:37:03 +06:00
InsanusMokrassar 9cc402b42d ContentMessage -> CommonMessage in behaviour_builder, fill readme of behaviour_builder and update projects schema 2021-01-08 16:28:00 +06:00
InsanusMokrassar b9341f89ac add media groups triggers and waiters 2021-01-08 11:02:18 +06:00
InsanusMokrassar ac07f44c81 change public signature of waiters 2021-01-08 10:29:29 +06:00
InsanusMokrassar 2e53247726 now content waiters and triggers may have set up manually parameter "includeMediaGroups" 2021-01-08 10:22:29 +06:00
InsanusMokrassar e2dddf96a1 several small additions 2021-01-08 00:30:29 +06:00
InsanusMokrassar ce0fceb240 include media groups 2021-01-08 00:22:19 +06:00
InsanusMokrassar 633239961a update FlowsUsh 2021-01-07 19:02:35 +06:00
InsanusMokrassar 8b79b15777 FlowsUpdatesFilter#allUpdatesWithoutMediaGroupsGroupingFlow 2021-01-07 19:01:02 +06:00
InsanusMokrassar a28cf5ddff now BehaviourContext is UpdateFilterm TelegramBot and CoroutineScope 2021-01-07 18:20:23 +06:00
InsanusMokrassar 8c2cffc8e3 rename steps subproject to behaviour_builder 2021-01-07 18:17:50 +06:00
InsanusMokrassar b933361258 optimize imports in steps 2021-01-07 18:12:37 +06:00
InsanusMokrassar 383e722d07 rename scenario to behaviour context 2021-01-07 18:11:24 +06:00
InsanusMokrassar 3125c2fc1b add callback query expectations and triggers 2021-01-07 17:57:08 +06:00
InsanusMokrassar 965b8c3c50 add chat event triggers and expectations in steps 2021-01-07 17:24:58 +06:00
InsanusMokrassar 94745ef373 add docs to base expectations 2021-01-07 16:01:25 +06:00
InsanusMokrassar aee5ab564b optimize imports 2021-01-07 12:45:54 +06:00
InsanusMokrassar c70f0b65dd add content triggers and update command 2021-01-07 12:45:30 +06:00
InsanusMokrassar 30e6f68228 small update of scenarios 2021-01-06 23:21:33 +06:00
InsanusMokrassar 00873a255c preview state of steps 2021-01-06 23:06:48 +06:00
InsanusMokrassar 6bd423dc11 class casts for ResendableContent and TextSource 2021-01-06 20:49:55 +06:00
InsanusMokrassar c5ada8cea0 start 0.30.13 2021-01-06 15:41:27 +06:00
InsanusMokrassar 0cb3df4d1a Merge pull request #251 from InsanusMokrassar/0.3.12
0.3.12
2021-01-05 23:06:35 +06:00
InsanusMokrassar b22118b400 add suppressing of unchecked casts 2021-01-05 23:04:09 +06:00
InsanusMokrassar 2006e45b57 last update of classcasts 2021-01-05 23:02:00 +06:00
InsanusMokrassar c091098feb remove *Impl casts 2021-01-05 22:37:52 +06:00
InsanusMokrassar 6cf8d47cbf update classcasts 2021-01-05 22:27:42 +06:00
InsanusMokrassar 3dc4e9dda4 preview of solution for #145 2021-01-05 11:54:02 +06:00
InsanusMokrassar 6407ad1a93 Revert "one more update of klassindex"
This reverts commit f974e5787f.
2021-01-05 11:11:50 +06:00
InsanusMokrassar f974e5787f one more update of klassindex 2021-01-05 11:11:37 +06:00
InsanusMokrassar 28a9bbd310 Revert "add klassindex"
This reverts commit 599d5a51e3.
2021-01-05 01:37:01 +06:00
InsanusMokrassar 599d5a51e3 add klassindex 2021-01-05 01:36:52 +06:00
InsanusMokrassar 25f8d15a4b start 0.3.12 2021-01-05 00:16:11 +06:00
InsanusMokrassar 66c2cb2d30 Merge pull request #243 from InsanusMokrassar/0.30.11
0.30.11
2021-01-04 14:35:56 +06:00
InsanusMokrassar 74fb448378 update klock 2021-01-04 14:29:06 +06:00
InsanusMokrassar 3417ec060f Update README.md 2021-01-03 15:22:19 +06:00
InsanusMokrassar 4f54a00003 Update README.md 2021-01-03 15:20:42 +06:00
InsanusMokrassar 4fb187da30 Update README.md 2021-01-03 15:19:35 +06:00
InsanusMokrassar 7637b6f69a Update README.md 2021-01-03 15:17:58 +06:00
InsanusMokrassar 9df9af193c bot actions got class-cast shortcuts 2021-01-02 16:06:00 +06:00
InsanusMokrassar ba4b4c4b64 bot actions shortcut 2021-01-02 15:51:26 +06:00
InsanusMokrassar fa0861b8bc update micro_utils 2020-12-23 13:42:00 +06:00
InsanusMokrassar 20494e1d4a Update CHANGELOG.md 2020-12-22 17:34:14 +06:00
InsanusMokrassar a404008dee Update dependencies 2020-12-22 17:33:20 +06:00
InsanusMokrassar 881205dd80 update dependencies 2020-12-16 14:25:09 +06:00
InsanusMokrassar 2096c44811 start 0.30.11 2020-12-13 22:25:57 +06:00
InsanusMokrassar 1a3da33589 Merge pull request #237 from InsanusMokrassar/0.30.10
0.30.10
2020-12-08 14:25:00 +06:00
InsanusMokrassar be28c9bd5d update dependencies 2020-12-08 12:03:45 +06:00
InsanusMokrassar a193ef5fd5 buildBot 2020-12-04 16:29:50 +06:00
InsanusMokrassar 7c43d3aaa5 update dependencies 2020-12-04 16:13:02 +06:00
InsanusMokrassar e034afc75c start 0.30.10 2020-12-04 16:06:14 +06:00
InsanusMokrassar 08e3326d1a Merge pull request #226 from InsanusMokrassar/0.30.9
0.30.9
2020-11-27 00:59:33 +06:00
InsanusMokrassar 6dd1825b98 update dependencies 2020-11-27 00:44:29 +06:00
InsanusMokrassar bd4eb29fc1 update limits of dices 2020-11-26 19:37:35 +06:00
InsanusMokrassar 2cc66ef13c BowlingDiceAnimationType 2020-11-25 23:09:49 +06:00
InsanusMokrassar 9a8175d1c8 update dependencies 2020-11-25 23:02:54 +06:00
InsanusMokrassar 25285b2e8a start 0.30.9 2020-11-25 23:01:19 +06:00
InsanusMokrassar bb09f05d7b Merge pull request #223 from InsanusMokrassar/0.30.8
0.30.8
2020-11-21 16:37:47 +06:00
InsanusMokrassar da5e46e59f remove several PreviewFeature 2020-11-21 15:19:31 +06:00
InsanusMokrassar a3f315a73a update micro_utils 2020-11-21 15:15:07 +06:00
InsanusMokrassar 43583a885a update versions 2020-11-21 14:40:34 +06:00
InsanusMokrassar ec02257ecd start 0.30.8 2020-11-21 14:32:32 +06:00
InsanusMokrassar 29ee4a9396 update publishing urls 2020-11-18 17:51:53 +06:00
InsanusMokrassar 2717cb4fc6 exprimentally update publishing scripts 2020-11-18 17:18:51 +06:00
InsanusMokrassar 1ce2526401 Merge pull request #217 from InsanusMokrassar/0.30.7
0.30.7
2020-11-17 16:32:19 +06:00
InsanusMokrassar 74c480b07e one new telegramBot function 2020-11-17 16:18:58 +06:00
InsanusMokrassar 657e9aa770 add KtorRequestsExecutorBuilder 2020-11-17 16:06:25 +06:00
InsanusMokrassar 0d19952ba7 PowLimiter and CommonLimiter rewriting (#210) 2020-11-17 15:48:58 +06:00
InsanusMokrassar f8cccc3e17 update gradle 2020-11-17 14:41:53 +06:00
InsanusMokrassar bc1b7c3f25 fix ending of host url in TelegramAPIUrlsKeeper 2020-11-17 13:18:11 +06:00
InsanusMokrassar ec74111a9d update micro_utils version 2020-11-17 12:51:55 +06:00
InsanusMokrassar 2dadeb7eb7 start 0.30.7 2020-11-17 12:50:54 +06:00
InsanusMokrassar 24bd65501b Update README.md 2020-11-16 21:59:25 +06:00
InsanusMokrassar 574ca803fa Update README.md 2020-11-16 21:56:31 +06:00
InsanusMokrassar 947e3bf34e add fast start 2020-11-16 21:55:22 +06:00
InsanusMokrassar 488158d8fb Merge pull request #214 from InsanusMokrassar/0.30.6
0.30.6
2020-11-16 16:29:46 +06:00
InsanusMokrassar 41bf3c7f0b filling of changelog and renaming of new function makeLink -> makeUsernameLink 2020-11-16 16:25:10 +06:00
InsanusMokrassar c2032d21cd TextSource properties has been renamed 2020-11-16 13:32:20 +06:00
InsanusMokrassar 6650dd9cfe reworking of links extension 2020-11-16 13:22:08 +06:00
InsanusMokrassar af1d6d6f1a start 0.30.6 2020-11-15 23:05:19 +06:00
InsanusMokrassar a5861d659d Merge pull request #212 from InsanusMokrassar/0.30.5
0.30.5
2020-11-14 19:44:26 +06:00
InsanusMokrassar b36f80a6d3 update micro_utils 2020-11-14 19:41:26 +06:00
InsanusMokrassar 7c4f034a6c fixes in imports 2020-11-14 14:41:16 +06:00
InsanusMokrassar 3b08bc6dd2 serialization of ChatMember and changing of id type in User 2020-11-14 14:38:54 +06:00
InsanusMokrassar ed87c0ad95 start 0.30.5 2020-11-14 11:19:53 +06:00
InsanusMokrassar c8c0fc2ce8 Merge pull request #211 from InsanusMokrassar/0.30.4
0.30.4
2020-11-12 23:05:49 +06:00
InsanusMokrassar 1f40ce1a81 add a lot of shortcuts for events 2020-11-12 22:35:27 +06:00
InsanusMokrassar b0219389fc add several functions and changelog notes 2020-11-12 22:23:10 +06:00
InsanusMokrassar f6ec82b449 deprecate old asChatEventsFlow 2020-11-12 22:04:46 +06:00
InsanusMokrassar 71dac70635 deprecations in old functions 2020-11-12 22:02:06 +06:00
InsanusMokrassar 98f68a9e1e filling of changelog 2020-11-12 21:54:14 +06:00
InsanusMokrassar e7199e7451 fix use user in group messages 2020-11-12 21:46:33 +06:00
InsanusMokrassar 33b50c6c68 events filters 2020-11-12 21:17:11 +06:00
InsanusMokrassar e4ce6f8fc7 fixes in events 2020-11-12 17:44:33 +06:00
InsanusMokrassar 8764f18ca8 TextContent now implements TextedInput 2020-11-12 16:57:32 +06:00
InsanusMokrassar b2fa7fee9d rename MultilevelTextSource#textSources 2020-11-12 16:37:17 +06:00
InsanusMokrassar 0121e3a104 update micro_utils 2020-11-12 16:33:48 +06:00
InsanusMokrassar f6e5664632 start 0.30.4 2020-11-12 16:31:02 +06:00
InsanusMokrassar c5b7c4e1f5 Merge pull request #209 from InsanusMokrassar/0.30.3
0.30.3
2020-11-11 11:25:25 +06:00
InsanusMokrassar 53800d49bf small rework in ExceptionsOnlyLimiter 2020-11-11 11:23:24 +06:00
InsanusMokrassar d83e3eb10a add handling of 429 status 2020-11-11 11:15:19 +06:00
InsanusMokrassar 66b4d06064 limiter rework 2020-11-11 10:23:20 +06:00
InsanusMokrassar 4fab01b2a2 update micro_utils 2020-11-11 10:15:06 +06:00
InsanusMokrassar b81086c4bb start 0.30.3 2020-11-11 10:14:10 +06:00
InsanusMokrassar d776071cac Update build.gradle 2020-11-11 01:32:25 +06:00
InsanusMokrassar 5f33d05deb Update extensions utils dependencies 2020-11-11 01:31:28 +06:00
InsanusMokrassar 912cc7217c Update extensions api dependencies 2020-11-11 01:30:31 +06:00
InsanusMokrassar 96e00f6e31 Merge pull request #207 from InsanusMokrassar/0.30.2
0.30.2
2020-11-10 21:52:37 +06:00
InsanusMokrassar f8ea5f9515 fix in changelog 2020-11-10 21:45:07 +06:00
InsanusMokrassar 9f11c4f1c4 update ktor 2020-11-10 20:56:11 +06:00
InsanusMokrassar 9c91980d5d webhook fixes 2020-11-10 20:44:39 +06:00
InsanusMokrassar 7376eb5b10 start 0.30.2 2020-11-10 20:01:22 +06:00
InsanusMokrassar 6654f27f9d Merge pull request #202 from InsanusMokrassar/0.30.1
0.30.1
2020-11-09 15:16:26 +06:00
InsanusMokrassar d29acce417 add suppressing of unused in EntitiesBuilder 2020-11-09 15:14:48 +06:00
InsanusMokrassar f0f18209f3 a little bit improve EntitiesBuilder 2020-11-09 15:12:57 +06:00
InsanusMokrassar 324018a0f6 update publication scripts 2020-11-09 14:45:29 +06:00
InsanusMokrassar b621325e92 update version of microutils and changelog 2020-11-09 08:37:30 +06:00
InsanusMokrassar 43e92555c2 Merge pull request #203 from Djaler/entities-dsl
Add builder-style dsl for text sources
2020-11-09 08:26:44 +06:00
Kirill Romanov 5f1ca51e60 Add builder-style dsl for text sources 2020-11-08 23:12:32 +03:00
InsanusMokrassar 83edda2dfe add link to bot template 2020-11-08 18:58:52 +06:00
InsanusMokrassar 1974c20229 start 0.30.1 2020-11-08 12:07:14 +06:00
InsanusMokrassar 499d9b1791 Update README.md 2020-11-08 00:03:41 +06:00
InsanusMokrassar 6caa7dd428 Merge pull request #163 from InsanusMokrassar/0.30.0
0.30.0
2020-11-07 23:00:35 +06:00
InsanusMokrassar e8ded44562 rename StorageFile in jvm of common 2020-11-07 22:28:20 +06:00
InsanusMokrassar 1e6b0381ee StorageFile factories 2020-11-07 14:44:05 +06:00
InsanusMokrassar 1cf7ae7438 add micro_utils and deprecate old coroutine methods 2020-11-07 13:42:10 +06:00
InsanusMokrassar 311512b5db fix chat interfaces serializers 2020-11-07 01:34:22 +06:00
InsanusMokrassar d73fa4076f add several extension properties to texted/captioned/explained interfaces 2020-11-06 19:13:59 +06:00
InsanusMokrassar 3620350cc0 add simple text dsl for textsources 2020-11-06 18:52:59 +06:00
InsanusMokrassar 54cfea9adf fill changelog 2020-11-06 14:42:30 +06:00
InsanusMokrassar 6665b6ef03 reorganize text sources and text parts 2020-11-06 14:37:13 +06:00
InsanusMokrassar ee6f0f3d5d add separation of text sources 2020-11-06 12:59:55 +06:00
InsanusMokrassar 6ec0fcadd2 rewrite telegramBot functions 2020-11-06 12:29:51 +06:00
InsanusMokrassar c89aa7b9ba telegramBot improvements 2020-11-06 12:07:46 +06:00
InsanusMokrassar cf47cee36a Merge pull request #198 from madhead/issues/190
Fix #190: Support for Google Places values in venue-related methods and types
2020-11-06 11:23:29 +06:00
madhead 824fa9ba09 Fix #190: Support for Google Places values in venue-related methods and types 2020-11-06 00:06:33 +03:00
InsanusMokrassar 654d84b1b4 Merge pull request #197 from madhead/issues/175
Fix #175: Support for message_id field in unpinChatMessage method
2020-11-06 02:17:11 +06:00
madhead c7259e7699 Fix #175: Support for message_id field in unpinChatMessage method 2020-11-05 23:15:23 +03:00
InsanusMokrassar 00a75801a8 fixes 2020-11-06 01:14:48 +06:00
InsanusMokrassar e45f9cf46a return serialname for messageId in RawMessage 2020-11-06 00:37:56 +06:00
InsanusMokrassar 3b1803e851 remove deprecations 2020-11-06 00:12:14 +06:00
InsanusMokrassar bf1e353615 fix build 2020-11-06 00:05:05 +06:00
InsanusMokrassar 99bb8d6e0d update extnsions.api 2020-11-05 23:48:23 +06:00
InsanusMokrassar 98d7b9c651 update coroutines :) 2020-11-05 21:42:31 +06:00
InsanusMokrassar 765caefc32 implementation of allow sending without reply (#191) 2020-11-05 21:33:11 +06:00
InsanusMokrassar 6bdefb6f8f new request CopyMessage (#187) 2020-11-05 20:27:45 +06:00
InsanusMokrassar d5e283e7ba Update all classes which must have "entities"/"caption_entities" fields (#189) 2020-11-05 20:18:16 +06:00
InsanusMokrassar a5982ac881 partially restructurize InlineQueryResult and several its implementators 2020-11-05 18:00:40 +06:00
InsanusMokrassar c0e81b1d6d partially complete rewriting of things according to #189 2020-11-05 16:53:26 +06:00
InsanusMokrassar eb879963f8 isAnonymous support in api 2020-11-05 12:48:44 +06:00
InsanusMokrassar f835167f66 isAnonymous support 2020-11-05 12:47:14 +06:00
InsanusMokrassar ff34b23777 implementation of sender_chat and author_signature 2020-11-05 12:39:59 +06:00
InsanusMokrassar ec806dfd83 Merge pull request #195 from madhead/issues/184
Fix #184: Anonymous Admins: support for is_anonymous flag
2020-11-05 11:38:24 +06:00
madhead 0a73dfb799 Fix #184: Anonymous Admins: support for is_anonymous flag 2020-11-05 01:57:26 +03:00
InsanusMokrassar 53b8cc4625 update pollQuestionTextLength 2020-11-05 01:15:03 +06:00
InsanusMokrassar 201def826e locations updates 2020-11-05 01:12:14 +06:00
InsanusMokrassar 609a959b99 DiceAnimationType#valueLimits 2020-11-04 23:52:22 +06:00
InsanusMokrassar 6a05a7ecab add footbal dice animation type 2020-11-04 23:47:01 +06:00
InsanusMokrassar 159ea6f1cc UnpinAllChatMessages 2020-11-04 23:44:13 +06:00
InsanusMokrassar 0886781d61 add docs for PinChatMessage 2020-11-04 23:41:19 +06:00
InsanusMokrassar 60d5581ec6 supporting of private chats in pinChatMessage 2020-11-04 23:38:40 +06:00
InsanusMokrassar 2a33216006 disableContentTypeDetection 2020-11-04 23:33:48 +06:00
InsanusMokrassar 179bb66183 return SetWebhook without certificate 2020-11-04 23:21:25 +06:00
InsanusMokrassar 7a2ecd2dbf getChat updates completing 2020-11-04 23:10:39 +06:00
InsanusMokrassar fd1a15cb5d ExtendedPrivateChat#bio 2020-11-04 22:46:08 +06:00
InsanusMokrassar 86a472e814 SetWebhook updates 2020-11-04 22:43:26 +06:00
InsanusMokrassar 6d6c544aaf logout and close 2020-11-04 22:17:17 +06:00
InsanusMokrassar dd4d5cd15d start 0.30.0 2020-11-04 22:06:44 +06:00
InsanusMokrassar 23dfa4f69d Merge pull request #162 from InsanusMokrassar/0.29.4
0.29.4
2020-11-02 21:51:23 +06:00
InsanusMokrassar a10d766295 slotmachine utils 2020-11-02 20:32:46 +06:00
InsanusMokrassar ea6ab8f024 start 0.29.4 2020-11-02 20:10:38 +06:00
InsanusMokrassar f377d61bf0 Merge pull request #158 from InsanusMokrassar/0.29.3
0.29.3
2020-11-02 14:21:54 +06:00
InsanusMokrassar 18c9d4e468 fill changelog 2020-11-02 14:14:08 +06:00
InsanusMokrassar 20b931138c update FlowsUpdatesFilter 2020-11-02 14:11:26 +06:00
InsanusMokrassar d7bca15693 deprecations 2020-11-02 13:57:44 +06:00
InsanusMokrassar 957649603b fix for media fields in input media 2020-11-02 13:51:20 +06:00
InsanusMokrassar bbc56fe94c hotfix in changelog 2020-11-02 13:26:06 +06:00
InsanusMokrassar d048958423 WrongFileIdentifierException 2020-11-02 13:25:40 +06:00
InsanusMokrassar f0e9267664 fixes in files and filling of changelog 2020-11-02 13:16:46 +06:00
InsanusMokrassar 5dd7207e09 update serialization version 2020-11-02 12:56:29 +06:00
InsanusMokrassar d96d47e32c make different interfaces for audio and documents media content 2020-11-02 12:51:09 +06:00
InsanusMokrassar 1ee73dd406 sending media groups api updates 2020-11-02 12:39:12 +06:00
InsanusMokrassar e9a05c4930 include audio playlists, documents and slot machine dice 2020-11-02 12:02:12 +06:00
InsanusMokrassar 9e771fa04a fixes 2020-11-02 11:13:16 +06:00
InsanusMokrassar 06ba21fc1f add changelog for audio and document media items 2020-10-30 20:40:44 +06:00
InsanusMokrassar 7d72d72f2c Revert "Revert "Revert "Revert "add slot machine, but currently it is not working""""
This reverts commit b457d11067.
2020-10-30 20:38:04 +06:00
InsanusMokrassar 80d4bdfe17 make audio and documents able to be media group items 2020-10-30 20:38:02 +06:00
InsanusMokrassar b457d11067 Revert "Revert "Revert "add slot machine, but currently it is not working"""
This reverts commit 46fe16fd73.
2020-10-30 19:45:55 +06:00
InsanusMokrassar 46fe16fd73 Revert "Revert "add slot machine, but currently it is not working""
This reverts commit f317e144e6.
2020-10-30 19:37:26 +06:00
InsanusMokrassar 8e1cafb1b6 start 0.29.3 2020-10-30 19:36:48 +06:00
InsanusMokrassar 68d971f874 Merge pull request #155 from InsanusMokrassar/0.29.2
0.29.2
2020-10-27 15:55:17 +06:00
InsanusMokrassar 37a23c7e79 fixes in aggregation of flows 2020-10-27 15:51:48 +06:00
InsanusMokrassar b053c29ea3 update aggregateFlows 2020-10-27 15:26:32 +06:00
InsanusMokrassar 23a1fed7dd Revert "update greetings config"
This reverts commit 87d2537bda.
2020-10-27 15:16:04 +06:00
InsanusMokrassar 87d2537bda update greetings config 2020-10-27 15:14:45 +06:00
InsanusMokrassar 6d782f28c3 updates after coroutines version change 2020-10-27 15:11:57 +06:00
InsanusMokrassar d8dbbdf549 update coroutines 2020-10-27 15:01:30 +06:00
InsanusMokrassar f317e144e6 Revert "add slot machine, but currently it is not working"
This reverts commit 4f9cb531c0.
2020-10-27 14:53:22 +06:00
InsanusMokrassar 05c27804ce update travis config 2020-10-22 19:19:55 +06:00
InsanusMokrassar eb97a8e151 Merge pull request #154 from Megamiun/gm/update-dokka
Gm/update dokka
2020-10-22 19:18:51 +06:00
Gabryel Monteiro 06639e5f3c Update gradle.properties 2020-10-22 09:41:06 -03:00
InsanusMokrassar 82b7bf676f Update .travis.yml 2020-10-20 02:05:34 +06:00
InsanusMokrassar 4f9cb531c0 add slot machine, but currently it is not working 2020-10-19 20:26:36 +06:00
InsanusMokrassar 09bbb1945c start 0.29.2 2020-10-19 20:12:18 +06:00
InsanusMokrassar 7bedc4caf0 Merge remote-tracking branch 'original/master' into gm/update-dokka 2020-10-19 19:51:03 +06:00
InsanusMokrassar 6a73aa1525 add travis dokka step 2020-10-19 19:50:41 +06:00
InsanusMokrassar e1ee541005 extend max heap size for gradle 2020-10-19 19:45:46 +06:00
Gabryel Monteiro 2d2fe01227 Changing Dokka version 2020-10-19 01:51:09 -03:00
Gabryel Monteiro af53682b1f Removing kts notation 2020-10-19 00:45:29 -03:00
Gabryel Monteiro c8a5552c9e Adding projects 2020-10-19 00:40:24 -03:00
Gabryel Monteiro ffa78ebfe1 Update to 1.4.0 2020-10-18 22:38:16 -03:00
InsanusMokrassar e85e7d02f7 Merge pull request #149 from InsanusMokrassar/0.29.1
0.29.1
2020-10-13 16:08:19 +06:00
InsanusMokrassar 37ad279ab4 Merge pull request #148 from leobia/master
Reformat CHANGELOG.md
2020-10-12 15:27:09 +06:00
InsanusMokrassar 3b41dc1fbf Merge remote-tracking branch 'original/0.29.1' 2020-10-12 15:26:11 +06:00
InsanusMokrassar 5747383ed1 Update README.md 2020-10-12 01:08:56 +06:00
InsanusMokrassar 18a6efabb8 post fixes for serialization update 2020-10-09 11:49:24 +06:00
InsanusMokrassar dcb837b155 update serialization version 2020-10-09 11:41:08 +06:00
InsanusMokrassar 03755e9eef start 0.29.1 2020-10-09 11:35:33 +06:00
lbia b9db2d544d Reformat CHANGELOG.md 2020-10-08 22:11:39 +02:00
InsanusMokrassar 800d14561e add conversations between AudioFile and VoiceFile 2020-10-04 20:00:43 +06:00
InsanusMokrassar 2378237fc5 Merge pull request #146 from InsanusMokrassar/0.29.0
0.29.0
2020-10-04 19:46:22 +06:00
InsanusMokrassar 35e28c00cb fix help for versions before 0.28.0 2020-10-04 19:31:45 +06:00
InsanusMokrassar 1913f1a900 update libraries schema 2020-10-04 19:26:16 +06:00
InsanusMokrassar cbfd34098d READMEs fixes 2020-10-04 18:54:57 +06:00
InsanusMokrassar e5618f4705 more fixes to god of fixes (docs fixes) 2020-10-04 18:50:05 +06:00
InsanusMokrassar c9f2166e7d fixes in md files 2020-10-04 18:46:28 +06:00
InsanusMokrassar eb960290c6 remove redundant changes 2020-10-04 18:39:03 +06:00
InsanusMokrassar 100f8b564a remove redundant changes 2020-10-04 18:37:55 +06:00
InsanusMokrassar 8e1ad9ffbc artifacts names has been changed 2020-10-04 18:34:03 +06:00
InsanusMokrassar 8875e2a986 update changelog parser 2020-10-04 17:43:25 +06:00
InsanusMokrassar 7478b151eb fixes in readmes 2020-10-04 17:41:30 +06:00
InsanusMokrassar 959136479e add information about migration in examples project 2020-10-04 17:35:24 +06:00
InsanusMokrassar a52a62837e add migration notes 2020-10-04 17:17:52 +06:00
InsanusMokrassar 17dd694044 change package group and readmes 2020-10-04 17:10:03 +06:00
InsanusMokrassar 34fcfe2e20 migrate core project in new package 2020-10-04 17:06:30 +06:00
InsanusMokrassar 64862ecd2d experimentaly change package for extensions projects 2020-10-04 16:59:27 +06:00
InsanusMokrassar c9edbbf7af migration onto major changes 0.29.0 2020-10-04 16:52:00 +06:00
InsanusMokrassar a2f9a5a432 hotfix after SendVoice signature change 2020-10-04 16:49:43 +06:00
InsanusMokrassar 8337da34ca fix of #144 plus several other changes 2020-10-04 16:47:30 +06:00
InsanusMokrassar f45956b554 hotfix for changelogs 2020-10-04 13:19:19 +06:00
InsanusMokrassar bec1255d67 replaces of RequestsExecutor by TelegramBot typealias in TelegramBotAPI-extensions-api 2020-10-04 13:18:24 +06:00
InsanusMokrassar 39ca29279f fix forward_from_chat for SupergroupChat 2020-10-02 18:07:16 +06:00
InsanusMokrassar 70b592baad ForwardFromSupergroupInfo 2020-10-02 14:59:10 +06:00
InsanusMokrassar 403aa684a8 start 0.28.5 2020-10-02 14:58:27 +06:00
InsanusMokrassar 48c6f103b5 Update README.md 2020-10-02 14:27:07 +06:00
InsanusMokrassar e326d289cb Create pull_request_template.md 2020-10-02 13:26:32 +06:00
InsanusMokrassar 7fd9c4c897 Create CONTRIBUTING.md 2020-10-02 13:10:01 +06:00
InsanusMokrassar 347a6212d4 Merge pull request #141 from InsanusMokrassar/0.28.4
0.28.4
2020-09-28 13:29:22 +06:00
InsanusMokrassar e10e257c80 update ktor 2020-09-28 13:18:03 +06:00
InsanusMokrassar 5e7bc96b44 add deprecations 2020-09-28 13:11:41 +06:00
InsanusMokrassar 79d0eda61d add changelog 2020-09-28 13:09:58 +06:00
InsanusMokrassar 9916b3f469 Merge pull request #140 from madhead/issues/139
Fix #139: Add "from" field to chat events
2020-09-28 12:55:13 +06:00
InsanusMokrassar 2bac5f0eed start 0.28.4 2020-09-28 12:54:01 +06:00
madhead 01eb072caa Fix #139: Add "from" field to chat events 2020-09-27 13:26:10 +03:00
InsanusMokrassar 496af479b0 Revert "add karma for tests"
This reverts commit 386e91e28b.
2020-09-22 22:42:01 +06:00
InsanusMokrassar 386e91e28b add karma for tests 2020-09-22 22:33:45 +06:00
InsanusMokrassar 91dbcecefc add autoPublishing 2020-09-22 18:53:48 +06:00
InsanusMokrassar 2d743e4c19 Merge pull request #136 from InsanusMokrassar/0.28.3
0.28.3
2020-09-22 18:32:06 +06:00
InsanusMokrassar 8804a24013 small refactoring 2020-09-22 18:12:48 +06:00
InsanusMokrassar 8b5244d8df hotfix 2020-09-22 18:06:50 +06:00
InsanusMokrassar 034901a479 add publication of github release via changelog 2020-09-22 18:04:10 +06:00
InsanusMokrassar 7043647584 changelog parser script has been added 2020-09-22 15:15:20 +06:00
InsanusMokrassar acd9505a5d inline queries extensions 2020-09-22 14:47:34 +06:00
InsanusMokrassar 46c33d5ec4 update dependencies 2020-09-22 11:33:47 +06:00
InsanusMokrassar 89dc7a4b2a InlineQueryResult#id type change 2020-09-20 20:16:14 +06:00
InsanusMokrassar e4f305b3ec start 0.28.3 2020-09-20 20:11:27 +06:00
InsanusMokrassar d56c132201 Reorder 0.28.* changelogs 2020-09-16 19:28:05 +06:00
InsanusMokrassar d336e177dd Merge pull request #135 from InsanusMokrassar/0.28.2
0.28.2
2020-09-16 11:45:22 +06:00
InsanusMokrassar 15e29286fb commonMessages and sent via bot shortcuts updates 2020-09-14 00:12:28 +06:00
InsanusMokrassar 314ceed78e signature change in filterCommandsWithArgs 2020-09-13 23:58:09 +06:00
InsanusMokrassar 3fa3aa50d9 commands shortcuts 2020-09-13 23:42:59 +06:00
InsanusMokrassar 571296b9a0 start 0.28.2 2020-09-13 23:32:47 +06:00
InsanusMokrassar 3f13e5d062 Merge pull request #132 from InsanusMokrassar/0.28.1
0.28.1
2020-09-12 22:38:24 +06:00
InsanusMokrassar 1874023c05 fixes in build + changes in signature of executeUnsafe 2020-09-12 16:22:39 +06:00
InsanusMokrassar dc0fda2066 update handleSafely 2020-09-12 16:18:00 +06:00
InsanusMokrassar c0d4a4f01b update gradle wrapper version 2020-09-12 15:49:09 +06:00
InsanusMokrassar 603762bc22 update kotlin and UUID versions 2020-09-12 15:44:44 +06:00
InsanusMokrassar 4db82d6ce2 start 0.28.1 2020-09-12 15:40:12 +06:00
InsanusMokrassar 9bf8f56254 update SimpleInputFilesTest 2020-08-29 19:52:46 +06:00
InsanusMokrassar 9c926a2265 update SimpleInputFilesTest 2020-08-29 19:51:10 +06:00
InsanusMokrassar 747854f4f4 Merge pull request #123 from InsanusMokrassar/0.28.0
0.28.0
2020-08-29 18:46:16 +06:00
1369 changed files with 53422 additions and 14998 deletions

No files matched your search

+1 -3
View File
@@ -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
View 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"
+5 -3
View File
@@ -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"
+2
View File
@@ -0,0 +1,2 @@
* Please, be sure that you have read [Contributing](https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/CONTRIBUTING.md) file. Of course, this line must be removed during PR preparation :)
* Describe your changes, shortly. As example (or format) you can look at the body of any [Project releases](https://github.com/InsanusMokrassar/TelegramBotAPI/releases)
+21
View 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
View File
@@ -12,6 +12,7 @@ on:
jobs:
triage:
runs-on: ubuntu-latest
if: ${{ github.actor == github.repository_owner }}
steps:
- uses: actions/labeler@v2
with:
+24
View 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
View File
@@ -1 +0,0 @@
spellchecker: true
+4
View File
@@ -8,3 +8,7 @@ settings.xml
.gradle/
build/
out/
local.properties
kotlin-js-store/
secret.gradle
+2
View File
@@ -11,3 +11,5 @@ jobs:
script: ./gradlew build -s -x jvmTest -x jsIrTest -x jsIrBrowserTest -x jsIrNodeTest -x jsLegacyTest -x jsLegacyBrowserTest -x jsLegacyNodeTest
- state: test
script: ./gradlew allTests
- state: dokka
script: ./gradlew dokkaHtml
+2135 -511
View File
File diff suppressed because it is too large. Load diff
+10
View File
@@ -0,0 +1,10 @@
# Contributing
In case you wish to contribute this project, there are several small things you must remember:
* Give maintainers opportunity to manage your Pull request. It is required for two reasons
* For more efficient Pull Requests handling (it is much easier for me to fix something small directly in your pull request than ask to fix some small things after each review)
* Usually, you will set as a target `master` branch, but I prefer to include code into separated version branch firstly. So, if you will give me opporunity to change Pull Request, I will be available to change base branch
* Currently in Pull Requests there are several bots. The most important is Travis bot and it must always successfuly build code from your Pull Request
This project was built on the idea of strongly-typed declaration of TelegramBotAPI. So, do not worry if maintaners will change your pull requests: you are already cool because you have contributed this project:)
+97 -114
View File
@@ -1,137 +1,120 @@
# TelegramBotAPI
# TelegramBotAPI [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) [![Supported version](https://img.shields.io/badge/Telegram%20Bot%20API-6.2-blue)](https://core.telegram.org/bots/api-changelog#august-12-2022)
| Common info | [![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin) [![Build Status](https://travis-ci.com/InsanusMokrassar/TelegramBotAPI.svg?branch=master)](https://travis-ci.com/InsanusMokrassar/TelegramBotAPI) [Small survey](https://forms.gle/tnjuExdSKEr32ygKA)|
| -------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Useful links | [![Chat in Telegram](badges/chat.svg)](https://t.me/InMoTelegramBotAPI) [![KDocs](badges/kdocs.svg)](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 | [![Download](https://api.bintray.com/packages/insanusmokrassar/StandardRepository/TelegramBotAPI-core/images/download.svg)](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI-core/_latestVersion) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI) |
| TelegramBotAPI Extensions status | [![Download](https://api.bintray.com/packages/insanusmokrassar/StandardRepository/TelegramBotAPI-extensions-api/images/download.svg)](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI-extensions-api/_latestVersion) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI-extensions-api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI-extensions-api) |
| TelegramBotAPI Util Extensions status | [![Download](https://api.bintray.com/packages/insanusmokrassar/StandardRepository/TelegramBotAPI-extensions-utils/images/download.svg)](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI-extensions-utils/_latestVersion) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI-extensions-utils/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI-extensions-utils) |
| TelegramBotAPI All status | [![Download](https://api.bintray.com/packages/insanusmokrassar/StandardRepository/TelegramBotAPI/images/download.svg)](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI/_latestVersion) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.insanusmokrassar/TelegramBotAPI-all) |
| Docs | [![KDocs](https://img.shields.io/static/v1?label=Dokka&message=KDocs&color=blue&logo=kotlin)](https://tgbotapi.inmo.dev/index.html) [![Mini tutorial](https://img.shields.io/static/v1?label=Bookstack&message=Tutorial&color=blue&logo=bookstack)](https://bookstack.inmo.dev/books/telegrambotapi/chapter/introduction-tutorial) |
|:---:|:---:|
| Useful repos | [![Create bot](https://img.shields.io/static/v1?label=Github&message=Template&color=blue&logo=github)](https://github.com/InsanusMokrassar/TelegramBotAPI-bot_template/generate) [![Examples](https://img.shields.io/static/v1?label=Github&message=Examples&color=blue&logo=github)](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/) |
| Misc | [![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin) [![Small survey](https://img.shields.io/static/v1?label=Google&message=Survey&color=blue&logo=google-sheets)](https://docs.google.com/forms/d/e/1FAIpQLSctdJHT_aEniyYT0-IUAEfo1hsIlezX2owlkEAYX4KPl2V2_A/viewform?usp=sf_link) |
**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`**
<!--- [![Telegram Channel](./resources/tg_channel_qr.jpg)](https://t.me/InMoTelegramBotAPI) --->
<p align="center">
<a href="https://t.me/InMoTelegramBotAPI">
<img src="./resources/tg_channel_qr.jpg">
</a>
</p>
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:
Hello! This is a set of libraries for working with Telegram Bot API.
* [TelegramBotAPI-core](TelegramBotAPI-core/README.md) - core of library. In fact it is independent library and can be used alone
without any additional library
* [TelegramBotAPI Extensions](TelegramBotAPI-extensions-api/README.md) - contains extensions (mostly for
`RequestsExecutor`), which allows to use the core library in more pleasant way
* [TelegramBotAPI Util Extensions](TelegramBotAPI-extensions-utils/README.md) - contains extensions for more comfortable
work with commands, updates and other different things
* [TelegramBotAPI](TelegramBotAPI/README.md) - concentration of all previously mentioned libraries
## Examples
Most part of some specific solves or unuseful
moments are describing by official [Telegram Bot API](https://core.telegram.org/bots/api).
There are several things you need to do to launch examples below:
## JavaScript notes
* 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)
### Versions before `0.28.0`
More including instructions [available here](https://github.com/InsanusMokrassar/TelegramBotAPI/wiki/Including-in-your-project).
Other configuration examples:
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)):
* [For multiplatform](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/tree/master/ResenderBot)
* [For JVM](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/blob/master/GetMeBot/build.gradle)
<details>
<summary>Gradle build script help (for versions before 0.28.0)</summary>
### Most common example
```groovy
dependencies {
/* ... */
```kotlin
suspend fun main() {
val bot = telegramBot(TOKEN)
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
![Libraries hierarchy](resources/TelegramBotAPI-libraries-hierarchy.svg)
```kotlin
suspend fun main() {
val bot = telegramBot(TOKEN)
In most cases, the most simple way will be to implement [TelegramBotAPI](TelegramBotAPI/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 API Extensions](TelegramBotAPI-extensions-api/README.md),
[TelegramBotAPI Util Extensions](TelegramBotAPI-extensions-utils/README.md) or even
[TelegramBotAPI-core](TelegramBotAPI-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](TelegramBotAPI-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())`
* `TelegramBotAPI-extensions-api` typical syntax look like `requestsExecutor.someRequest()` (in most cases it would be
better to use `bot` name instead of `requestsExecutor`)
* `TelegramBotAPI-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 [bookstack](https://bookstack.inmo.dev/books/telegrambotapi) and
[chat](https://t.me/InMoTelegramBotAPIChat).
-91
View File
@@ -1,91 +0,0 @@
buildscript {
repositories {
mavenLocal()
jcenter()
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
classpath "com.jfrog.bintray.gradle:gradle-bintray-plugin:$gradle_bintray_plugin_version"
}
}
plugins {
id "org.jetbrains.kotlin.multiplatform"
id "org.jetbrains.kotlin.plugin.serialization"
}
project.version = "$library_version"
project.group = "$library_group"
apply from: "publish.gradle"
repositories {
mavenLocal()
jcenter()
mavenCentral()
maven { url "https://kotlin.bintray.com/kotlinx" }
}
kotlin {
jvm()
js(BOTH) {
browser()
nodejs()
}
sourceSets {
commonMain {
dependencies {
implementation kotlin('stdlib')
api "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlin_coroutines_version"
api "org.jetbrains.kotlinx:kotlinx-serialization-core:$kotlin_serialisation_runtime_version"
api "org.jetbrains.kotlinx:kotlinx-serialization-properties:$kotlin_serialisation_runtime_version"
api "com.soywiz.korlibs.klock:klock:$klock_version"
api "com.benasher44:uuid:$uuid_version"
api "io.ktor:ktor-client-core:$ktor_version"
}
}
commonTest {
dependencies {
implementation kotlin('test-common')
implementation kotlin('test-annotations-common')
}
}
jvmMain {
dependencies {
api "io.ktor:ktor-server:$ktor_version"
api "io.ktor:ktor-server-host-common:$ktor_version"
api "io.ktor:ktor-client-cio:$ktor_version"
api "javax.activation:activation:$javax_activation_version"
}
}
jvmTest {
dependencies {
implementation kotlin('test-junit')
}
}
jsTest {
dependencies {
implementation kotlin('test-junit')
implementation kotlin('test-js')
}
}
}
targets.all {
compilations.all {
kotlinOptions {
freeCompilerArgs += ["-Xuse-experimental=kotlinx.coroutines.ExperimentalCoroutinesApi", "-Xopt-in=kotlin.RequiresOptIn"]
}
}
}
}
-53
View File
@@ -1,53 +0,0 @@
apply plugin: 'maven-publish'
task javadocsJar(type: Jar) {
classifier = 'javadoc'
}
afterEvaluate {
project.publishing.publications.all {
// rename artifacts
groupId "${project.group}"
if (it.name.contains('kotlinMultiplatform')) {
artifactId = "${project.name}"
} else {
artifactId = "${project.name}-$name"
}
}
}
publishing {
publications.all {
artifact javadocsJar
pom {
description = "Library for Object-Oriented and type-safe work with Telegram Bot API"
name = "Telegram Bot API Core"
url = "https://insanusmokrassar.github.io/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"
}
}
}
}
}
@@ -1 +0,0 @@
{"bintrayConfig":{"repo":"StandardRepository","packageName":"${project.name}","packageVcs":"https://github.com/InsanusMokrassar/TelegramBotAPI"},"licenses":[{"id":"Apache-2.0","title":"Apache Software License 2.0","url":"https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/LICENSE"}],"mavenConfig":{"name":"Telegram Bot API Core","description":"Library for Object-Oriented and type-safe work with Telegram Bot API","url":"https://insanusmokrassar.github.io/TelegramBotAPI","vcsUrl":"https://github.com/insanusmokrassar/TelegramBotAPI.git","developers":[{"id":"InsanusMokrassar","name":"Ovsiannikov Aleksei","eMail":"ovsyannikov.alexey95@gmail.com"}]},"type":"Multiplatform"}
-55
View File
@@ -1,55 +0,0 @@
apply plugin: 'com.jfrog.bintray'
apply from: "maven.publish.gradle"
bintray {
user = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : System.getenv('BINTRAY_USER')
key = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : System.getenv('BINTRAY_KEY')
filesSpec {
from "${buildDir}/publications/"
eachFile {
String directorySubname = it.getFile().parentFile.name
if (it.getName() == "module.json") {
if (directorySubname == "kotlinMultiplatform") {
it.setPath("${project.name}/${project.version}/${project.name}-${project.version}.module")
} else {
it.setPath("${project.name}-${directorySubname}/${project.version}/${project.name}-${directorySubname}-${project.version}.module")
}
} else {
if (directorySubname == "kotlinMultiplatform" && it.getName() == "pom-default.xml") {
it.setPath("${project.name}/${project.version}/${project.name}-${project.version}.pom")
} else {
it.exclude()
}
}
}
into "${project.group}".replace(".", "/")
}
pkg {
repo = "StandardRepository"
name = "${project.name}"
vcsUrl = "https://github.com/InsanusMokrassar/TelegramBotAPI"
licenses = ["Apache-2.0"]
version {
name = "${project.version}"
released = new Date()
vcsTag = "${project.version}"
gpg {
sign = true
passphrase = project.hasProperty('signing.gnupg.passphrase') ? project.property('signing.gnupg.passphrase') : System.getenv('signing.gnupg.passphrase')
}
}
}
}
bintrayUpload.doFirst {
publications = publishing.publications.collect {
if (it.name.contains('kotlinMultiplatform')) {
null
} else {
it.name
}
} - null
}
bintrayUpload.dependsOn publishToMavenLocal
@@ -1,26 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.utils.fullListOfSubSource
interface Captioned {
val caption: String?
}
interface CaptionedOutput : Captioned {
val parseMode: ParseMode?
}
interface CaptionedInput : Captioned {
/**
* Not full list of entities. This list WILL NOT contain [TextPart]s with [com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.textsources.RegularTextSource]
* @see [CaptionedInput.fullEntitiesList]
*/
val captionEntities: List<TextPart>
}
/**
* Convert its [CaptionedInput.captionEntities] to list of [com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.TextSource]
* with [com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.textsources.RegularTextSource]
*/
fun CaptionedInput.fullEntitiesList(): FullTextSourcesList = caption ?.fullListOfSubSource(captionEntities) ?.map { it.source } ?: emptyList()
@@ -1,8 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
interface CommonVenueData : Titled {
override val title: String
val address: String
val foursquareId: String?
val foursquareType: String? // TODO:: Rewrite with enum or interface
}
@@ -1,26 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.utils.fullListOfSubSource
interface Explained {
val explanation: String?
}
interface ExplainedOutput : Explained {
val parseMode: ParseMode?
}
interface ExplainedInput : Explained {
/**
* Not full list of entities. This list WILL NOT contain [TextPart]s with [com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.textsources.RegularTextSource]
* @see [ExplainedInput.fullEntitiesList]
*/
val explanationEntities: List<TextPart>
}
/**
* Convert its [ExplainedInput.explanationEntities] to list of [com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.TextSource]
* with [com.github.insanusmokrassar.TelegramBotAPI.types.MessageEntity.textsources.RegularTextSource]
*/
fun ExplainedInput.fullEntitiesList(): FullTextSourcesList = explanation ?.fullListOfSubSource(explanationEntities) ?.map { it.source } ?: emptyList()
@@ -1,8 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
interface Livable {
/**
* Period in SECONDS
*/
val livePeriod: Int?
}
@@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
import com.github.insanusmokrassar.TelegramBotAPI.utils.MimeType
interface MimeTyped {
val mimeType: MimeType?
}
@@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
interface Performerable {
val performer: String?
}
@@ -1,23 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
typealias FullTextSourcesList = List<TextSource>
typealias FullTextPartsList = List<TextPart>
interface TextSource {
val asMarkdownSource: String
val asMarkdownV2Source: String
val asHtmlSource: String
val source: String
}
interface MultilevelTextSource : TextSource {
val textParts: List<TextPart>
}
data class TextPart(
val range: IntRange,
val source: TextSource
)
fun List<TextPart>.justTextSources() = map { it.source }
@@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
interface Titled {
val title: String?
}
@@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
interface ChatRequest {
val chatId: ChatIdentifier
}
@@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
interface DisableNotification {
val disableNotification: Boolean
}
@@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
interface InlineMessageAction {
val inlineMessageId: InlineMessageIdentifier
}
@@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
interface MessageAction: ChatRequest {
val messageId: MessageIdentifier
}
@@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
interface ReplyMarkup {
val replyMarkup: KeyboardMarkup?
}
@@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
interface ReplyMessageId {
val replyToMessageId: MessageIdentifier?
}
@@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
import com.github.insanusmokrassar.TelegramBotAPI.types.TelegramDate
interface UntilDate {
val untilDate: TelegramDate?
}
@@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.bot
import com.github.insanusmokrassar.TelegramBotAPI.utils.TelegramAPIUrlsKeeper
abstract class BaseRequestsExecutor(
protected val telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper
) : RequestsExecutor
@@ -1,77 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor
import com.github.insanusmokrassar.TelegramBotAPI.bot.BaseRequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.base.*
import com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.newRequestException
import com.github.insanusmokrassar.TelegramBotAPI.bot.settings.limiters.EmptyLimiter
import com.github.insanusmokrassar.TelegramBotAPI.bot.settings.limiters.RequestLimiter
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request
import com.github.insanusmokrassar.TelegramBotAPI.types.Response
import com.github.insanusmokrassar.TelegramBotAPI.utils.*
import io.ktor.client.HttpClient
import io.ktor.client.features.*
import io.ktor.client.statement.HttpStatement
import io.ktor.client.statement.readText
import kotlinx.serialization.json.Json
class KtorRequestsExecutor(
telegramAPIUrlsKeeper: TelegramAPIUrlsKeeper,
client: HttpClient = HttpClient(),
callsFactories: List<KtorCallFactory> = emptyList(),
excludeDefaultFactories: Boolean = false,
private val requestsLimiter: RequestLimiter = EmptyLimiter,
private val jsonFormatter: Json = nonstrictJsonFormat
) : BaseRequestsExecutor(telegramAPIUrlsKeeper) {
private val callsFactories: List<KtorCallFactory> = callsFactories.run {
if (!excludeDefaultFactories) {
this + listOf(SimpleRequestCallFactory, MultipartRequestCallFactory, DownloadFileRequestCallFactory)
} else {
this
}
}
private val client = client.config {
if (client.feature(HttpTimeout) == null) {
install(HttpTimeout)
}
}
override suspend fun <T : Any> execute(request: Request<T>): T {
return handleSafely(
{ e ->
throw if (e is ClientRequestException) {
val content = e.response ?.readText() ?: throw e
val responseObject = jsonFormatter.decodeFromString(Response.serializer(), content)
newRequestException(
responseObject,
content,
"Can't get result object from $content"
)
} else {
e
}
}
) {
requestsLimiter.limit {
var result: T? = null
for (potentialFactory in callsFactories) {
result = potentialFactory.makeCall(
client,
telegramAPIUrlsKeeper,
request,
jsonFormatter
)
if (result != null) {
break
}
}
result ?: error("Can't execute request: $request")
}
}
}
override fun close() {
client.close()
}
}
@@ -1,79 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.base
import com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorCallFactory
import com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.newRequestException
import com.github.insanusmokrassar.TelegramBotAPI.requests.GetUpdates
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request
import com.github.insanusmokrassar.TelegramBotAPI.types.Response
import com.github.insanusmokrassar.TelegramBotAPI.types.RetryAfterError
import com.github.insanusmokrassar.TelegramBotAPI.utils.TelegramAPIUrlsKeeper
import io.ktor.client.HttpClient
import io.ktor.client.call.receive
import io.ktor.client.features.timeout
import io.ktor.client.request.*
import io.ktor.client.statement.HttpResponse
import io.ktor.http.ContentType
import kotlinx.coroutines.delay
import kotlinx.serialization.json.Json
import kotlin.collections.set
abstract class AbstractRequestCallFactory : KtorCallFactory {
private val methodsCache: MutableMap<String, String> = mutableMapOf()
override suspend fun <T : Any> makeCall(
client: HttpClient,
urlsKeeper: TelegramAPIUrlsKeeper,
request: Request<T>,
jsonFormatter: Json
): T? {
val preparedBody = prepareCallBody(client, urlsKeeper, request) ?: return null
client.post<HttpResponse> {
url(
methodsCache[request.method()] ?: "${urlsKeeper.commonAPIUrl}/${request.method()}".also {
methodsCache[request.method()] = it
}
)
accept(ContentType.Application.Json)
if (request is GetUpdates) {
request.timeout?.times(1000L)?.let { customTimeoutMillis ->
if (customTimeoutMillis > 0) {
timeout {
requestTimeoutMillis = customTimeoutMillis
socketTimeoutMillis = customTimeoutMillis
}
}
}
}
body = preparedBody
}.let { response ->
val content = response.receive<String>()
val responseObject = jsonFormatter.decodeFromString(Response.serializer(), content)
return (responseObject.result?.let {
jsonFormatter.decodeFromJsonElement(request.resultDeserializer, it)
} ?: responseObject.parameters?.let {
val error = it.error
if (error is RetryAfterError) {
delay(error.leftToRetry)
makeCall(client, urlsKeeper, request, jsonFormatter)
} else {
null
}
} ?: response.let {
throw newRequestException(
responseObject,
content,
"Can't get result object from $content"
)
})
}
}
protected abstract fun <T : Any> prepareCallBody(
client: HttpClient,
urlsKeeper: TelegramAPIUrlsKeeper,
request: Request<T>
): Any?
}
@@ -1,29 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.base
import com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorCallFactory
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.DownloadFile
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request
import com.github.insanusmokrassar.TelegramBotAPI.utils.TelegramAPIUrlsKeeper
import com.github.insanusmokrassar.TelegramBotAPI.utils.handleSafely
import io.ktor.client.HttpClient
import io.ktor.client.request.*
import io.ktor.client.statement.*
import io.ktor.http.HttpMethod
import kotlinx.serialization.json.Json
object DownloadFileRequestCallFactory : KtorCallFactory {
override suspend fun <T : Any> makeCall(
client: HttpClient,
urlsKeeper: TelegramAPIUrlsKeeper,
request: Request<T>,
jsonFormatter: Json
): T? = (request as? DownloadFile) ?.let {
val fullUrl = "${urlsKeeper.fileBaseUrl}/${it.filePath}"
return handleSafely {
@Suppress("UNCHECKED_CAST")
client.get<ByteArray>(fullUrl) as T // always ByteArray
}
}
}
@@ -1,24 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.bot
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request
import io.ktor.utils.io.core.Closeable
/**
* Interface for making requests to Telegram Bot API. Currently, there is only one built-in implementation -
* [com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor]
*
* @see Request
* @see com.github.insanusmokrassar.TelegramBotAPI.bot.Ktor.KtorRequestsExecutor
*/
interface RequestsExecutor : Closeable {
/**
* Unsafe execution of incoming [request]. Can throw almost any exception. So, it is better to use
* something like [com.github.insanusmokrassar.TelegramBotAPI.extensions.utils.shortcuts.executeAsync] or
* [com.github.insanusmokrassar.TelegramBotAPI.extensions.utils.shortcuts.executeUnsafe]
*
* @throws Exception
*/
suspend fun <T : Any> execute(request: Request<T>): T
}
typealias TelegramBot = RequestsExecutor
@@ -1,47 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions
import com.github.insanusmokrassar.TelegramBotAPI.types.Response
import io.ktor.utils.io.errors.IOException
fun newRequestException(
response: Response,
plainAnswer: String,
message: String? = null,
cause: Throwable? = null
) = response.description ?.let { description ->
when {
description == "Bad Request: reply message not found" -> ReplyMessageNotFoundException(response, plainAnswer, message, cause)
description == "Bad Request: message to edit not found" -> MessageToEditNotFoundException(response, plainAnswer, message, cause)
description.contains("Bad Request: message is not modified") -> MessageIsNotModifiedException(response, plainAnswer, message, cause)
description == "Unauthorized" -> UnauthorizedException(response, plainAnswer, message, cause)
description.contains("PHOTO_INVALID_DIMENSIONS") -> InvalidPhotoDimensionsException(response, plainAnswer, message, cause)
else -> null
}
} ?: CommonRequestException(response, plainAnswer, message, cause)
sealed class RequestException constructor(
val response: Response,
val plainAnswer: String,
message: String? = null,
override val cause: Throwable? = null
) : IOException(
message ?: "Something went wrong"
)
class CommonRequestException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
RequestException(response, plainAnswer, message, cause)
class UnauthorizedException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
RequestException(response, plainAnswer, message, cause)
class ReplyMessageNotFoundException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
RequestException(response, plainAnswer, message, cause)
class MessageIsNotModifiedException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
RequestException(response, plainAnswer, message, cause)
class MessageToEditNotFoundException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
RequestException(response, plainAnswer, message, cause)
class InvalidPhotoDimensionsException(response: Response, plainAnswer: String, message: String?, cause: Throwable?) :
RequestException(response, plainAnswer, message, cause)
@@ -1,67 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.bot.settings.limiters
import com.soywiz.klock.DateTime
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.Channel
private fun now(): Long = DateTime.nowUnixLong()
class CommonLimiter(
private val lockCount: Int = 10,
private val regenTime: Long = 20 * 1000L // 20 seconds for full regen of opportunity to send message
) : RequestLimiter {
private var doLimit: Boolean = false
private val counterChannel = Channel<Unit>(Channel.UNLIMITED)
private val scope = CoroutineScope(Dispatchers.Default)
private val counterJob = scope.launch {
var wasLastSecond = 0
var lastCountTime = now()
var limitManagementJob: Job? = null
var removeLimitTime: Long = lastCountTime
for (counter in counterChannel) {
val now = now()
if (now - lastCountTime > 1000) {
lastCountTime = now
wasLastSecond = 1
} else {
wasLastSecond++
}
if (wasLastSecond >= lockCount) {
removeLimitTime = now + regenTime
if (limitManagementJob == null) {
limitManagementJob = launch {
doLimit = true
var internalNow = now()
while (internalNow < removeLimitTime) {
delay(removeLimitTime - internalNow)
internalNow = now()
}
doLimit = false
}
}
}
if (now > removeLimitTime) {
limitManagementJob = null
}
}
}
private val quoterChannel = Channel<Unit>(Channel.CONFLATED)
private val tickerJob = scope.launch {
while (isActive) {
quoterChannel.send(Unit)
delay(1000L)
}
}
override suspend fun <T> limit(block: suspend () -> T): T {
counterChannel.send(Unit)
return if (!doLimit) {
block()
} else {
quoterChannel.receive()
block()
}
}
}
@@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.bot.settings.limiters
object EmptyLimiter : RequestLimiter {
override suspend fun <T> limit(block: suspend () -> T): T = block()
}
@@ -1,70 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.bot.settings.limiters
import kotlinx.coroutines.*
import kotlinx.coroutines.channels.Channel
import kotlinx.serialization.Serializable
import kotlinx.serialization.Transient
import kotlin.coroutines.*
import kotlin.math.pow
private sealed class RequestEvent
private class AddRequest(
val continuation: Continuation<Long>
) : RequestEvent()
private object CompleteRequest : RequestEvent()
@Serializable
data class PowLimiter(
private val minAwaitTime: Long = 0L,
private val maxAwaitTime: Long = 10000L,
private val powValue: Double = 4.0,
private val powK: Double = 0.0016
) : RequestLimiter {
@Transient
private val scope = CoroutineScope(Dispatchers.Default)
@Transient
private val eventsChannel = Channel<RequestEvent>(Channel.UNLIMITED)
@Transient
private val awaitTimeRange = minAwaitTime .. maxAwaitTime
init {
scope.launch {
var requestsInWork: Double = 0.0
for (event in eventsChannel) {
when (event) {
is AddRequest -> {
val awaitTime = (((requestsInWork.pow(powValue) * powK) * 1000L).toLong())
requestsInWork++
event.continuation.resume(
if (awaitTime in awaitTimeRange) {
awaitTime
} else {
if (awaitTime < minAwaitTime) {
minAwaitTime
} else {
maxAwaitTime
}
}
)
}
is CompleteRequest -> requestsInWork--
}
}
}
}
override suspend fun <T> limit(
block: suspend () -> T
): T {
val delayMillis = suspendCoroutine<Long> {
scope.launch { eventsChannel.send(AddRequest(it)) }
}
delay(delayMillis)
return try {
block()
} finally {
eventsChannel.send(CompleteRequest)
}
}
}
@@ -1,32 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.MessageAction
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.PossiblyForwardedMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import kotlinx.serialization.*
private val AbleToBeForwardedMessageDeserializer = TelegramBotAPIMessageDeserializationStrategyClass<PossiblyForwardedMessage>()
@Serializable
data class ForwardMessage(
@SerialName(fromChatIdField)
val fromChatId: ChatIdentifier,
@SerialName(chatIdField)
val toChatId: ChatIdentifier,
@SerialName(messageIdField)
override val messageId: MessageIdentifier,
@SerialName(disableNotificationField)
val disableNotification: Boolean = false
): SimpleRequest<PossiblyForwardedMessage>, MessageAction {
override val chatId: ChatIdentifier
get() = fromChatId
override fun method(): String = "forwardMessage"
override val resultDeserializer: DeserializationStrategy<PossiblyForwardedMessage>
get() = AbleToBeForwardedMessageDeserializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,25 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.MessageAction
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ReplyMarkup
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.polls.Poll
import kotlinx.serialization.*
@Serializable
data class StopPoll(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(messageIdField)
override val messageId: MessageIdentifier,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : MessageAction, SimpleRequest<Poll>, ReplyMarkup {
override fun method(): String = "stopPoll"
override val resultDeserializer: DeserializationStrategy<Poll>
get() = Poll.serializer()
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,50 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.toInputMediaFileAttachmentName
import com.github.insanusmokrassar.TelegramBotAPI.utils.StorageFile
import kotlinx.serialization.*
import kotlinx.serialization.descriptors.*
import kotlinx.serialization.encoding.Decoder
import kotlinx.serialization.encoding.Encoder
@Serializable(InputFileSerializer::class)
sealed class InputFile {
abstract val fileId: String
}
// TODO:: add checks for file url/file id regex
/**
* Contains file id or file url
*/
@Serializable(InputFileSerializer::class)
data class FileId(
override val fileId: String
) : InputFile()
fun String.toInputFile() = FileId(this)
@Serializer(InputFile::class)
internal object InputFileSerializer : KSerializer<InputFile> {
override val descriptor: SerialDescriptor = PrimitiveSerialDescriptor(FileId::class.toString(), PrimitiveKind.STRING)
override fun serialize(encoder: Encoder, value: InputFile) = encoder.encodeString(value.fileId)
override fun deserialize(decoder: Decoder): FileId = FileId(decoder.decodeString())
}
internal val InputFile.asMediaData: String
get() = when (this) {
is FileId -> fileId
is MultipartFile -> fileId.toInputMediaFileAttachmentName()
}
// TODO:: add checks for files size
/**
* Contains info about file for sending
*/
@Serializable(InputFileSerializer::class)
data class MultipartFile (
val file: StorageFile,
val mimeType: String = file.storageFileInfo.contentType,
val filename: String = file.storageFileInfo.fileName
) : InputFile() {
override val fileId: String = file.storageFileInfo.generateCustomName()
}
@@ -1,17 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.bot
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.BotCommand
import kotlinx.serialization.*
import kotlinx.serialization.builtins.ListSerializer
private val getMyCommandsSerializer = ListSerializer(BotCommand.serializer())
@Serializable
object GetMyCommands : SimpleRequest<List<BotCommand>> {
override fun method(): String = "getMyCommands"
override val resultDeserializer: DeserializationStrategy<List<BotCommand>>
get() = getMyCommandsSerializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,24 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.bot
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import kotlinx.serialization.*
import kotlinx.serialization.builtins.serializer
@Serializable
class SetMyCommands(
@SerialName(botCommandsField)
val commands: List<BotCommand>
) : SimpleRequest<Boolean> {
override fun method(): String = "setMyCommands"
override val resultDeserializer: DeserializationStrategy<Boolean>
get() = Boolean.serializer()
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
init {
if (commands.size !in botCommandsLimit) {
error("Bot commands list size able to be in range $botCommandsLimit, but incoming size is ${commands.size}")
}
}
}
@@ -1,9 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.UserId
interface ChatMemberRequest<T: Any> : ChatRequest, SimpleRequest<T> {
val userId: UserId
}
@@ -1,21 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ExtendedChatSerializer
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.extended.ExtendedChat
import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField
import kotlinx.serialization.*
@Serializable
data class GetChat(
@SerialName(chatIdField)
override val chatId: ChatIdentifier
): ChatRequest, SimpleRequest<ExtendedChat> {
override fun method(): String = "getChat"
override val resultDeserializer: DeserializationStrategy<ExtendedChat>
get() = ExtendedChatSerializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,26 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.AdministratorChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.AdministratorChatMemberSerializerWithoutDeserialization
import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField
import kotlinx.serialization.*
import kotlinx.serialization.builtins.ListSerializer
private val chatMembersListSerializer = ListSerializer(
AdministratorChatMemberSerializerWithoutDeserialization
)
@Serializable
data class GetChatAdministrators(
@SerialName(chatIdField)
override val chatId: ChatIdentifier
): ChatRequest, SimpleRequest<List<AdministratorChatMember>> {
override fun method(): String = "getChatAdministrators"
override val resultDeserializer: DeserializationStrategy<List<AdministratorChatMember>>
get() = chatMembersListSerializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,20 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chatIdField
import kotlinx.serialization.*
import kotlinx.serialization.builtins.serializer
@Serializable
data class GetChatMembersCount(
@SerialName(chatIdField)
override val chatId: ChatIdentifier
): ChatRequest, SimpleRequest<Int> {
override fun method(): String = "getChatMembersCount"
override val resultDeserializer: DeserializationStrategy<Int>
get() = Int.serializer()
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,21 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.abstracts.ChatMemberRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.ChatMemberDeserializationStrategy
import kotlinx.serialization.*
@Serializable
data class GetChatMember(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(userIdField)
override val userId: UserId
) : ChatMemberRequest<ChatMember> {
override fun method(): String = "getChatMember"
override val resultDeserializer: DeserializationStrategy<ChatMember>
get() = ChatMemberDeserializationStrategy
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,31 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.LocationContent
import kotlinx.serialization.*
private val commonResultDeserializer = TelegramBotAPIMessageDeserializationStrategyClass<ContentMessage<LocationContent>>()
@Serializable
data class EditChatMessageLiveLocation(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(messageIdField)
override val messageId: MessageIdentifier,
@SerialName(latitudeField)
override val latitude: Double,
@SerialName(longitudeField)
override val longitude: Double,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditChatMessage<LocationContent>, EditReplyMessage, EditLocationMessage {
override fun method(): String = "editMessageLiveLocation"
override val resultDeserializer: DeserializationStrategy<ContentMessage<LocationContent>>
get() = commonResultDeserializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,22 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import kotlinx.serialization.*
@Serializable
data class EditInlineMessageLiveLocation(
@SerialName(inlineMessageIdField)
override val inlineMessageId: InlineMessageIdentifier,
@SerialName(latitudeField)
override val latitude: Double,
@SerialName(longitudeField)
override val longitude: Double,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditInlineMessage, EditReplyMessage, EditLocationMessage {
override fun method(): String = "editMessageLiveLocation"
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,28 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.EditChatMessage
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.EditReplyMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.LocationContent
import kotlinx.serialization.*
private val commonResultDeserializer = TelegramBotAPIMessageDeserializationStrategyClass<ContentMessage<LocationContent>>()
@Serializable
data class StopChatMessageLiveLocation(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(messageIdField)
override val messageId: MessageIdentifier,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditChatMessage<LocationContent>, EditReplyMessage {
override fun method(): String = "stopMessageLiveLocation"
override val resultDeserializer: DeserializationStrategy<ContentMessage<LocationContent>>
get() = commonResultDeserializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,19 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.EditInlineMessage
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.EditReplyMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import kotlinx.serialization.*
@Serializable
data class StopInlineMessageLiveLocation(
@SerialName(inlineMessageIdField)
override val inlineMessageId: InlineMessageIdentifier,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditInlineMessage, EditReplyMessage {
override fun method(): String = "stopMessageLiveLocation"
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,8 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.MessageAction
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MessageContent
interface EditChatMessage<MT: MessageContent> : SimpleRequest<ContentMessage<MT>>, MessageAction
@@ -1,6 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts
interface EditLocationMessage {
val latitude: Double
val longitude: Double
}
@@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.InputMedia
interface EditMediaMessage {
val media: InputMedia
}
@@ -1,8 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ReplyMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
interface EditReplyMessage : ReplyMarkup {
override val replyMarkup: InlineKeyboardMarkup?
}
@@ -1,8 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
interface EditTextChatMessage {
val text: String
val parseMode: ParseMode?
}
@@ -1,34 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.caption
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.media.MediaContentMessageResultDeserializer
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MediaContent
import kotlinx.serialization.*
const val editMessageCaptionMethod = "editMessageCaption"
@Serializable
data class EditChatMessageCaption(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(messageIdField)
override val messageId: MessageIdentifier,
@SerialName(captionField)
override val text: String,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditChatMessage<MediaContent>, EditTextChatMessage, EditReplyMessage {
override fun method(): String = editMessageCaptionMethod
override val resultDeserializer: DeserializationStrategy<ContentMessage<MediaContent>>
get() = MediaContentMessageResultDeserializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,24 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.caption
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import kotlinx.serialization.*
@Serializable
data class EditInlineMessageCaption(
@SerialName(inlineMessageIdField)
override val inlineMessageId: InlineMessageIdentifier,
@SerialName(captionField)
override val text: String,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditInlineMessage, EditTextChatMessage, EditReplyMessage {
override fun method(): String = editMessageCaptionMethod
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,36 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.text
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.TextContentMessageResultDeserializer
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.TextContent
import kotlinx.serialization.*
const val editMessageTextMethod = "editMessageText"
@Serializable
data class EditChatMessageText(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(messageIdField)
override val messageId: MessageIdentifier,
@SerialName(textField)
override val text: String,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(disableWebPagePreviewField)
override val disableWebPagePreview: Boolean? = null,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditChatMessage<TextContent>, EditTextChatMessage, EditReplyMessage, EditDisableWebPagePreviewMessage {
override fun method(): String = editMessageTextMethod
override val resultDeserializer: DeserializationStrategy<ContentMessage<TextContent>>
get() = TextContentMessageResultDeserializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,27 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.edit.text
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.media.editMessageMediaMethod
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import kotlinx.serialization.*
@Serializable
data class EditInlineMessageText(
@SerialName(inlineMessageIdField)
override val inlineMessageId: InlineMessageIdentifier,
@SerialName(textField)
override val text: String,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(disableWebPagePreviewField)
override val disableWebPagePreview: Boolean? = null,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : EditInlineMessage, EditTextChatMessage, EditReplyMessage, EditDisableWebPagePreviewMessage {
override fun method(): String = editMessageMediaMethod
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,46 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.LocationContent
import kotlinx.serialization.*
private val commonResultDeserializer: DeserializationStrategy<ContentMessage<LocationContent>>
= TelegramBotAPIMessageDeserializationStrategyClass()
@Serializable
data class SendLocation(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(latitudeField)
override val latitude: Double,
@SerialName(longitudeField)
override val longitude: Double,
@SerialName(livePeriodField)
val livePeriod: Long? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(replyToMessageIdField)
override val replyToMessageId: MessageIdentifier? = null,
@SerialName(replyMarkupField)
override val replyMarkup: KeyboardMarkup? = null
) : SendMessageRequest<ContentMessage<LocationContent>>,
ReplyingMarkupSendMessageRequest<ContentMessage<LocationContent>>,
PositionedSendMessageRequest<ContentMessage<LocationContent>>
{
override fun method(): String = "sendLocation"
override val resultDeserializer: DeserializationStrategy<ContentMessage<LocationContent>>
get() = commonResultDeserializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
init {
if (livePeriod != null && livePeriod !in livePeriodLimit) {
error("Live period for sending location must be in $livePeriodLimit, but was $livePeriod")
}
}
}
@@ -1,50 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.DisableWebPagePreview
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.TextContent
import com.github.insanusmokrassar.TelegramBotAPI.utils.throwRangeError
import kotlinx.serialization.*
internal val TextContentMessageResultDeserializer: DeserializationStrategy<ContentMessage<TextContent>>
= TelegramBotAPIMessageDeserializationStrategyClass()
@Serializable
data class SendTextMessage(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(textField)
override val text: String,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(disableWebPagePreviewField)
override val disableWebPagePreview: Boolean? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(replyToMessageIdField)
override val replyToMessageId: MessageIdentifier? = null,
@SerialName(replyMarkupField)
override val replyMarkup: KeyboardMarkup? = null
) : SendMessageRequest<ContentMessage<TextContent>>,
ReplyingMarkupSendMessageRequest<ContentMessage<TextContent>>,
TextableSendMessageRequest<ContentMessage<TextContent>>,
DisableWebPagePreview
{
init {
if (text.length !in textLength) {
throwRangeError("Text length", textLength, text.length)
}
}
override fun method(): String = "sendMessage"
override val resultDeserializer: DeserializationStrategy<ContentMessage<TextContent>>
get() = TextContentMessageResultDeserializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
@@ -1,76 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.VenueContent
import com.github.insanusmokrassar.TelegramBotAPI.types.venue.Venue
import kotlinx.serialization.*
private val commonResultDeserializer: DeserializationStrategy<ContentMessage<VenueContent>>
= TelegramBotAPIMessageDeserializationStrategyClass()
@Serializable
data class SendVenue(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(latitudeField)
override val latitude: Double,
@SerialName(longitudeField)
override val longitude: Double,
@SerialName(titleField)
override val title: String,
@SerialName(addressField)
val address: String,
@SerialName(foursquareIdField)
val foursquareId: String? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(replyToMessageIdField)
override val replyToMessageId: MessageIdentifier? = null,
@SerialName(replyMarkupField)
override val replyMarkup: KeyboardMarkup? = null
) : SendMessageRequest<ContentMessage<VenueContent>>,
PositionedSendMessageRequest<ContentMessage<VenueContent>>,
TitledSendMessageRequest<ContentMessage<VenueContent>>,
ReplyingMarkupSendMessageRequest<ContentMessage<VenueContent>>
{
constructor(
chatId: ChatIdentifier,
venue: Venue,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): this(
chatId,
venue.location.latitude,
venue.location.longitude,
venue.title,
venue.address,
venue.foursquareId,
disableNotification,
replyToMessageId,
replyMarkup
)
override fun method(): String = "sendVenue"
override val resultDeserializer: DeserializationStrategy<ContentMessage<VenueContent>>
get() = commonResultDeserializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
fun Venue.toRequest(
chatId: ChatIdentifier,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): SendVenue = SendVenue(
chatId,
this,
disableNotification,
replyToMessageId,
replyMarkup
)
@@ -1,6 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts
interface PositionedSendMessageRequest<T: Any>: SendMessageRequest<T> {
val latitude: Double
val longitude: Double
}
@@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ReplyMarkup
interface ReplyingMarkupSendMessageRequest<T: Any>: SendMessageRequest<T>, ReplyMarkup
@@ -1,6 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ChatRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
interface SendChatMessageRequest<T: Any> : SimpleRequest<T>, ChatRequest
@@ -1,6 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.DisableNotification
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.ReplyMessageId
interface SendMessageRequest<T: Any> : SendChatMessageRequest<T>, ReplyMessageId, DisableNotification
@@ -1,8 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
interface TextableSendMessageRequest<T: Any>: SendMessageRequest<T> {
val text: String?
val parseMode: ParseMode?
}
@@ -1,117 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.media
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.Performerable
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.*
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.media.AudioContent
import com.github.insanusmokrassar.TelegramBotAPI.utils.mapOfNotNull
import com.github.insanusmokrassar.TelegramBotAPI.utils.throwRangeError
import kotlinx.serialization.*
fun SendAudio(
chatId: ChatIdentifier,
audio: InputFile,
thumb: InputFile? = null,
caption: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
performer: String? = null,
title: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): Request<ContentMessage<AudioContent>> {
val audioAsFileId = (audio as? FileId) ?.fileId
val audioAsFile = audio as? MultipartFile
val thumbAsFileId = (thumb as? FileId) ?.fileId
val thumbAsFile = thumb as? MultipartFile
val data = SendAudioData(
chatId,
audioAsFileId,
thumbAsFileId,
caption,
parseMode,
duration,
performer,
title,
disableNotification,
replyToMessageId,
replyMarkup
)
return if (audioAsFile == null && thumbAsFile == null) {
data
} else {
MultipartRequestImpl(
data,
SendAudioFiles(audioAsFile, thumbAsFile)
)
}
}
private val commonResultDeserializer: DeserializationStrategy<ContentMessage<AudioContent>>
= TelegramBotAPIMessageDeserializationStrategyClass()
@Serializable
data class SendAudioData internal constructor(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(audioField)
val audio: String? = null,
@SerialName(thumbField)
override val thumb: String? = null,
@SerialName(captionField)
override val text: String? = null,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(durationField)
override val duration: Long? = null,
@SerialName(performerField)
override val performer: String? = null,
@SerialName(titleField)
override val title: String? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(replyToMessageIdField)
override val replyToMessageId: MessageIdentifier? = null,
@SerialName(replyMarkupField)
override val replyMarkup: KeyboardMarkup? = null
) : DataRequest<ContentMessage<AudioContent>>,
SendMessageRequest<ContentMessage<AudioContent>>,
ReplyingMarkupSendMessageRequest<ContentMessage<AudioContent>>,
TextableSendMessageRequest<ContentMessage<AudioContent>>,
ThumbedSendMessageRequest<ContentMessage<AudioContent>>,
TitledSendMessageRequest<ContentMessage<AudioContent>>,
DuratedSendMessageRequest<ContentMessage<AudioContent>>,
Performerable
{
init {
text ?.let {
if (it.length !in captionLength) {
throwRangeError("Caption length", captionLength, it.length)
}
}
}
override fun method(): String = "sendAudio"
override val resultDeserializer: DeserializationStrategy<ContentMessage<AudioContent>>
get() = commonResultDeserializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
data class SendAudioFiles internal constructor(
val audio: MultipartFile? = null,
val thumb: MultipartFile? = null
) : Files by mapOfNotNull(
audioField to audio,
thumbField to thumb
)
@@ -1,101 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.media
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.*
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.media.DocumentContent
import com.github.insanusmokrassar.TelegramBotAPI.utils.mapOfNotNull
import com.github.insanusmokrassar.TelegramBotAPI.utils.throwRangeError
import kotlinx.serialization.*
fun SendDocument(
chatId: ChatIdentifier,
document: InputFile,
thumb: InputFile? = null,
caption: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): Request<ContentMessage<DocumentContent>> {
val documentAsFileId = (document as? FileId) ?.fileId
val documentAsFile = document as? MultipartFile
val thumbAsFileId = (thumb as? FileId) ?.fileId
val thumbAsFile = thumb as? MultipartFile
val data = SendDocumentData(
chatId,
documentAsFileId,
thumbAsFileId,
caption,
parseMode,
disableNotification,
replyToMessageId,
replyMarkup
)
return if (documentAsFile == null && thumbAsFile == null) {
data
} else {
MultipartRequestImpl(
data,
SendDocumentFiles(documentAsFile, thumbAsFile)
)
}
}
private val commonResultDeserializer: DeserializationStrategy<ContentMessage<DocumentContent>>
= TelegramBotAPIMessageDeserializationStrategyClass()
@Serializable
data class SendDocumentData internal constructor(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(documentField)
val document: String? = null,
@SerialName(thumbField)
override val thumb: String? = null,
@SerialName(captionField)
override val text: String? = null,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(replyToMessageIdField)
override val replyToMessageId: MessageIdentifier? = null,
@SerialName(replyMarkupField)
override val replyMarkup: KeyboardMarkup? = null
) : DataRequest<ContentMessage<DocumentContent>>,
SendMessageRequest<ContentMessage<DocumentContent>>,
ReplyingMarkupSendMessageRequest<ContentMessage<DocumentContent>>,
TextableSendMessageRequest<ContentMessage<DocumentContent>>,
ThumbedSendMessageRequest<ContentMessage<DocumentContent>>
{
init {
text ?.let {
if (it.length !in captionLength) {
throwRangeError("Caption length", captionLength, it.length)
}
}
}
override fun method(): String = "sendDocument"
override val resultDeserializer: DeserializationStrategy<ContentMessage<DocumentContent>>
get() = commonResultDeserializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
data class SendDocumentFiles internal constructor(
val document: MultipartFile? = null,
val thumb: MultipartFile? = null
) : Files by mapOfNotNull(
documentField to document,
thumbField to thumb
)
@@ -1,86 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.media
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.Request
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.SendMessageRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.*
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.*
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.MediaGroupMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializeOnlySerializerClass
import com.github.insanusmokrassar.TelegramBotAPI.utils.throwRangeError
import com.github.insanusmokrassar.TelegramBotAPI.utils.toJsonWithoutNulls
import kotlinx.serialization.*
import kotlinx.serialization.builtins.ListSerializer
import kotlinx.serialization.json.buildJsonArray
fun SendMediaGroup(
chatId: ChatIdentifier,
media: List<MediaGroupMemberInputMedia>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null
): Request<List<MediaGroupMessage>> {
if (media.size !in mediaCountInMediaGroup) {
throwRangeError("Count of members in media group", mediaCountInMediaGroup, media.size)
}
val files: List<MultipartFile> = media.flatMap {
listOfNotNull(
it.file as? MultipartFile,
if (it is ThumbedInputMedia) {
it.thumb as? MultipartFile
} else {
null
}
)
}
val data = SendMediaGroupData(
chatId,
media,
disableNotification,
replyToMessageId
)
return if (files.isEmpty()) {
data
} else {
MultipartRequestImpl(
data,
SendMediaGroupFiles(files)
)
}
}
private val messagesListSerializer: KSerializer<List<MediaGroupMessage>>
= ListSerializer(TelegramBotAPIMessageDeserializeOnlySerializerClass())
@Serializable
data class SendMediaGroupData internal constructor(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
val media: List<MediaGroupMemberInputMedia> = emptyList(),
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(replyToMessageIdField)
override val replyToMessageId: MessageIdentifier? = null
) : DataRequest<List<MediaGroupMessage>>, SendMessageRequest<List<MediaGroupMessage>> {
@SerialName(mediaField)
private val convertedMedia: String
get() = buildJsonArray {
media.forEach {
add(it.toJsonWithoutNulls(MediaGroupMemberInputMediaSerializer))
}
}.toString()
override fun method(): String = "sendMediaGroup"
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
override val resultDeserializer: DeserializationStrategy<List<MediaGroupMessage>>
get() = messagesListSerializer
}
data class SendMediaGroupFiles internal constructor(
val files: List<MultipartFile>
) : Files by (files.map { it.fileId to it }.toMap())
@@ -1,85 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.media
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.*
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.media.PhotoContent
import com.github.insanusmokrassar.TelegramBotAPI.utils.throwRangeError
import kotlinx.serialization.*
fun SendPhoto(
chatId: ChatIdentifier,
photo: InputFile,
caption: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): Request<ContentMessage<PhotoContent>> {
val data = SendPhotoData(
chatId,
(photo as? FileId) ?.fileId,
caption,
parseMode,
disableNotification,
replyToMessageId,
replyMarkup
)
return data.photo ?.let {
data
} ?: MultipartRequestImpl(
data,
SendPhotoFiles(photo as MultipartFile)
)
}
private val commonResultDeserializer: DeserializationStrategy<ContentMessage<PhotoContent>>
= TelegramBotAPIMessageDeserializationStrategyClass()
@Serializable
data class SendPhotoData internal constructor(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(photoField)
val photo: String? = null,
@SerialName(captionField)
override val text: String? = null,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(replyToMessageIdField)
override val replyToMessageId: MessageIdentifier? = null,
@SerialName(replyMarkupField)
override val replyMarkup: KeyboardMarkup? = null
) : DataRequest<ContentMessage<PhotoContent>>,
SendMessageRequest<ContentMessage<PhotoContent>>,
ReplyingMarkupSendMessageRequest<ContentMessage<PhotoContent>>,
TextableSendMessageRequest<ContentMessage<PhotoContent>>
{
init {
text ?.let {
if (it.length !in captionLength) {
throwRangeError("Caption length", captionLength, it.length)
}
}
}
override fun method(): String = "sendPhoto"
override val resultDeserializer: DeserializationStrategy<ContentMessage<PhotoContent>>
get() = commonResultDeserializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
data class SendPhotoFiles internal constructor(
val photo: MultipartFile
) : Files by mapOf(
photoField to photo
)
@@ -1,106 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.media
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.*
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.parseModeField
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.media.VoiceContent
import com.github.insanusmokrassar.TelegramBotAPI.utils.mapOfNotNull
import com.github.insanusmokrassar.TelegramBotAPI.utils.throwRangeError
import kotlinx.serialization.*
fun SendVoice(
chatId: ChatIdentifier,
voice: InputFile,
thumb: InputFile? = null,
caption: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): Request<ContentMessage<VoiceContent>> {
val voiceAsFileId = (voice as? FileId) ?.fileId
val voiceAsFile = voice as? MultipartFile
val thumbAsFileId = (thumb as? FileId) ?.fileId
val thumbAsFile = thumb as? MultipartFile
val data = SendVoiceData(
chatId,
voiceAsFileId,
thumbAsFileId,
caption,
parseMode,
duration,
disableNotification,
replyToMessageId,
replyMarkup
)
return if (voiceAsFile == null && thumbAsFile == null) {
data
} else {
MultipartRequestImpl(
data,
SendVoiceFiles(voiceAsFile, thumbAsFile)
)
}
}
private val commonResultDeserializer: DeserializationStrategy<ContentMessage<VoiceContent>>
= TelegramBotAPIMessageDeserializationStrategyClass()
@Serializable
data class SendVoiceData internal constructor(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(voiceField)
val voice: String? = null,
@SerialName(thumbField)
override val thumb: String? = null,
@SerialName(captionField)
override val text: String? = null,
@SerialName(parseModeField)
override val parseMode: ParseMode? = null,
@SerialName(durationField)
override val duration: Long? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(replyToMessageIdField)
override val replyToMessageId: MessageIdentifier? = null,
@SerialName(replyMarkupField)
override val replyMarkup: KeyboardMarkup? = null
) : DataRequest<ContentMessage<VoiceContent>>,
SendMessageRequest<ContentMessage<VoiceContent>>,
ReplyingMarkupSendMessageRequest<ContentMessage<VoiceContent>>,
TextableSendMessageRequest<ContentMessage<VoiceContent>>,
ThumbedSendMessageRequest<ContentMessage<VoiceContent>>,
DuratedSendMessageRequest<ContentMessage<VoiceContent>>
{
init {
text ?.let {
if (it.length !in captionLength) {
throwRangeError("Caption length", captionLength, it.length)
}
}
}
override fun method(): String = "sendVoice"
override val resultDeserializer: DeserializationStrategy<ContentMessage<VoiceContent>>
get() = commonResultDeserializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
}
data class SendVoiceFiles internal constructor(
val voice: MultipartFile? = null,
val thumb: MultipartFile? = null
) : Files by mapOfNotNull(
voiceField to voice,
thumbField to thumb
)
@@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.SimpleRequest
interface DataRequest<T: Any> : SimpleRequest<T>
@@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
typealias Files = Map<String, MultipartFile>
@@ -1,107 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.payments
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.SendMessageRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import com.github.insanusmokrassar.TelegramBotAPI.types.message.payments.InvoiceContent
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.LabeledPrice
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.LabeledPricesSerializer
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.abstracts.*
import kotlinx.serialization.*
private val invoiceMessageSerializer: DeserializationStrategy<ContentMessage<InvoiceContent>>
= TelegramBotAPIMessageDeserializationStrategyClass()
/**
* @param providerData - JSON-ENCODED FIELD
*/
@Serializable
data class SendInvoice(
@SerialName(chatIdField)
override val chatId: ChatId,
@SerialName(titleField)
val title: String,
@SerialName(descriptionField)
val description: String,
@SerialName(payloadField)
val payload: String,
@SerialName(providerTokenField)
val providerToken: String,
@SerialName(startParameterField)
val startParameter: StartParameter,
@SerialName(currencyField)
override val currency: Currency,
@Serializable(LabeledPricesSerializer::class)
@SerialName(pricesField)
override val prices: List<LabeledPrice>,
@SerialName(providerDataField)
val providerData: String? = null,
@SerialName(requireNameField)
val requireName: Boolean = false,
@SerialName(requirePhoneNumberField)
val requirePhoneNumber: Boolean = false,
@SerialName(requireEmailField)
val requireEmail: Boolean = false,
@SerialName(requireShippingAddressField)
val requireShippingAddress: Boolean = false,
@SerialName(shouldSendPhoneNumberToProviderField)
val shouldSendPhoneNumberToProvider: Boolean = false,
@SerialName(shouldSendEmailToProviderField)
val shouldSendEmailToProvider: Boolean = false,
@SerialName(priceDependOnShipAddressField)
val priceDependOnShipAddress: Boolean = false,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(replyToMessageIdField)
override val replyToMessageId: MessageIdentifier? = null,
@SerialName(replyMarkupField)
override val replyMarkup: InlineKeyboardMarkup? = null
) : Currencied,
Priced,
ChatRequest,
DisableNotification,
ReplyMessageId,
ReplyMarkup,
SendMessageRequest<ContentMessage<InvoiceContent>> {
override fun method(): String = "sendInvoice"
override val resultDeserializer: DeserializationStrategy<ContentMessage<InvoiceContent>>
get() = invoiceMessageSerializer
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
@SerialName(photoUrlField)
var photoUrl: String? = null
private set
@SerialName(photoSizeField)
var photoSize: Long? = null
private set
@SerialName(photoWidthField)
var photoWidth: Int? = null
private set
@SerialName(photoHeightField)
var photoHeight: Int? = null
private set
fun setPhoto(
photoUrl: String,
photoSize: Long? = null,
photoWidth: Int? = null,
photoHeight: Int? = null
) {
this.photoUrl = photoUrl
this.photoSize = photoSize
this.photoWidth = photoWidth
this.photoHeight = photoHeight
}
fun unsetPhoto() {
photoUrl = null
photoSize = null
photoWidth = null
photoHeight = null
}
}
@@ -1,241 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.send.polls
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.ReplyingMarkupSendMessageRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.abstracts.SendMessageRequest
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.MarkdownV2
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.TelegramBotAPIMessageDeserializationStrategyClass
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.PollContent
import com.github.insanusmokrassar.TelegramBotAPI.types.polls.*
import com.github.insanusmokrassar.TelegramBotAPI.utils.fullListOfSubSource
import com.github.insanusmokrassar.TelegramBotAPI.utils.toMarkdownV2Captions
import com.soywiz.klock.DateTime
import kotlinx.serialization.*
private val commonResultDeserializer: DeserializationStrategy<ContentMessage<PollContent>> = TelegramBotAPIMessageDeserializationStrategyClass()
private fun checkPollInfo(
question: String,
options: List<String>
) {
if (question.length !in pollQuestionTextLength) {
throw IllegalArgumentException("The length of questions for polls must be in $pollQuestionTextLength range, but was ${question.length}")
}
options.forEach {
if (it.length !in pollOptionTextLength) {
throw IllegalArgumentException("The length of question option text for polls must be in $pollOptionTextLength range, but was ${it.length}")
}
}
if (options.size !in pollOptionsLimit) {
throw IllegalArgumentException("The amount of question options for polls must be in $pollOptionsLimit range, but was ${options.size}")
}
}
fun SendPoll(
chatId: ChatIdentifier,
question: String,
options: List<String>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = SendRegularPoll(
chatId,
question,
options,
isAnonymous,
isClosed,
disableNotification = disableNotification,
replyToMessageId = replyToMessageId,
replyMarkup = replyMarkup
)
/**
* @return [SendPoll] in case when all is right. It can return [SendRegularPoll] for [QuizPoll] in case if
* [QuizPoll.correctOptionId] equal to null
*/
fun Poll.createRequest(
chatId: ChatIdentifier,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = when (this) {
is RegularPoll -> SendRegularPoll(
chatId,
question,
options.map { it.text },
isAnonymous,
isClosed,
allowMultipleAnswers,
scheduledCloseInfo,
disableNotification,
replyToMessageId,
replyMarkup
)
is QuizPoll -> correctOptionId ?.let { correctOptionId ->
SendQuizPoll(
chatId,
question,
options.map { it.text },
correctOptionId,
isAnonymous,
isClosed,
explanation ?.fullListOfSubSource(explanationEntities) ?.justTextSources() ?.toMarkdownV2Captions() ?.firstOrNull(),
MarkdownV2,
scheduledCloseInfo,
disableNotification,
replyToMessageId,
replyMarkup
)
} ?: SendRegularPoll(
chatId,
question,
options.map { it.text },
isAnonymous,
isClosed,
false,
scheduledCloseInfo,
disableNotification,
replyToMessageId,
replyMarkup
)
is UnknownPollType -> SendRegularPoll(
chatId,
question,
options.map { it.text },
isAnonymous,
isClosed,
false,
scheduledCloseInfo,
disableNotification,
replyToMessageId,
replyMarkup
)
}
private fun ScheduledCloseInfo.checkSendData() {
val span = when (this) {
is ExactScheduledCloseInfo -> (closeDateTime - DateTime.now()).seconds
is ApproximateScheduledCloseInfo -> openDuration.seconds
}.toInt()
if (span !in openPeriodPollSecondsLimit) {
error("Duration of autoclose for polls must be in range $openPeriodPollSecondsLimit, but was $span")
}
}
sealed class SendPoll : SendMessageRequest<ContentMessage<PollContent>>,
ReplyingMarkupSendMessageRequest<ContentMessage<PollContent>> {
abstract val question: String
abstract val options: List<String>
abstract val isAnonymous: Boolean
abstract val isClosed: Boolean
abstract val closeInfo: ScheduledCloseInfo?
abstract val type: String
internal abstract val openPeriod: LongSeconds?
internal abstract val closeDate: LongSeconds?
override fun method(): String = "sendPoll"
override val resultDeserializer: DeserializationStrategy<ContentMessage<PollContent>>
get() = commonResultDeserializer
}
@Serializable
data class SendRegularPoll(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(questionField)
override val question: String,
@SerialName(optionsField)
override val options: List<String>,
@SerialName(isAnonymousField)
override val isAnonymous: Boolean = true,
@SerialName(isClosedField)
override val isClosed: Boolean = false,
@SerialName(allowsMultipleAnswersField)
val allowMultipleAnswers: Boolean = false,
@Transient
override val closeInfo: ScheduledCloseInfo? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(replyToMessageIdField)
override val replyToMessageId: MessageIdentifier? = null,
@SerialName(replyMarkupField)
override val replyMarkup: KeyboardMarkup? = null
) : SendPoll() {
override val type: String = regularPollType
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
@SerialName(openPeriodField)
override val openPeriod: LongSeconds?
= (closeInfo as? ApproximateScheduledCloseInfo) ?.openDuration ?.millisecondsLong ?.div(1000)
@SerialName(closeDateField)
override val closeDate: LongSeconds?
= (closeInfo as? ExactScheduledCloseInfo) ?.closeDateTime ?.unixMillisLong ?.div(1000)
init {
checkPollInfo(question, options)
closeInfo ?.checkSendData()
}
}
@Serializable
data class SendQuizPoll(
@SerialName(chatIdField)
override val chatId: ChatIdentifier,
@SerialName(questionField)
override val question: String,
@SerialName(optionsField)
override val options: List<String>,
@SerialName(correctOptionIdField)
val correctOptionId: Int,
@SerialName(isAnonymousField)
override val isAnonymous: Boolean = true,
@SerialName(isClosedField)
override val isClosed: Boolean = false,
@SerialName(explanationField)
override val explanation: String? = null,
@SerialName(explanationParseModeField)
override val parseMode: ParseMode? = null,
@Transient
override val closeInfo: ScheduledCloseInfo? = null,
@SerialName(disableNotificationField)
override val disableNotification: Boolean = false,
@SerialName(replyToMessageIdField)
override val replyToMessageId: MessageIdentifier? = null,
@SerialName(replyMarkupField)
override val replyMarkup: KeyboardMarkup? = null
) : SendPoll(), ExplainedOutput {
override val type: String = quizPollType
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
@SerialName(openPeriodField)
override val openPeriod: LongSeconds?
= (closeInfo as? ApproximateScheduledCloseInfo) ?.openDuration ?.millisecondsLong ?.div(1000)
@SerialName(closeDateField)
override val closeDate: LongSeconds?
= (closeInfo as? ExactScheduledCloseInfo) ?.closeDateTime ?.unixMillisLong ?.div(1000)
init {
checkPollInfo(question, options)
closeInfo ?.checkSendData()
val correctOptionIdRange = 0 .. options.size
if (correctOptionId !in correctOptionIdRange) {
throw IllegalArgumentException("Correct option id must be in range of $correctOptionIdRange, but actual " +
"value is $correctOptionId")
}
if (explanation != null && explanation.length !in explanationLimit) {
error("Quiz poll explanation size must be in range $explanationLimit," +
"but actual explanation contains ${explanation.length} symbols")
}
}
}
@@ -1,53 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.stickers
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.common.CommonMultipartFileRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.abstracts.StandardStickerSetAction
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.MaskPosition
import kotlinx.serialization.*
fun CreateNewAnimatedStickerSet(
userId: UserId,
name: String,
sticker: InputFile,
emojis: String,
containsMasks: Boolean? = null,
maskPosition: MaskPosition? = null
): Request<Boolean> {
val data = CreateNewAnimatedStickerSet(userId, name, emojis, sticker as? FileId, containsMasks, maskPosition)
return when (sticker) {
is MultipartFile -> CommonMultipartFileRequest(
data,
mapOf(pngStickerField to sticker)
)
is FileId -> data
}
}
@Serializable
data class CreateNewAnimatedStickerSet internal constructor(
@SerialName(userIdField)
override val userId: UserId,
@SerialName(nameField)
override val name: String,
@SerialName(emojisField)
override val emojis: String,
@SerialName(tgsStickerField)
val sticker: FileId? = null,
@SerialName(containsMasksField)
val containsMasks: Boolean? = null,
@SerialName(maskPositionField)
override val maskPosition: MaskPosition? = null
) : StandardStickerSetAction {
init {
if(emojis.isEmpty()) {
throw IllegalArgumentException("Emojis must not be empty")
}
}
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
override fun method(): String = "createNewStickerSet"
}
@@ -1,62 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.stickers
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.common.CommonMultipartFileRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.abstracts.StandardStickerSetAction
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.MaskPosition
import kotlinx.serialization.*
fun CreateNewStaticStickerSet(
userId: UserId,
name: String,
sticker: InputFile,
emojis: String,
containsMasks: Boolean? = null,
maskPosition: MaskPosition? = null
): Request<Boolean> {
val data = CreateNewStaticStickerSet(userId, name, emojis, sticker as? FileId, containsMasks, maskPosition)
return when (sticker) {
is MultipartFile -> CommonMultipartFileRequest(
data,
mapOf(pngStickerField to sticker)
)
is FileId -> data
}
}
fun CreateNewStickerSet(
userId: UserId,
name: String,
sticker: InputFile,
emojis: String,
containsMasks: Boolean? = null,
maskPosition: MaskPosition? = null
): Request<Boolean> = CreateNewStaticStickerSet(userId, name, sticker, emojis, containsMasks, maskPosition)
@Serializable
data class CreateNewStaticStickerSet internal constructor(
@SerialName(userIdField)
override val userId: UserId,
@SerialName(nameField)
override val name: String,
@SerialName(emojisField)
override val emojis: String,
@SerialName(pngStickerField)
val sticker: FileId? = null,
@SerialName(containsMasksField)
val containsMasks: Boolean? = null,
@SerialName(maskPositionField)
override val maskPosition: MaskPosition? = null
) : StandardStickerSetAction {
init {
if(emojis.isEmpty()) {
throw IllegalArgumentException("Emojis must not be empty")
}
}
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
override fun method(): String = "createNewStickerSet"
}
@@ -1,8 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.abstracts
import com.github.insanusmokrassar.TelegramBotAPI.types.stickers.MaskPosition
interface StandardStickerSetAction : StickerSetAction {
val emojis: String // must be more than one
val maskPosition: MaskPosition?
}
@@ -1,89 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.requests.webhook
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.*
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.DataRequest
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.base.MultipartRequestImpl
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import kotlinx.serialization.*
import kotlinx.serialization.builtins.serializer
private fun correctWebhookUrl(sourceUrl: String) = if (sourceUrl.contains("://")) {
sourceUrl
} else {
"https://$sourceUrl"
}
fun SetWebhook(
url: String,
certificate: MultipartFile,
maxAllowedConnections: Int? = null,
allowedUpdates: List<String>? = null
): MultipartRequestImpl<SetWebhook, Map<String, MultipartFile>, Boolean> = MultipartRequestImpl(
SetWebhook(
correctWebhookUrl(url),
null,
maxAllowedConnections,
allowedUpdates
),
mapOf(certificateField to certificate)
)
fun SetWebhook(
url: String,
certificate: FileId,
maxAllowedConnections: Int? = null,
allowedUpdates: List<String>? = null
): SetWebhook = SetWebhook(
correctWebhookUrl(url),
certificate.fileId,
maxAllowedConnections,
allowedUpdates
)
@Suppress("USELESS_CAST")
fun SetWebhook(
url: String,
certificate: InputFile,
maxAllowedConnections: Int? = null,
allowedUpdates: List<String>? = null
): Request<Boolean> = when (certificate) {
is MultipartFile -> SetWebhook(correctWebhookUrl(url), certificate as MultipartFile, maxAllowedConnections, allowedUpdates)
is FileId -> SetWebhook(correctWebhookUrl(url), certificate as FileId, maxAllowedConnections, allowedUpdates)
}
fun SetWebhook(
url: String,
maxAllowedConnections: Int? = null,
allowedUpdates: List<String>? = null
) = SetWebhook(
correctWebhookUrl(url),
null,
maxAllowedConnections,
allowedUpdates
)
@Serializable
data class SetWebhook internal constructor(
@SerialName(urlField)
val url: String,
@SerialName(certificateField)
val certificateFile: String? = null,
@SerialName(maxAllowedConnectionsField)
val maxAllowedConnections: Int? = null,
@SerialName(allowedUpdatesField)
val allowedUpdates: List<String>? = null
) : DataRequest<Boolean> {
override fun method(): String = "setWebhook"
override val resultDeserializer: DeserializationStrategy<Boolean>
get() = Boolean.serializer()
override val requestSerializer: SerializationStrategy<*>
get() = serializer()
init {
maxAllowedConnections ?.let {
if (it !in allowedConnectionsLength) {
throw IllegalArgumentException("Allowed connection for webhook must be in $allowedConnectionsLength range (but passed $it)")
}
}
}
}
@@ -1,17 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQuery
import com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQueryIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.User
interface CallbackQuery {
val id: CallbackQueryIdentifier
val user: User
val chatInstance: String
}
data class UnknownCallbackQueryType(
override val id: CallbackQueryIdentifier,
override val user: User,
override val chatInstance: String,
val raw: String
) : CallbackQuery
@@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQuery
interface DataCallbackQuery : CallbackQuery {
val data: String
}
@@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQuery
interface GameShortNameCallbackQuery : CallbackQuery {
val gameShortName: String
}
@@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQuery
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
interface InlineMessageIdCallbackQuery : CallbackQuery {
val inlineMessageId: InlineMessageIdentifier
}
@@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQuery
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
interface MessageCallbackQuery : CallbackQuery {
val message: Message
}
@@ -1,13 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQuery
import com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQueryIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.User
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
data class MessageDataCallbackQuery(
override val id: CallbackQueryIdentifier,
override val user: User,
override val chatInstance: String,
override val message: Message,
override val data: String
) : DataCallbackQuery, MessageCallbackQuery
@@ -1,13 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQuery
import com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQueryIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.User
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
data class MessageGameShortNameCallbackQuery(
override val id: CallbackQueryIdentifier,
override val user: User,
override val chatInstance: String,
override val message: Message,
override val gameShortName: String
) : GameShortNameCallbackQuery, MessageCallbackQuery
@@ -1,18 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.AdministratorChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.User
data class AdministratorChatMemberImpl(
override val user: User,
override val canBeEdited: Boolean,
override val canChangeInfo: Boolean,
override val canPostMessages: Boolean,
override val canEditMessages: Boolean,
override val canRemoveMessages: Boolean,
override val canInviteUsers: Boolean,
override val canRestrictMembers: Boolean,
override val canPinMessages: Boolean,
override val canPromoteMembers: Boolean,
override val customTitle: String?
) : AdministratorChatMember
@@ -1,19 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.AdministratorChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.User
data class CreatorChatMember(
override val user: User,
override val customTitle: String?
) : AdministratorChatMember {
override val canBeEdited: Boolean = true
override val canChangeInfo: Boolean = true
override val canPostMessages: Boolean = true
override val canEditMessages: Boolean = true
override val canRemoveMessages: Boolean = true
override val canInviteUsers: Boolean = true
override val canRestrictMembers: Boolean = true
override val canPinMessages: Boolean = true
override val canPromoteMembers: Boolean = true
}
@@ -1,10 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.BannedChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.TelegramDate
import com.github.insanusmokrassar.TelegramBotAPI.types.User
data class KickedChatMember(
override val user: User,
override val untilDate: TelegramDate?
) : BannedChatMember
@@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.User
data class LeftChatMember(override val user: User) :
ChatMember
@@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.User
data class MemberChatMember(override val user: User) :
ChatMember
@@ -1,84 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.ChatMember
import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable
@Serializable
internal data class RawChatMember(
val user: User,
private val status: String,
private val until_date: TelegramDate? = null,
@SerialName(canBeEditedField)
private val canBeEdited: Boolean = false,
@SerialName(canChangeInfoField)
private val canChangeInfo: Boolean = false,
@SerialName(canPostMessagesField)
private val canPostMessages: Boolean = false,
@SerialName(canEditMessagesField)
private val canEditMessages: Boolean = false,
@SerialName(canDeleteMessagesField)
private val canDeleteMessages: Boolean = false,
@SerialName(canInviteUsersField)
private val canInviteUsers: Boolean = false,
@SerialName(canRestrictMembersField)
private val canRestrictMembers: Boolean = false,
@SerialName(canPinMessagesField)
private val canPinMessages: Boolean = false,
@SerialName(canPromoteMembersField)
private val canPromoteMembers: Boolean = false,
@SerialName(isMemberField)
private val isMember: Boolean = false,
@SerialName(canSendMessagesField)
private val canSendMessages: Boolean = false,
@SerialName(canSendMediaMessagesField)
private val canSendMediaMessages: Boolean = false,
@SerialName(canSendPollsField)
private val canSendPolls: Boolean = false,
@SerialName(canSendOtherMessagesField)
private val canSendOtherMessages: Boolean = false,
@SerialName(canAddWebPagePreviewsField)
private val canAddWebPagePreviews: Boolean = false,
@SerialName(customTitleField)
private val customTitle: String? = null
) {
val asChatMember: ChatMember by lazy {
when (status) {
"creator" -> CreatorChatMember(user, customTitle)
"administrator" -> AdministratorChatMemberImpl(
user,
canBeEdited,
canChangeInfo,
canPostMessages,
canEditMessages,
canDeleteMessages,
canInviteUsers,
canRestrictMembers,
canPinMessages,
canPromoteMembers,
customTitle
)
"member" -> MemberChatMember(user)
"restricted" -> RestrictedChatMember(
user,
until_date,
isMember,
canSendMessages,
canSendMediaMessages,
canSendPolls,
canSendOtherMessages,
canAddWebPagePreviews,
canChangeInfo,
canInviteUsers,
canPinMessages
)
"left" -> LeftChatMember(user)
"kicked" -> KickedChatMember(
user,
until_date
)
else -> throw IllegalStateException("Can't understand type of user: $status")
}
}
}
@@ -1,20 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.BannedChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts.SpecialRightsChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.TelegramDate
import com.github.insanusmokrassar.TelegramBotAPI.types.User
data class RestrictedChatMember(
override val user: User,
override val untilDate: TelegramDate?,
val isMember: Boolean,
val canSendMessages: Boolean,
val canSendMediaMessages: Boolean,
val canSendPolls: Boolean,
val canSendOtherMessages: Boolean,
val canAddWebpagePreviews: Boolean,
override val canChangeInfo: Boolean,
override val canInviteUsers: Boolean,
override val canPinMessages: Boolean
) : BannedChatMember, SpecialRightsChatMember
@@ -1,11 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.types.ChatMember.abstracts
interface AdministratorChatMember : SpecialRightsChatMember {
val canBeEdited: Boolean
val canPostMessages: Boolean
val canEditMessages: Boolean
val canRemoveMessages: Boolean
val canRestrictMembers: Boolean
val canPromoteMembers: Boolean
val customTitle: String?
}
Loaded 100 of 1369 files, more files were not shown because too many files have changed in this diff. Show more