1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2025-11-16 12:00:18 +00:00

Compare commits

..

784 Commits

Author SHA1 Message Date
2584839d66 update core readme 2021-04-29 19:02:51 +06:00
63946e860d note about UnknownExtendedChat 2021-04-29 17:45:19 +06:00
90df436c63 small refactor of usage TextedInput 2021-04-29 17:40:01 +06:00
d3c8b49b10 Update CHANGELOG.md 2021-04-29 17:33:27 +06:00
c1372b55bc Note about ChatType in CHANGRLOG 2021-04-29 15:26:08 +06:00
b6c7ece995 small hotfix 2021-04-29 15:09:45 +06:00
44e7c80f43 remove redundant extensions for parseCommandsWithParams 2021-04-29 15:08:05 +06:00
1e41e95333 fixes in parseCommandsWithParams 2021-04-29 15:07:16 +06:00
03d4d715c0 hotfix 2021-04-29 11:59:44 +06:00
ab060d02ea deprecate Explained 2021-04-29 11:59:44 +06:00
f447be02dc Update InlineKeyboardMarkup.kt 2021-04-29 01:18:07 +06:00
eb923a6338 fixes 2021-04-28 23:22:13 +06:00
0914710cc7 update voice chats 2021-04-28 20:08:02 +06:00
1f7450844f optimize imports 2021-04-28 19:59:30 +06:00
167c214e35 migration to avoid using of TextPart 2021-04-28 19:54:57 +06:00
42a8d649cd Update CHANGELOG.md 2021-04-27 23:43:04 +06:00
eb3f180cc6 textSources now is main property 2021-04-27 16:08:36 +06:00
70f96ac8fa completing of captioned input deprecation 2021-04-26 21:34:13 +06:00
d69b2e09d5 migration from CaptionedInput 2021-04-26 21:25:52 +06:00
946b0222df fix botaction tests 2021-04-26 21:10:38 +06:00
7da315dbaf fix botaction tests 2021-04-26 21:08:52 +06:00
87071ca52c deprecation of an old record audio and upload audio bot actions 2021-04-26 21:02:11 +06:00
b2770e3ecc record_voice and upload_voice 2021-04-26 20:52:20 +06:00
df63ccfe07 VoiceChatScheduled 2021-04-26 20:47:03 +06:00
694bec22a2 include chat_type 2021-04-26 20:42:26 +06:00
6a3588bb8d InputInvoiceMessageContent 2021-04-26 20:23:26 +06:00
a26568aa29 maxTipAmounts and suggestedTipAmounts support in SendInvoice 2021-04-26 20:01:14 +06:00
cd30660256 update SendInvoice 2021-04-26 19:28:19 +06:00
1846d20b0d start 0.34.0 2021-04-26 19:15:55 +06:00
f13207064e Merge pull request #361 from InsanusMokrassar/0.33.4
0.33.4
2021-04-17 16:02:14 +06:00
61be689aca fix of build 2021-04-17 14:36:23 +06:00
03f8d65bb6 fix of build 2021-04-17 11:14:35 +06:00
2dc8beba8a update classcasts 2021-04-16 22:00:45 +06:00
5451adf4ac FromUserMessage extends Message 2021-04-16 18:07:27 +06:00
9982534001 updates in TextSourceSerializer 2021-04-15 14:34:05 +06:00
c0451d4c8f Update gradle-wrapper.properties 2021-04-15 13:56:52 +06:00
a9d65944e6 update MicroUtils 2021-04-13 15:53:35 +06:00
39598dcb69 fill CHANGELOG 2021-04-13 01:54:45 +06:00
3069a6084c fixes in parseCommandsWithParams 2021-04-13 01:50:41 +06:00
e7bbce3fa7 update uuid dependency 2021-04-12 23:32:50 +06:00
0b361163f2 TextSourceSerializer 2021-04-12 23:23:18 +06:00
6aba2ff641 start 0.33.4 2021-04-12 20:57:12 +06:00
6b761ab37d Update gradle wrapper 2021-04-11 04:06:30 +06:00
b9c8a89af9 Merge pull request #357 from InsanusMokrassar/0.33.3
0.33.3
2021-04-05 19:41:52 +06:00
a42c5c63c4 fillup changelog 2021-04-05 19:08:12 +06:00
fc1a029acb fix of #358 2021-04-05 19:06:49 +06:00
f90ae2f918 include weakLaunch in behaviour builder 2021-04-05 18:15:10 +06:00
019b260888 update ktor 2021-04-05 18:11:29 +06:00
0831f2fa75 update microutils 2021-04-05 17:21:59 +06:00
32ae9d2b16 hotfix 2021-04-05 16:50:31 +06:00
b975a1b036 updates in behaviour builder 2021-04-05 16:41:27 +06:00
f4b1e4a150 start 0.33.3 2021-04-05 13:42:48 +06:00
97031512d4 Merge pull request #356 from InsanusMokrassar/0.33.2
0.33.2
2021-04-03 15:39:14 +06:00
353df43109 update microutils 2021-04-03 15:13:20 +06:00
4e55460834 fix in doInSubContext 2021-04-03 15:05:25 +06:00
e2e235bd6c behaviour builder updates 2021-04-03 14:51:21 +06:00
8ced95bc2f start 0.33.2 2021-04-03 14:24:24 +06:00
685e4af8f5 Merge pull request #345 from InsanusMokrassar/0.33.1
0.33.1
2021-03-26 09:13:15 +06:00
0b2f7a3899 update condition for ReplyMessageNotFoundException 2021-03-26 07:03:33 +06:00
112c86c9da remove caption based messages extension for parsing of commands 2021-03-24 13:56:51 +06:00
1ddd138ff7 update kdocs for new function 2021-03-24 13:44:27 +06:00
1a5d1cde78 add parseCommandsWithParams for text inputs 2021-03-24 13:43:32 +06:00
5b620014cb update kotlin version 2021-03-24 13:14:09 +06:00
80093cb5a9 Update kdocs.yml 2021-03-21 23:22:16 +06:00
9f8e8ee21b update dependencies 2021-03-19 20:20:07 +06:00
3de3bb6133 start 0.33.1 2021-03-19 20:18:32 +06:00
308fb9274b Update kdocs.yml 2021-03-17 21:14:05 +06:00
d14ca7bbdc Update kdocs.yml 2021-03-17 21:13:52 +06:00
dbdd9b5ad2 update dokka 2021-03-16 23:01:26 +06:00
6dd27cb0bf fixes in names of workflows 2021-03-16 22:41:45 +06:00
210a52485b add kdocs yml config 2021-03-16 22:39:54 +06:00
5c11b60ea6 fix dokka config 2021-03-16 22:33:53 +06:00
60c3a0d7af update core info about current version 2021-03-16 22:21:15 +06:00
8d777e1c0e Update dokka version 2021-03-16 16:30:13 +06:00
4e019eb8bb Update packages_publishing.yml 2021-03-12 20:11:26 +06:00
bd80562c2a Merge pull request #337 from InsanusMokrassar/0.33.0
0.33.0
2021-03-12 15:47:24 +06:00
9fc07f2ff3 fix build 2021-03-12 15:03:11 +06:00
a4bae5133a fill changelog 2021-03-12 14:58:13 +06:00
7bb272f2fa update compatibility note 2021-03-12 14:39:27 +06:00
72cf38d3bb fill Behaviour Builder for ChatMemberUpdated 2021-03-12 14:36:10 +06:00
0adee13cba remove deprecations 2021-03-11 22:28:56 +06:00
f9e3e57f24 migrate 0.32.10 -> 0.33.0 2021-03-11 21:44:08 +06:00
d7d4adc8e4 optimize imports 2021-03-11 21:39:34 +06:00
e9b074a36c updates of FlowsUpdatesFilter 2021-03-11 21:36:29 +06:00
65cba0f014 fill api of chat invite links 2021-03-11 21:25:11 +06:00
36202133a1 update classcasts 2021-03-11 21:06:25 +06:00
66f7801b32 fix ChatInviteLinkRequest 2021-03-11 20:41:47 +06:00
e7265829d1 include ChatMemberUpdated functionality 2021-03-11 20:17:08 +06:00
9ad5bfbc57 remove BotInviteChatLink 2021-03-11 16:36:15 +06:00
aba62ba930 chatmember serializers are public 2021-03-11 16:00:47 +06:00
40d702a311 add representations of all chat invite link functionality 2021-03-10 22:46:56 +06:00
233d893b5a add isOff extension for MessageAutoDeleteTimerChanged 2021-03-09 22:33:05 +06:00
0faca5838c fixes in events builder behaviours 2021-03-09 22:14:16 +06:00
838f62aa84 shortcuts seconds24Hours and seconds7Days are consts for now 2021-03-09 22:06:20 +06:00
bc21a680bc fixes for MessageAutoDeleteTimerChanged 2021-03-09 22:00:17 +06:00
8bb60bea34 now MessageAutoDeleteTimerChanged implementing ChannelEvent and GroupEvent 2021-03-09 21:37:25 +06:00
8daadcff95 now MessageAutoDeleteTimerChanged implementing ChannelEvent and GroupEvent 2021-03-09 21:35:53 +06:00
2a1e624641 VoiceChatParticipantsInvited type now is data class 2021-03-09 20:23:03 +06:00
696822db02 add behaviour builder events updates 2021-03-09 20:04:44 +06:00
ded501d963 remove regular build 2021-03-09 19:52:46 +06:00
86e506c33d include message_auto_delete_timer_change 2021-03-09 19:45:19 +06:00
9902b00e85 include revokeMessages in kickChatMember 2021-03-09 19:33:05 +06:00
53524abcbb include canManageChat 2021-03-09 19:26:30 +06:00
7639b15dc6 voice chats functionality included 2021-03-09 19:19:15 +06:00
61b720c61f fix of content waiters and expecters 2021-03-09 16:54:32 +06:00
baf4c74b69 update micro_utils 2021-03-09 16:46:08 +06:00
367cfff2cb start 0.32.10 2021-03-09 16:45:13 +06:00
75e8d0f62d Merge pull request #325 from InsanusMokrassar/0.32.9
0.32.9
2021-03-05 01:08:58 +06:00
c521a5f9a4 Update CHANGELOG.md 2021-03-03 22:32:44 +06:00
c5513365c2 Update gradle.properties 2021-03-03 22:31:29 +06:00
d184ce7a0f Update mpp_publish_template.kpsb 2021-03-03 01:39:18 +06:00
a3bff3f24d Update publish.gradle 2021-03-03 01:37:38 +06:00
a835b1dcbb Update mpp_publish_template.kpsb 2021-03-03 01:33:50 +06:00
ffed2b80a5 update publish scripts to avoid useless repos 2021-03-02 16:45:13 +06:00
ff24b9f35b add workflow for packages publication 2021-03-02 16:25:55 +06:00
1287852334 update microutils version 2021-03-02 15:26:52 +06:00
fc2f177e38 update dependencies 2021-02-28 22:24:34 +06:00
1efd4dce6e start 0.32.9 2021-02-28 22:21:57 +06:00
69b5a16b17 Update gradle-wrapper.properties 2021-02-23 09:53:45 +06:00
77b531ad06 Merge pull request #307 from InsanusMokrassar/0.32.8
0.32.8
2021-02-22 01:35:40 +06:00
a98d5d9abd update micro_utils 2021-02-21 22:50:47 +06:00
104653ac41 update serialization 2021-02-21 21:15:40 +06:00
63337b8285 start 0.32.8 2021-02-21 21:13:23 +06:00
5cc0bbb31b Merge pull request #303 from InsanusMokrassar/0.32.7
0.32.7
2021-02-18 00:34:46 +06:00
563d784603 RestrictionsChatPermissions 2021-02-18 00:28:36 +06:00
0d9f18f346 DiceAnimationType class casts 2021-02-17 22:29:29 +06:00
23ceaf8e97 LeftRestrictionsChatPermissions 2021-02-17 22:12:58 +06:00
fe2dffd8b5 BehaviourContext updates 2021-02-17 22:11:26 +06:00
eeb46817c3 start 0.32.7 2021-02-17 22:00:46 +06:00
5ab00da31d Merge pull request #300 from InsanusMokrassar/0.32.6
0.32.6
2021-02-17 17:15:40 +06:00
841ae73f7c replyWithDice 2021-02-17 17:10:21 +06:00
41b4d29917 updates in slot machine utils 2021-02-17 16:58:57 +06:00
f8b3c44146 update micro_utils 2021-02-16 13:48:32 +06:00
f0eb670c3f start 0.32.6 2021-02-16 13:47:31 +06:00
fe5d94f31e Update README.md 2021-02-13 10:09:33 +06:00
7901d0a223 Update README.md 2021-02-13 01:42:35 +06:00
799f9123ba Update README.md 2021-02-13 01:38:31 +06:00
f77f010e66 Update README.md 2021-02-11 13:38:55 +06:00
67ddf8d809 Update README.md 2021-02-11 13:37:24 +06:00
81afa46253 Update README.md 2021-02-11 13:36:53 +06:00
a5bba76f07 Update README.md 2021-02-11 13:35:06 +06:00
d882cf9c97 update readme 2021-02-11 12:06:34 +06:00
2e27b8b64d Merge pull request #295 from InsanusMokrassar/0.32.5
0.32.5
2021-02-09 19:13:42 +06:00
4df800eaa9 fix of #291 2021-02-09 19:07:31 +06:00
8d27349868 update content resends and different other things 2021-02-09 18:26:10 +06:00
2a89c41a58 fix of #292 2021-02-09 17:15:28 +06:00
098b5cc393 rewrite createAccumulatedUpdatesRetrieverFlow onto channelFlow 2021-02-09 16:33:48 +06:00
10f4817283 solution of #293 2021-02-08 19:35:32 +06:00
4449893608 fix of #294 2021-02-08 18:15:54 +06:00
3a53f41f66 start 0.32.5 2021-02-08 11:36:20 +06:00
7cd366d893 Update README.md 2021-02-07 18:02:20 +06:00
1309a4111c Merge pull request #290 from InsanusMokrassar/0.32.4
content messages renames
2021-02-07 16:59:51 +06:00
0ca815760b content messages renames 2021-02-07 16:54:48 +06:00
eca0680f2f update readme 2021-02-07 12:44:38 +06:00
d472d371ed Merge pull request #282 from InsanusMokrassar/0.32.4
0.32.4
2021-02-07 12:43:08 +06:00
4748b6813a ExceptionsOnlyLimiter now will not use Result to provide success/failure state of result 2021-02-07 12:40:05 +06:00
a2ea15d4b0 update wrapper version 2021-02-07 11:02:13 +06:00
27dc302f5d update for compiling 2021-02-06 11:53:30 +06:00
baf8ed3a77 now JVM part will be compiled with IR 2021-02-06 00:52:39 +06:00
18913af3c3 update publishing scripts 2021-02-06 00:50:51 +06:00
51871ea94c update micro_utils version 2021-02-05 16:08:45 +06:00
6a625d7b9f update publishing scripts 2021-02-05 16:08:28 +06:00
0b93b472a3 update klock 2021-02-05 14:22:42 +06:00
ff16f9a315 Update README.md 2021-02-05 01:18:38 +06:00
86bfe043a5 update dependencies 2021-02-03 23:05:17 +06:00
fa18e7299d 0.32.4 2021-02-03 22:59:37 +06:00
c986025075 Merge pull request #277 from InsanusMokrassar/0.32.3
0.32.3
2021-02-02 11:44:53 +06:00
e8a7ea9ce4 inline qieries expectators and waiters 2021-02-02 11:17:51 +06:00
30f35e5488 start 0.32.3 2021-02-02 11:07:30 +06:00
b626974ea7 Create dependabot.yml 2021-02-01 23:22:26 +06:00
128b782a27 Merge pull request #276 from InsanusMokrassar/0.32.2
0.32.2
2021-02-01 21:43:21 +06:00
dc83b8d77a fix of #275 and several other internal problems 2021-02-01 21:09:11 +06:00
2aac6c0bde start 0.32.2 2021-02-01 21:04:54 +06:00
b637d0d2a6 Merge pull request #274 from InsanusMokrassar/0.32.1
0.32.1
2021-01-30 21:06:15 +06:00
d12cba2343 replacing of withContent and requireWithContent and extending of extensions receivers types 2021-01-30 20:59:26 +06:00
450c7e6474 fix of #273 2021-01-30 20:05:07 +06:00
a35fb40a66 fix of #272 2021-01-30 19:35:53 +06:00
8731aa2c26 start 0.32.1 2021-01-30 19:33:38 +06:00
32e305537d Merge pull request #260 from InsanusMokrassar/0.32.0
0.32.0
2021-01-29 17:00:06 +06:00
ec0a10e36e fillup changelog 2021-01-29 13:28:18 +06:00
131ec4d6d5 renames of EncryptedPassportElements 2021-01-29 12:44:13 +06:00
ecc608f51a add additional variant of doInDecryptionContextWithPKCS8Key 2021-01-29 10:44:11 +06:00
040654f131 refill readme 2021-01-29 01:18:44 +06:00
9e73d0c461 add opportunity to manually set up delay for media groups webhooks 2021-01-29 00:56:47 +06:00
d67c80bc99 ClassCasts update for SecureValue 2021-01-28 22:21:21 +06:00
b0eef4f82d update ktor 2021-01-28 22:06:52 +06:00
fbe91a6321 complete preview tools for passport 2021-01-28 22:03:14 +06:00
15066c9d63 add SecureData and DecryptedCredentials 2021-01-28 17:08:25 +06:00
e0bf67d8f9 global update of passport 2021-01-28 16:03:30 +06:00
1dc3ce2fb5 add passport in API 2021-01-25 10:43:51 +06:00
0c71133969 add expectations and triggers for passport 2021-01-25 10:29:11 +06:00
1359dd549f Create regular-build.yml 2021-01-25 04:42:23 +06:00
c425e2ecc3 update classcasts 2021-01-23 21:10:57 +06:00
4d63e3a17d complete tools for handling of encrypted data 2021-01-23 20:50:46 +06:00
d34deade0d temporal state (currently tools for files decryption in JS do work 2021-01-23 18:49:41 +06:00
2f52ad45a4 add tools for passport files hashes calculation 2021-01-23 12:21:57 +06:00
1d99e632a4 fix of SetPassportDataErrors request parent interface 2021-01-22 23:40:33 +06:00
cdcfaf5a29 fixes in passport errors serialization and replacing of PassportElementError 2021-01-22 23:14:24 +06:00
f3590762f3 add PassportElementError realization 2021-01-22 23:01:37 +06:00
e0ff14b7fe update gradle wrapper 2021-01-22 21:57:23 +06:00
9983e111ec update EncryptedElementSerializer 2021-01-22 21:53:37 +06:00
08b8710772 add asAction and several variants of oneOf 2021-01-19 20:19:28 +06:00
fc71e028c4 improving work of behaviour_builder 2021-01-19 18:50:45 +06:00
30a4a7bd8b update micro_utils dependency 2021-01-19 13:52:06 +06:00
b973278b0a add note about breaking changes 2021-01-19 11:00:12 +06:00
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
a4bf6911c7 Update micro_utils version note 2021-01-19 00:40:29 +06:00
73b3daa68b Update micro_utils dependency 2021-01-19 00:39:46 +06:00
09748615ae optimize imports 2021-01-18 23:43:21 +06:00
2dc8521aed now all data field are predecrypted with Base64StringSerializer 2021-01-17 16:44:56 +06:00
81de59f37c fix of translations in UtilityBill 2021-01-17 16:34:05 +06:00
fb61a94c5e fix defaults in encrypted passport data 2021-01-17 16:30:25 +06:00
26fd5e51bf filesSize in PassportFile is nullable for now 2021-01-17 16:24:33 +06:00
c1ab9da4c4 fix error with deserialization of passport data 2021-01-17 16:11:38 +06:00
6b414d64b0 remove redundant imports 2021-01-17 15:45:20 +06:00
5a3edc2b44 add passportMessages extension 2021-01-17 15:43:08 +06:00
6dcdc2ab7f now PassportMessage contains user too 2021-01-17 15:35:25 +06:00
a2ae4f71de new PassportMessage type 2021-01-15 16:27:22 +06:00
5d87b86afe update passport data to use Base64StringSerializer 2021-01-15 16:02:16 +06:00
ef22735894 add base64 serialization dependency and update micro_utils up to 0.4.17 2021-01-14 21:27:58 +06:00
c0ea479fe3 add primitives for Telegram Passport API 2021-01-14 14:03:25 +06:00
0846e816e9 start 0.31.1 2021-01-14 12:37:31 +06:00
d837c9d605 update publication scripts 2021-01-13 14:21:35 +06:00
d1993842c3 Merge pull request #257 from InsanusMokrassar/0.31.0
0.31.0
2021-01-10 13:08:00 +06:00
4e8a9dcff0 update changelog 2021-01-09 22:35:41 +06:00
10eb15e172 several RiskFeature updates 2021-01-09 22:18:31 +06:00
0320da7614 updates in long polling methods 2021-01-09 22:10:38 +06:00
7aa3ff180e several refactoring things and docs appending 2021-01-09 21:50:02 +06:00
a882a212c2 remove different internal strings things 2021-01-09 21:24:13 +06:00
1b15748f65 optimize imports 2021-01-09 20:59:37 +06:00
044fe5eadf full removing of old redundant "fullEntitiesList" 2021-01-09 20:52:21 +06:00
9453ec37e7 update gradle wrapper 2021-01-09 19:01:14 +06:00
3d0cbc2d2b small refactor 2021-01-09 19:00:41 +06:00
198b551ebf deprecations removing 2021-01-09 18:25:11 +06:00
1452e32293 behaviours documentatio and changing of buildBehaviour signature 2021-01-09 18:04:45 +06:00
946b7abcae start 0.31.0 2021-01-08 16:58:25 +06:00
879943622a Merge pull request #254 from InsanusMokrassar/0.30.13
0.30.13
2021-01-08 16:50:14 +06:00
c0b4b523cf update micro_utils version 2021-01-08 16:41:08 +06:00
49e6e9cfe3 fix in new project publication scripts 2021-01-08 16:39:29 +06:00
ffadb6355b fixes in readme 2021-01-08 16:37:03 +06:00
9cc402b42d ContentMessage -> CommonMessage in behaviour_builder, fill readme of behaviour_builder and update projects schema 2021-01-08 16:28:00 +06:00
b9341f89ac add media groups triggers and waiters 2021-01-08 11:02:18 +06:00
ac07f44c81 change public signature of waiters 2021-01-08 10:29:29 +06:00
2e53247726 now content waiters and triggers may have set up manually parameter "includeMediaGroups" 2021-01-08 10:22:29 +06:00
e2dddf96a1 several small additions 2021-01-08 00:30:29 +06:00
ce0fceb240 include media groups 2021-01-08 00:22:19 +06:00
633239961a update FlowsUsh 2021-01-07 19:02:35 +06:00
8b79b15777 FlowsUpdatesFilter#allUpdatesWithoutMediaGroupsGroupingFlow 2021-01-07 19:01:02 +06:00
a28cf5ddff now BehaviourContext is UpdateFilterm TelegramBot and CoroutineScope 2021-01-07 18:20:23 +06:00
8c2cffc8e3 rename steps subproject to behaviour_builder 2021-01-07 18:17:50 +06:00
b933361258 optimize imports in steps 2021-01-07 18:12:37 +06:00
383e722d07 rename scenario to behaviour context 2021-01-07 18:11:24 +06:00
3125c2fc1b add callback query expectations and triggers 2021-01-07 17:57:08 +06:00
965b8c3c50 add chat event triggers and expectations in steps 2021-01-07 17:24:58 +06:00
94745ef373 add docs to base expectations 2021-01-07 16:01:25 +06:00
aee5ab564b optimize imports 2021-01-07 12:45:54 +06:00
c70f0b65dd add content triggers and update command 2021-01-07 12:45:30 +06:00
30e6f68228 small update of scenarios 2021-01-06 23:21:33 +06:00
00873a255c preview state of steps 2021-01-06 23:06:48 +06:00
6bd423dc11 class casts for ResendableContent and TextSource 2021-01-06 20:49:55 +06:00
c5ada8cea0 start 0.30.13 2021-01-06 15:41:27 +06:00
0cb3df4d1a Merge pull request #251 from InsanusMokrassar/0.3.12
0.3.12
2021-01-05 23:06:35 +06:00
b22118b400 add suppressing of unchecked casts 2021-01-05 23:04:09 +06:00
2006e45b57 last update of classcasts 2021-01-05 23:02:00 +06:00
c091098feb remove *Impl casts 2021-01-05 22:37:52 +06:00
6cf8d47cbf update classcasts 2021-01-05 22:27:42 +06:00
3dc4e9dda4 preview of solution for #145 2021-01-05 11:54:02 +06:00
6407ad1a93 Revert "one more update of klassindex"
This reverts commit f974e5787f.
2021-01-05 11:11:50 +06:00
f974e5787f one more update of klassindex 2021-01-05 11:11:37 +06:00
28a9bbd310 Revert "add klassindex"
This reverts commit 599d5a51e3.
2021-01-05 01:37:01 +06:00
599d5a51e3 add klassindex 2021-01-05 01:36:52 +06:00
25f8d15a4b start 0.3.12 2021-01-05 00:16:11 +06:00
66c2cb2d30 Merge pull request #243 from InsanusMokrassar/0.30.11
0.30.11
2021-01-04 14:35:56 +06:00
74fb448378 update klock 2021-01-04 14:29:06 +06:00
3417ec060f Update README.md 2021-01-03 15:22:19 +06:00
4f54a00003 Update README.md 2021-01-03 15:20:42 +06:00
4fb187da30 Update README.md 2021-01-03 15:19:35 +06:00
7637b6f69a Update README.md 2021-01-03 15:17:58 +06:00
9df9af193c bot actions got class-cast shortcuts 2021-01-02 16:06:00 +06:00
ba4b4c4b64 bot actions shortcut 2021-01-02 15:51:26 +06:00
fa0861b8bc update micro_utils 2020-12-23 13:42:00 +06:00
20494e1d4a Update CHANGELOG.md 2020-12-22 17:34:14 +06:00
a404008dee Update dependencies 2020-12-22 17:33:20 +06:00
881205dd80 update dependencies 2020-12-16 14:25:09 +06:00
2096c44811 start 0.30.11 2020-12-13 22:25:57 +06:00
1a3da33589 Merge pull request #237 from InsanusMokrassar/0.30.10
0.30.10
2020-12-08 14:25:00 +06:00
be28c9bd5d update dependencies 2020-12-08 12:03:45 +06:00
a193ef5fd5 buildBot 2020-12-04 16:29:50 +06:00
7c43d3aaa5 update dependencies 2020-12-04 16:13:02 +06:00
e034afc75c start 0.30.10 2020-12-04 16:06:14 +06:00
08e3326d1a Merge pull request #226 from InsanusMokrassar/0.30.9
0.30.9
2020-11-27 00:59:33 +06:00
6dd1825b98 update dependencies 2020-11-27 00:44:29 +06:00
bd4eb29fc1 update limits of dices 2020-11-26 19:37:35 +06:00
2cc66ef13c BowlingDiceAnimationType 2020-11-25 23:09:49 +06:00
9a8175d1c8 update dependencies 2020-11-25 23:02:54 +06:00
25285b2e8a start 0.30.9 2020-11-25 23:01:19 +06:00
bb09f05d7b Merge pull request #223 from InsanusMokrassar/0.30.8
0.30.8
2020-11-21 16:37:47 +06:00
da5e46e59f remove several PreviewFeature 2020-11-21 15:19:31 +06:00
a3f315a73a update micro_utils 2020-11-21 15:15:07 +06:00
43583a885a update versions 2020-11-21 14:40:34 +06:00
ec02257ecd start 0.30.8 2020-11-21 14:32:32 +06:00
29ee4a9396 update publishing urls 2020-11-18 17:51:53 +06:00
2717cb4fc6 exprimentally update publishing scripts 2020-11-18 17:18:51 +06:00
1ce2526401 Merge pull request #217 from InsanusMokrassar/0.30.7
0.30.7
2020-11-17 16:32:19 +06:00
74c480b07e one new telegramBot function 2020-11-17 16:18:58 +06:00
657e9aa770 add KtorRequestsExecutorBuilder 2020-11-17 16:06:25 +06:00
0d19952ba7 PowLimiter and CommonLimiter rewriting (#210) 2020-11-17 15:48:58 +06:00
f8cccc3e17 update gradle 2020-11-17 14:41:53 +06:00
bc1b7c3f25 fix ending of host url in TelegramAPIUrlsKeeper 2020-11-17 13:18:11 +06:00
ec74111a9d update micro_utils version 2020-11-17 12:51:55 +06:00
2dadeb7eb7 start 0.30.7 2020-11-17 12:50:54 +06:00
24bd65501b Update README.md 2020-11-16 21:59:25 +06:00
574ca803fa Update README.md 2020-11-16 21:56:31 +06:00
947e3bf34e add fast start 2020-11-16 21:55:22 +06:00
488158d8fb Merge pull request #214 from InsanusMokrassar/0.30.6
0.30.6
2020-11-16 16:29:46 +06:00
41bf3c7f0b filling of changelog and renaming of new function makeLink -> makeUsernameLink 2020-11-16 16:25:10 +06:00
c2032d21cd TextSource properties has been renamed 2020-11-16 13:32:20 +06:00
6650dd9cfe reworking of links extension 2020-11-16 13:22:08 +06:00
af1d6d6f1a start 0.30.6 2020-11-15 23:05:19 +06:00
a5861d659d Merge pull request #212 from InsanusMokrassar/0.30.5
0.30.5
2020-11-14 19:44:26 +06:00
b36f80a6d3 update micro_utils 2020-11-14 19:41:26 +06:00
7c4f034a6c fixes in imports 2020-11-14 14:41:16 +06:00
3b08bc6dd2 serialization of ChatMember and changing of id type in User 2020-11-14 14:38:54 +06:00
ed87c0ad95 start 0.30.5 2020-11-14 11:19:53 +06:00
c8c0fc2ce8 Merge pull request #211 from InsanusMokrassar/0.30.4
0.30.4
2020-11-12 23:05:49 +06:00
1f40ce1a81 add a lot of shortcuts for events 2020-11-12 22:35:27 +06:00
b0219389fc add several functions and changelog notes 2020-11-12 22:23:10 +06:00
f6ec82b449 deprecate old asChatEventsFlow 2020-11-12 22:04:46 +06:00
71dac70635 deprecations in old functions 2020-11-12 22:02:06 +06:00
98f68a9e1e filling of changelog 2020-11-12 21:54:14 +06:00
e7199e7451 fix use user in group messages 2020-11-12 21:46:33 +06:00
33b50c6c68 events filters 2020-11-12 21:17:11 +06:00
e4ce6f8fc7 fixes in events 2020-11-12 17:44:33 +06:00
8764f18ca8 TextContent now implements TextedInput 2020-11-12 16:57:32 +06:00
b2fa7fee9d rename MultilevelTextSource#textSources 2020-11-12 16:37:17 +06:00
0121e3a104 update micro_utils 2020-11-12 16:33:48 +06:00
f6e5664632 start 0.30.4 2020-11-12 16:31:02 +06:00
c5b7c4e1f5 Merge pull request #209 from InsanusMokrassar/0.30.3
0.30.3
2020-11-11 11:25:25 +06:00
53800d49bf small rework in ExceptionsOnlyLimiter 2020-11-11 11:23:24 +06:00
d83e3eb10a add handling of 429 status 2020-11-11 11:15:19 +06:00
66b4d06064 limiter rework 2020-11-11 10:23:20 +06:00
4fab01b2a2 update micro_utils 2020-11-11 10:15:06 +06:00
b81086c4bb start 0.30.3 2020-11-11 10:14:10 +06:00
d776071cac Update build.gradle 2020-11-11 01:32:25 +06:00
5f33d05deb Update extensions utils dependencies 2020-11-11 01:31:28 +06:00
912cc7217c Update extensions api dependencies 2020-11-11 01:30:31 +06:00
96e00f6e31 Merge pull request #207 from InsanusMokrassar/0.30.2
0.30.2
2020-11-10 21:52:37 +06:00
f8ea5f9515 fix in changelog 2020-11-10 21:45:07 +06:00
9f11c4f1c4 update ktor 2020-11-10 20:56:11 +06:00
9c91980d5d webhook fixes 2020-11-10 20:44:39 +06:00
7376eb5b10 start 0.30.2 2020-11-10 20:01:22 +06:00
6654f27f9d Merge pull request #202 from InsanusMokrassar/0.30.1
0.30.1
2020-11-09 15:16:26 +06:00
d29acce417 add suppressing of unused in EntitiesBuilder 2020-11-09 15:14:48 +06:00
f0f18209f3 a little bit improve EntitiesBuilder 2020-11-09 15:12:57 +06:00
324018a0f6 update publication scripts 2020-11-09 14:45:29 +06:00
b621325e92 update version of microutils and changelog 2020-11-09 08:37:30 +06:00
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
83edda2dfe add link to bot template 2020-11-08 18:58:52 +06:00
1974c20229 start 0.30.1 2020-11-08 12:07:14 +06:00
499d9b1791 Update README.md 2020-11-08 00:03:41 +06:00
6caa7dd428 Merge pull request #163 from InsanusMokrassar/0.30.0
0.30.0
2020-11-07 23:00:35 +06:00
e8ded44562 rename StorageFile in jvm of common 2020-11-07 22:28:20 +06:00
1e6b0381ee StorageFile factories 2020-11-07 14:44:05 +06:00
1cf7ae7438 add micro_utils and deprecate old coroutine methods 2020-11-07 13:42:10 +06:00
311512b5db fix chat interfaces serializers 2020-11-07 01:34:22 +06:00
d73fa4076f add several extension properties to texted/captioned/explained interfaces 2020-11-06 19:13:59 +06:00
3620350cc0 add simple text dsl for textsources 2020-11-06 18:52:59 +06:00
54cfea9adf fill changelog 2020-11-06 14:42:30 +06:00
6665b6ef03 reorganize text sources and text parts 2020-11-06 14:37:13 +06:00
ee6f0f3d5d add separation of text sources 2020-11-06 12:59:55 +06:00
6ec0fcadd2 rewrite telegramBot functions 2020-11-06 12:29:51 +06:00
c89aa7b9ba telegramBot improvements 2020-11-06 12:07:46 +06:00
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
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
00a75801a8 fixes 2020-11-06 01:14:48 +06:00
e45f9cf46a return serialname for messageId in RawMessage 2020-11-06 00:37:56 +06:00
3b1803e851 remove deprecations 2020-11-06 00:12:14 +06:00
bf1e353615 fix build 2020-11-06 00:05:05 +06:00
99bb8d6e0d update extnsions.api 2020-11-05 23:48:23 +06:00
98d7b9c651 update coroutines :) 2020-11-05 21:42:31 +06:00
765caefc32 implementation of allow sending without reply (#191) 2020-11-05 21:33:11 +06:00
6bdefb6f8f new request CopyMessage (#187) 2020-11-05 20:27:45 +06:00
d5e283e7ba Update all classes which must have "entities"/"caption_entities" fields (#189) 2020-11-05 20:18:16 +06:00
a5982ac881 partially restructurize InlineQueryResult and several its implementators 2020-11-05 18:00:40 +06:00
c0e81b1d6d partially complete rewriting of things according to #189 2020-11-05 16:53:26 +06:00
eb879963f8 isAnonymous support in api 2020-11-05 12:48:44 +06:00
f835167f66 isAnonymous support 2020-11-05 12:47:14 +06:00
ff34b23777 implementation of sender_chat and author_signature 2020-11-05 12:39:59 +06:00
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
53b8cc4625 update pollQuestionTextLength 2020-11-05 01:15:03 +06:00
201def826e locations updates 2020-11-05 01:12:14 +06:00
609a959b99 DiceAnimationType#valueLimits 2020-11-04 23:52:22 +06:00
6a05a7ecab add footbal dice animation type 2020-11-04 23:47:01 +06:00
159ea6f1cc UnpinAllChatMessages 2020-11-04 23:44:13 +06:00
0886781d61 add docs for PinChatMessage 2020-11-04 23:41:19 +06:00
60d5581ec6 supporting of private chats in pinChatMessage 2020-11-04 23:38:40 +06:00
2a33216006 disableContentTypeDetection 2020-11-04 23:33:48 +06:00
179bb66183 return SetWebhook without certificate 2020-11-04 23:21:25 +06:00
7a2ecd2dbf getChat updates completing 2020-11-04 23:10:39 +06:00
fd1a15cb5d ExtendedPrivateChat#bio 2020-11-04 22:46:08 +06:00
86a472e814 SetWebhook updates 2020-11-04 22:43:26 +06:00
6d6c544aaf logout and close 2020-11-04 22:17:17 +06:00
dd4d5cd15d start 0.30.0 2020-11-04 22:06:44 +06:00
23dfa4f69d Merge pull request #162 from InsanusMokrassar/0.29.4
0.29.4
2020-11-02 21:51:23 +06:00
a10d766295 slotmachine utils 2020-11-02 20:32:46 +06:00
ea6ab8f024 start 0.29.4 2020-11-02 20:10:38 +06:00
f377d61bf0 Merge pull request #158 from InsanusMokrassar/0.29.3
0.29.3
2020-11-02 14:21:54 +06:00
18c9d4e468 fill changelog 2020-11-02 14:14:08 +06:00
20b931138c update FlowsUpdatesFilter 2020-11-02 14:11:26 +06:00
d7bca15693 deprecations 2020-11-02 13:57:44 +06:00
957649603b fix for media fields in input media 2020-11-02 13:51:20 +06:00
bbc56fe94c hotfix in changelog 2020-11-02 13:26:06 +06:00
d048958423 WrongFileIdentifierException 2020-11-02 13:25:40 +06:00
f0e9267664 fixes in files and filling of changelog 2020-11-02 13:16:46 +06:00
5dd7207e09 update serialization version 2020-11-02 12:56:29 +06:00
d96d47e32c make different interfaces for audio and documents media content 2020-11-02 12:51:09 +06:00
1ee73dd406 sending media groups api updates 2020-11-02 12:39:12 +06:00
e9a05c4930 include audio playlists, documents and slot machine dice 2020-11-02 12:02:12 +06:00
9e771fa04a fixes 2020-11-02 11:13:16 +06:00
06ba21fc1f add changelog for audio and document media items 2020-10-30 20:40:44 +06:00
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
80d4bdfe17 make audio and documents able to be media group items 2020-10-30 20:38:02 +06:00
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
46fe16fd73 Revert "Revert "add slot machine, but currently it is not working""
This reverts commit f317e144e6.
2020-10-30 19:37:26 +06:00
8e1cafb1b6 start 0.29.3 2020-10-30 19:36:48 +06:00
68d971f874 Merge pull request #155 from InsanusMokrassar/0.29.2
0.29.2
2020-10-27 15:55:17 +06:00
37a23c7e79 fixes in aggregation of flows 2020-10-27 15:51:48 +06:00
b053c29ea3 update aggregateFlows 2020-10-27 15:26:32 +06:00
23a1fed7dd Revert "update greetings config"
This reverts commit 87d2537bda.
2020-10-27 15:16:04 +06:00
87d2537bda update greetings config 2020-10-27 15:14:45 +06:00
6d782f28c3 updates after coroutines version change 2020-10-27 15:11:57 +06:00
d8dbbdf549 update coroutines 2020-10-27 15:01:30 +06:00
f317e144e6 Revert "add slot machine, but currently it is not working"
This reverts commit 4f9cb531c0.
2020-10-27 14:53:22 +06:00
05c27804ce update travis config 2020-10-22 19:19:55 +06:00
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
82b7bf676f Update .travis.yml 2020-10-20 02:05:34 +06:00
4f9cb531c0 add slot machine, but currently it is not working 2020-10-19 20:26:36 +06:00
09bbb1945c start 0.29.2 2020-10-19 20:12:18 +06:00
7bedc4caf0 Merge remote-tracking branch 'original/master' into gm/update-dokka 2020-10-19 19:51:03 +06:00
6a73aa1525 add travis dokka step 2020-10-19 19:50:41 +06:00
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
e85e7d02f7 Merge pull request #149 from InsanusMokrassar/0.29.1
0.29.1
2020-10-13 16:08:19 +06:00
37ad279ab4 Merge pull request #148 from leobia/master
Reformat CHANGELOG.md
2020-10-12 15:27:09 +06:00
3b41dc1fbf Merge remote-tracking branch 'original/0.29.1' 2020-10-12 15:26:11 +06:00
5747383ed1 Update README.md 2020-10-12 01:08:56 +06:00
18a6efabb8 post fixes for serialization update 2020-10-09 11:49:24 +06:00
dcb837b155 update serialization version 2020-10-09 11:41:08 +06:00
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
800d14561e add conversations between AudioFile and VoiceFile 2020-10-04 20:00:43 +06:00
2378237fc5 Merge pull request #146 from InsanusMokrassar/0.29.0
0.29.0
2020-10-04 19:46:22 +06:00
35e28c00cb fix help for versions before 0.28.0 2020-10-04 19:31:45 +06:00
1913f1a900 update libraries schema 2020-10-04 19:26:16 +06:00
cbfd34098d READMEs fixes 2020-10-04 18:54:57 +06:00
e5618f4705 more fixes to god of fixes (docs fixes) 2020-10-04 18:50:05 +06:00
c9f2166e7d fixes in md files 2020-10-04 18:46:28 +06:00
eb960290c6 remove redundant changes 2020-10-04 18:39:03 +06:00
100f8b564a remove redundant changes 2020-10-04 18:37:55 +06:00
8e1ad9ffbc artifacts names has been changed 2020-10-04 18:34:03 +06:00
8875e2a986 update changelog parser 2020-10-04 17:43:25 +06:00
7478b151eb fixes in readmes 2020-10-04 17:41:30 +06:00
959136479e add information about migration in examples project 2020-10-04 17:35:24 +06:00
a52a62837e add migration notes 2020-10-04 17:17:52 +06:00
17dd694044 change package group and readmes 2020-10-04 17:10:03 +06:00
34fcfe2e20 migrate core project in new package 2020-10-04 17:06:30 +06:00
64862ecd2d experimentaly change package for extensions projects 2020-10-04 16:59:27 +06:00
c9edbbf7af migration onto major changes 0.29.0 2020-10-04 16:52:00 +06:00
a2f9a5a432 hotfix after SendVoice signature change 2020-10-04 16:49:43 +06:00
8337da34ca fix of #144 plus several other changes 2020-10-04 16:47:30 +06:00
f45956b554 hotfix for changelogs 2020-10-04 13:19:19 +06:00
bec1255d67 replaces of RequestsExecutor by TelegramBot typealias in TelegramBotAPI-extensions-api 2020-10-04 13:18:24 +06:00
39ca29279f fix forward_from_chat for SupergroupChat 2020-10-02 18:07:16 +06:00
70b592baad ForwardFromSupergroupInfo 2020-10-02 14:59:10 +06:00
403aa684a8 start 0.28.5 2020-10-02 14:58:27 +06:00
48c6f103b5 Update README.md 2020-10-02 14:27:07 +06:00
e326d289cb Create pull_request_template.md 2020-10-02 13:26:32 +06:00
7fd9c4c897 Create CONTRIBUTING.md 2020-10-02 13:10:01 +06:00
347a6212d4 Merge pull request #141 from InsanusMokrassar/0.28.4
0.28.4
2020-09-28 13:29:22 +06:00
e10e257c80 update ktor 2020-09-28 13:18:03 +06:00
5e7bc96b44 add deprecations 2020-09-28 13:11:41 +06:00
79d0eda61d add changelog 2020-09-28 13:09:58 +06:00
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
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
496af479b0 Revert "add karma for tests"
This reverts commit 386e91e28b.
2020-09-22 22:42:01 +06:00
386e91e28b add karma for tests 2020-09-22 22:33:45 +06:00
91dbcecefc add autoPublishing 2020-09-22 18:53:48 +06:00
2d743e4c19 Merge pull request #136 from InsanusMokrassar/0.28.3
0.28.3
2020-09-22 18:32:06 +06:00
8804a24013 small refactoring 2020-09-22 18:12:48 +06:00
8b5244d8df hotfix 2020-09-22 18:06:50 +06:00
034901a479 add publication of github release via changelog 2020-09-22 18:04:10 +06:00
7043647584 changelog parser script has been added 2020-09-22 15:15:20 +06:00
acd9505a5d inline queries extensions 2020-09-22 14:47:34 +06:00
46c33d5ec4 update dependencies 2020-09-22 11:33:47 +06:00
89dc7a4b2a InlineQueryResult#id type change 2020-09-20 20:16:14 +06:00
e4f305b3ec start 0.28.3 2020-09-20 20:11:27 +06:00
d56c132201 Reorder 0.28.* changelogs 2020-09-16 19:28:05 +06:00
d336e177dd Merge pull request #135 from InsanusMokrassar/0.28.2
0.28.2
2020-09-16 11:45:22 +06:00
15e29286fb commonMessages and sent via bot shortcuts updates 2020-09-14 00:12:28 +06:00
314ceed78e signature change in filterCommandsWithArgs 2020-09-13 23:58:09 +06:00
3fa3aa50d9 commands shortcuts 2020-09-13 23:42:59 +06:00
571296b9a0 start 0.28.2 2020-09-13 23:32:47 +06:00
3f13e5d062 Merge pull request #132 from InsanusMokrassar/0.28.1
0.28.1
2020-09-12 22:38:24 +06:00
1874023c05 fixes in build + changes in signature of executeUnsafe 2020-09-12 16:22:39 +06:00
dc0fda2066 update handleSafely 2020-09-12 16:18:00 +06:00
c0d4a4f01b update gradle wrapper version 2020-09-12 15:49:09 +06:00
603762bc22 update kotlin and UUID versions 2020-09-12 15:44:44 +06:00
4db82d6ce2 start 0.28.1 2020-09-12 15:40:12 +06:00
9bf8f56254 update SimpleInputFilesTest 2020-08-29 19:52:46 +06:00
9c926a2265 update SimpleInputFilesTest 2020-08-29 19:51:10 +06:00
747854f4f4 Merge pull request #123 from InsanusMokrassar/0.28.0
0.28.0
2020-08-29 18:46:16 +06:00
dcfb14553d JS/JVM errors opportunity note 2020-08-29 18:37:02 +06:00
6eaa9d699b crutch for inputmediaphoto 2020-08-29 12:08:37 +06:00
6788c4d1dd make the test failing again 2020-08-24 00:34:30 +06:00
6420737a82 remove arguments 2020-08-24 00:27:37 +06:00
4c36750431 add failing test which normally must be working ok 2020-08-23 23:42:50 +06:00
fd022742aa files downloading extensions in utils 2020-08-23 23:37:29 +06:00
0472e35752 Merge pull request #124 from sleshJdev/feature/download-pathed-file-extension
Extended PathedFile to get it as file/stream
2020-08-23 21:44:53 +06:00
768d00eedd total rework (by accident) 2020-08-23 21:43:58 +06:00
e9347075ed Merge remote-tracking branch 'upstream/0.28.0' into feature/download-pathed-file-extension 2020-08-23 18:57:03 +06:00
slesh
3da74b0c66 Converted to expression body 2020-08-23 01:05:12 +03:00
slesh
8b79c5c76b Use DEFAULT_BUFFER_SIZE 2020-08-23 01:04:01 +03:00
slesh
a1b471d2ca Added asBytes method. Used InputStream.copyTo 2020-08-23 01:02:50 +03:00
slesh
e2c7125f6c Extended PathedFile to get it as file/stream 2020-08-23 00:47:17 +03:00
ec8df3c31c start work with publication 2020-08-20 22:26:35 +06:00
94a35349aa temporal update 2020-08-20 17:35:26 +06:00
046402454f Revert "try to fix problem with arguments in InputMedia"
This reverts commit c3978f2dab.
2020-08-20 16:07:01 +06:00
c3978f2dab try to fix problem with arguments in InputMedia 2020-08-20 15:58:11 +06:00
1019fd4d19 turn on incremental building and add TelegramBot typealias 2020-08-20 15:00:45 +06:00
76a9fd1a55 updates in readmes 2020-08-20 13:55:34 +06:00
aec4c7323a fill changelog 2020-08-20 12:02:28 +06:00
7bdfd5cf69 update README 2020-08-20 11:58:37 +06:00
ce95a60fbc migration of artifacts names 2020-08-20 11:55:39 +06:00
3c17a67b01 rewrite on BOTH for JS 2020-08-20 10:51:05 +06:00
35bf5b9e9d fix of formatter in ChatSerializers 2020-08-20 02:00:42 +06:00
0087d02b5f potential fix of build 2020-08-20 01:17:32 +06:00
212d8946c8 update travis build 2020-08-19 13:52:18 +06:00
319e43901a several more changes in build.script's 2020-08-19 13:49:30 +06:00
da01955507 pass old way for building of js part 2020-08-19 12:14:28 +06:00
095382040c update travis build config 2020-08-19 00:31:14 +06:00
5545708d38 fix after ktor update 2020-08-19 00:28:16 +06:00
5d06d86549 update ktor version 2020-08-19 00:19:09 +06:00
c081e5c457 add IR compiling 2020-08-19 00:07:55 +06:00
555c2ffa04 try to fix 2020-08-18 20:49:27 +06:00
bcee64c103 try to fix 2020-08-18 20:44:31 +06:00
44a35bd26e upgrade travis config 2020-08-18 13:50:26 +06:00
1f5c719294 deprecations removing and several warnings fixes 2020-08-18 13:45:15 +06:00
6013c3ba86 versions updates 2020-08-18 12:50:11 +06:00
d4551490f7 start 0.28.0 2020-08-18 10:56:05 +06:00
cc0498a89a Update README.md 2020-08-14 23:44:21 +06:00
0b78c0382f Merge branch '0.27.11' 2020-08-14 19:29:16 +06:00
c91426a910 filename created 2020-08-14 19:26:51 +06:00
5d1c59ff75 Merge pull request #97 from InsanusMokrassar/0.27.11
0.27.11
2020-08-14 18:43:51 +06:00
d2228e274c sentMessages extension for FlowsUpdatesFilter 2020-08-13 15:28:10 +06:00
790959ea49 add a lot of extension for FlowUpdatesFilter and Flow 2020-08-13 14:55:21 +06:00
ce9f7f35dc fix scope of one of startGettingOfUpdatesByLongPolling 2020-08-13 13:45:25 +06:00
4f984d1dbc update documentation for FlowsAggregation 2020-08-13 12:53:04 +06:00
c83da6be70 Merge pull request #98 from InsanusMokrassar/renovate/configure
Configure Renovate
2020-08-13 02:24:42 +06:00
Renovate Bot
710438489c Add renovate.json 2020-08-12 20:21:10 +00:00
6f650f6d6c Flow<BaseSentMessageUpdate> extensions 2020-08-13 01:19:12 +06:00
2d15e13ae6 started 0.27.11 2020-08-13 01:08:44 +06:00
d60ee7b8a5 Merge pull request #96 from InsanusMokrassar/0.27.10
0.27.10
2020-08-11 12:58:45 +06:00
8f882e9825 fix links in toc of extensions readme 2020-08-10 20:02:11 +06:00
48e946c2d0 add a simple fix in readme 2020-08-10 20:00:45 +06:00
1758d80020 new telegramBot 2020-08-10 13:38:19 +06:00
63b2bd61b5 add aggregation of flows 2020-08-10 11:53:54 +06:00
ff2c70fc76 FlowsUpdatesFiler extensions 2020-08-10 11:41:46 +06:00
e3bfc4472a includeWebhookHandlingInRouteWithFlows 2020-08-10 10:46:18 +06:00
1cff6f616f start 0.27.10 2020-08-10 10:45:46 +06:00
1dfe4bf276 Merge pull request #95 from InsanusMokrassar/0.27.9
0.27.9
2020-08-06 21:38:39 +06:00
e4b09032cd deprecate PositionedInlineQueryResult 2020-08-03 12:15:59 +06:00
e8e54a0aea add labeler config for versions 2020-08-03 11:46:38 +06:00
8f85b4cba3 versions update 2020-08-03 11:41:14 +06:00
46d65a271d start 0.27.9 2020-07-29 15:38:32 +06:00
e088329ce1 Update README.md 2020-07-20 15:15:06 +06:00
8d9ebb754b Merge pull request #94 from InsanusMokrassar/0.27.8
0.27.8
2020-07-02 16:39:04 +06:00
c0a43077ad optimize imports 2020-07-02 16:15:06 +06:00
1811a63a13 update last added sendVenue 2020-07-02 16:00:38 +06:00
cba0e30710 sendVenue with Location 2020-07-02 15:55:14 +06:00
ff0b7faa48 Foursquare and fixes of deprecations in methods 2020-07-02 00:52:52 +06:00
975898660c TelegramBotAPI Venue and foursquare additions 2020-07-01 23:57:20 +06:00
cfb7f35d20 add several makeLinkToMessage 2020-06-27 10:11:03 +06:00
147889a66a update readme 2020-06-27 09:59:57 +06:00
ed9ed715a0 update defaults for new FlowsUpdatesFilter 2020-06-27 09:51:18 +06:00
a9a3f55c8d refactoring of FlowsUpdatesFilter 2020-06-27 09:44:50 +06:00
58943f2504 small refactor of BaseMessagesUpdatesConversations 2020-06-27 09:31:29 +06:00
5f7633a57e start 0.27.8 2020-06-27 09:30:25 +06:00
65cfc3220d add hierarchy diagram 2020-06-26 19:11:59 +06:00
36d30ef91b Merge pull request #92 from InsanusMokrassar/0.27.7
0.27.7
2020-06-26 17:50:05 +06:00
41e5c579a2 add excluding of CHANGELOG file for labeler 2020-06-26 17:45:16 +06:00
bbf63c51ec Revert "add com.soywiz.korlibs.krypto:krypto dependency"
This reverts commit acfb7066d2.
2020-06-25 15:45:38 +06:00
fb91199f83 Revert "start implement passport"
This reverts commit d76c09ffb2.
2020-06-25 15:45:35 +06:00
d76c09ffb2 start implement passport 2020-06-25 15:45:15 +06:00
acfb7066d2 add com.soywiz.korlibs.krypto:krypto dependency 2020-06-25 12:07:48 +06:00
7507c107b4 add one more flatMatrix 2020-06-24 20:54:22 +06:00
2acb177ad6 first keyboards improvements 2020-06-24 20:51:48 +06:00
b5a14077fd start 0.27.7 2020-06-24 20:25:51 +06:00
5f60bf003f Add useful links 2020-06-07 17:27:20 +06:00
f9b2c4c403 update README 2020-06-05 17:01:37 +06:00
c909774403 Merge pull request #91 from InsanusMokrassar/0.27.6
0.27.6
2020-06-05 15:44:30 +06:00
670cfcca13 update kotlin coroutines 2020-06-05 15:17:14 +06:00
130e00b62b extensions for CommonMessage 2020-06-05 14:57:58 +06:00
ca4beee95f add PossiblySentViaBotCommonMessage and fix error in build 2020-06-05 14:25:19 +06:00
ca784e67df add BuiltInMimeTypes, ThumbedWithMimeTypeInlineQueryResult and buildMimeType factory 2020-06-05 14:01:19 +06:00
835b8b34f9 add via_bot 2020-06-05 13:40:12 +06:00
e6430a729c work on version 0.27.6 has been started 2020-06-05 13:37:11 +06:00
6c4c9f2fc6 by default dokka task will not set up exact folder for docs 2020-06-03 15:42:00 +06:00
310a7e6e82 update docs build gradle to be able to put dokka where it is required 2020-06-03 15:39:54 +06:00
7375894645 Merge pull request #90 from InsanusMokrassar/0.27.5
0.27.5
2020-06-02 22:26:07 +06:00
69973c597b update BotCommandNameRegex 2020-06-02 22:10:33 +06:00
22e8b06fda BotBuilder fixes 2020-06-02 21:18:49 +06:00
7ede53fdbb BotCommandNameRegex and strict check of incoming command 2020-06-02 20:16:55 +06:00
ca9051920d new setMyCommands extension added 2020-06-02 19:54:13 +06:00
b477e8d585 extend getChat extensions 2020-06-02 13:54:30 +06:00
8ae2f57d55 update description of PreviewFeature annotation 2020-06-02 13:47:28 +06:00
1fb2ecf15f executes was replaced 2020-06-02 13:39:09 +06:00
6073d914d5 hotfixes in new media groups shortcuts 2020-06-02 13:22:36 +06:00
16f55d70af resend and other media group utils replaced into TelegramBotAPI_extensions-utils 2020-06-02 13:21:38 +06:00
b484a31a4a replacement of CaptionAndTextSourcesToText 2020-06-02 13:05:15 +06:00
0a162c4129 StringFormattiing replacement 2020-06-02 01:26:46 +06:00
648f1b488b add makeLinkToAddStickerSet 2020-06-02 01:15:08 +06:00
5fbde4bc06 new "row" 2020-06-02 01:02:38 +06:00
2a276d9272 safely function 2020-06-01 12:56:48 +06:00
9ae252717d versions update 2020-06-01 12:00:06 +06:00
456143a266 complete refresh of CaptinAndTextSourcesToText 2020-06-01 11:55:48 +06:00
0bcc98e126 update caption errors 2020-06-01 11:53:33 +06:00
ab9ceba41c updates in caption and text lengths 2020-06-01 11:44:58 +06:00
7cd5666e88 use maxTextLength inside of CaptionAndTextSourcesToText 2020-05-31 22:53:04 +06:00
35dcd6ada7 fix in SendMessage 2020-05-31 22:51:42 +06:00
ec37df82a9 start 0.27.5 2020-05-31 22:43:35 +06:00
220cb47615 update look like of kdocs badge 2020-05-23 15:46:49 +06:00
d79b8a337a add kdocs badge 2020-05-23 15:43:47 +06:00
cef6a6f741 update telegram badge 2020-05-23 15:27:45 +06:00
9471df1f2d Merge pull request #89 from InsanusMokrassar/0.27.4
0.27.4
2020-05-23 15:22:13 +06:00
f121e5f9c3 renames for JVM signature duplication avoiding 2020-05-23 12:53:42 +06:00
7f4fe318c5 update filters 2020-05-22 16:40:30 +06:00
dbf5c2dbb2 update publish scripts 2020-05-22 14:03:48 +06:00
105415873d updates extensions 2020-05-22 13:21:22 +06:00
ff32fd1dfc 0.27.4 started 2020-05-22 12:56:50 +06:00
006251ed07 fixes 2020-05-17 15:10:02 +06:00
9307582654 Add TelegramBotAPI-all status to readme 2020-05-17 01:30:05 +06:00
fe11a2119e Return opts in telegram bot api 2020-05-16 22:24:50 +06:00
c31403c1a2 Merge pull request #88 from InsanusMokrassar/0.27.3
0.27.3
2020-05-16 22:07:56 +06:00
0260e7bedc fixes of warnings 2020-05-16 22:02:57 +06:00
fa43a55f26 one more update of labeler 2020-05-16 21:54:54 +06:00
e9e1f4b9cf Merge branch 'master' into 0.27.3 2020-05-16 21:24:14 +06:00
e7b5b9184d update rules for labelers 2020-05-16 21:22:37 +06:00
81aa3f2307 update labeler task 2020-05-16 21:19:38 +06:00
a9fe584504 add TOC for TelegramBotAPI-extensions-utils 2020-05-16 21:14:10 +06:00
4c8861ba79 change visibility of internalSetWebhookInfoAndStartListenWebhooks 2020-05-16 20:57:57 +06:00
0ec18cbf06 dice changes 2020-05-16 20:46:49 +06:00
7008f312dc fixes 2020-05-16 20:43:09 +06:00
85317a510e update docs 2020-05-16 11:09:31 +06:00
d629aa206e fixes 2020-05-15 22:14:19 +06:00
6394e1a52b setWebhookInfo 2020-05-15 22:02:53 +06:00
23dca3d307 small grammar fix in WebhookInfo 2020-05-15 19:19:30 +06:00
3032aa8474 renaming of telegramBot functions 2020-05-15 19:14:09 +06:00
db19b69ca0 fails handler in executeUnsafe 2020-05-15 19:04:10 +06:00
f3827f81a7 change mechanism of executeUnsafe 2020-05-15 18:59:42 +06:00
0532dbb1ae fixes 2020-05-15 18:39:12 +06:00
efc2681da8 add additional signatures for setWebhookInfoAndStartListenWebhooks 2020-05-15 18:35:16 +06:00
735ed9fd86 change flowsUpdatesFilter signature 2020-05-15 18:31:49 +06:00
e856dc4754 add flowsUdatesFilter 2020-05-15 18:17:55 +06:00
0706ff1f95 Update labeler.yml 2020-05-15 18:06:29 +06:00
336b830b0b Merge branch 'master' into 0.27.3 2020-05-15 18:05:57 +06:00
1a638fe0a5 update labeler
one more update of labeler
2020-05-15 18:05:00 +06:00
45467e5bd7 Create labeler.yml 2020-05-15 18:05:00 +06:00
8419b0ab6a Create label.yml 2020-05-15 18:05:00 +06:00
49573607fb Create greetings.yml 2020-05-15 18:05:00 +06:00
35fe48db35 Create labeler.yml 2020-05-15 17:05:53 +06:00
590db3e672 Create label.yml 2020-05-15 17:02:33 +06:00
ea40474c47 add opportunity to set up media groups devounce time 2020-05-15 16:53:21 +06:00
7354389f2d Create greetings.yml 2020-05-15 15:49:10 +06:00
1f20ae16aa Update README.md 2020-05-15 00:54:00 +06:00
095c91bf39 update readmes with updates handling 2020-05-15 00:48:34 +06:00
dc173d752c optimize imports 2020-05-15 00:29:17 +06:00
a1788e35b2 clean up in webhooks 2020-05-15 00:28:16 +06:00
ea224fd765 add javax.activation dependency 2020-05-14 21:18:33 +06:00
7f51544bb9 Fix links in TelegramBotAPI-all readme 2020-05-14 16:25:39 +06:00
dfb22b0e89 update readme of all includer 2020-05-14 14:26:42 +06:00
e675e841da update urls 2020-05-14 14:23:26 +06:00
dea43aad8e update subprojects implementation types 2020-05-14 14:11:33 +06:00
52e25e934d add TelegramBotAPI-all 2020-05-14 14:07:23 +06:00
acc067585d add build instructions in README 2020-05-14 13:44:18 +06:00
47aa1a0795 fixes in CHANGELOG and docs 2020-05-14 13:26:56 +06:00
b40cc0c1ea fixes 2020-05-14 13:11:46 +06:00
b5632626ad small extention docs for RequestsExecutor 2020-05-14 12:21:38 +06:00
67fafdac00 add docs for RequestsExecutor 2020-05-14 12:14:38 +06:00
738e628a89 small change of deprecations message 2020-05-13 23:25:22 +06:00
420b846466 replace long polling and webhook tools 2020-05-13 23:22:35 +06:00
05e8c9c90d replace webhooks work into api subproject 2020-05-13 21:21:07 +06:00
e776c5182f additional setWebhook 2020-05-13 20:56:03 +06:00
be5b3745b9 extension was added 2020-05-13 20:01:58 +06:00
0de1d9cfda UpdateDeserializationStrategy currently is public 2020-05-13 19:53:27 +06:00
01da98d2fe start 0.27.3 2020-05-13 19:48:07 +06:00
e985100c21 Update README.md 2020-05-13 19:41:46 +06:00
671faabef9 add telegramBot function 2020-05-12 18:52:37 +06:00
bb9c9e22a2 remove dokka docs from github 2020-05-12 00:14:16 +06:00
42228f0eaa Merge pull request #86 from InsanusMokrassar/0.27.2
0.27.2
2020-05-11 23:42:17 +06:00
dafd0a8ece add docs 2020-05-11 23:37:38 +06:00
bee9d82372 update folder of dokka 2020-05-11 23:24:26 +06:00
ec6cf0f029 docs 2020-05-11 20:44:03 +06:00
9cee22165d start normal filling of docs 2020-05-11 20:32:14 +06:00
a58aad1198 update docs generation 2020-05-11 13:56:45 +06:00
aa78d99179 add docs project 2020-05-11 01:09:07 +06:00
603efe9259 small update of utils readme 2020-05-10 16:40:53 +06:00
21e3e10222 renames 2020-05-10 16:33:44 +06:00
34eb6eb4bf add ChatEventsConversations and refill README of telegramboapi-extensions-utils 2020-05-10 16:25:42 +06:00
565a724b9c remove todo from thumbed input media 2020-05-10 15:30:23 +06:00
e87c4a0126 MediaGroupMemberInputMedia deserialization 2020-05-10 15:26:07 +06:00
9b16d5d82b add MimeType 2020-05-10 14:37:55 +06:00
9747c8bff1 warnings fixes 2020-05-09 21:04:56 +06:00
3ee84700f4 update versions 2020-05-09 20:57:55 +06:00
04a463f42c start 0.27.2 2020-05-09 20:52:52 +06:00
668a201789 Merge pull request #85 from InsanusMokrassar/0.27.1
0.27.1
2020-04-25 10:12:53 +06:00
b336b17eef FullTextSourcesList 2020-04-25 09:57:59 +06:00
76b25d719a explanation small utils and explanationLimit 2020-04-25 09:48:23 +06:00
a4d077dd17 add Explained interface and use it in polls 2020-04-25 09:41:04 +06:00
469712150b started 0.27.1 2020-04-25 09:26:10 +06:00
fad27ede78 Merge pull request #84 from InsanusMokrassar/0.27.0
0.27.0
2020-04-24 21:25:11 +06:00
1de90412b3 addition in changelog 2020-04-24 21:24:24 +06:00
215c8793e1 optimize imports 2020-04-24 20:25:53 +06:00
54835f97d1 update TelegramBotAPI utils readme 2020-04-24 20:23:25 +06:00
923e929670 update TelegramBotAPI readme 2020-04-24 20:16:12 +06:00
37488e92e6 utils ScheduledCloseInfo shortcuts 2020-04-24 20:01:20 +06:00
830ca8122d add openPeriodPollSecondsLimit and checks 2020-04-24 19:46:47 +06:00
fbb2758bdb update changelog 2020-04-24 19:26:57 +06:00
a5c3e06f1c remove List<TextPart> extensions for texts due to JVM signature conflict and actualize TelegramBotAPI-extensions-api 2020-04-24 19:24:49 +06:00
c6fb50c4a6 SendPoll#closeInfo functionality 2020-04-24 19:08:54 +06:00
976c0b86dc send quiz poll functionality 2020-04-24 18:46:26 +06:00
fee5d8f925 texts and captions utils 2020-04-24 18:44:04 +06:00
808746e12d Dice#emoji support 2020-04-24 18:25:47 +06:00
3fb80dd475 add support of income explanation functionality in polls and polls auto close functionality 2020-04-24 17:51:09 +06:00
db8ea0da94 update versions 2020-04-24 16:18:07 +06:00
fbdfb714a3 started 0.27.0 2020-04-24 16:13:02 +06:00
1facfbc2b7 Merge pull request #83 from InsanusMokrassar/0.26.4
0.26.4
2020-04-22 15:08:35 +06:00
914a0662a9 CallbackGameInlineKeyboardButton now have only one income parameter 2020-04-22 14:11:46 +06:00
eda3003b7d change the way how we are deserializing updates in webhooks 2020-04-22 13:20:15 +06:00
459942de36 webhook update handling enhancement 2020-04-22 13:16:46 +06:00
17f64f9b48 CallbackGame update 2020-04-22 13:08:05 +06:00
3f896c2240 fix not implemented error thrown 2020-04-22 13:05:57 +06:00
94f8c971c5 started 0.26.4 2020-04-22 13:01:17 +06:00
c43109c063 Update README.md 2020-04-17 15:52:47 +06:00
f6058e29b4 Update README.md 2020-04-17 15:52:28 +06:00
3a37311331 Update README.md 2020-04-17 15:52:03 +06:00
9fe1472e64 update readme for help on JS platform 2020-04-17 15:43:43 +06:00
f1480c40a7 Merge pull request #81 from InsanusMokrassar/0.26.3
0.26.3
2020-04-13 12:55:48 +06:00
88eebdc448 small optimization of updates polling exception handling 2020-04-13 12:53:02 +06:00
8c76283db5 suspend inline function handleSafely was added 2020-04-13 12:40:14 +06:00
7668c48081 BaseEditMessageUpdate#data now is CommonMessage 2020-04-13 12:09:59 +06:00
35d2135f73 update serialization of InlineKeyboardButton 2020-04-13 11:31:36 +06:00
1cb0e096be fixes in InlineKeyboardButtonSerializer 2020-04-13 11:20:39 +06:00
31f7c7f31b UnknownUpdateType even if serialization exception 2020-04-13 11:17:15 +06:00
82d3b3bc48 add UnknownInlineKeyboardButton 2020-04-13 11:11:09 +06:00
b3734a5c2a fix of changelog 2020-04-13 01:46:58 +06:00
55b8736d50 Merge pull request #80 from Djaler/inline-keyboard-button-callback-game
Add support for inline keyboard buttons with callback_game field
2020-04-13 01:40:52 +06:00
3334fd3ca6 started 0.26.3 2020-04-13 01:39:31 +06:00
Kirill Romanov
e2416b405a add support for inline keyboard buttons with callback_game field 2020-04-12 22:30:37 +03:00
14f012fbfa Update README.md 2020-04-09 01:24:55 +06:00
1ff55057f2 Merge pull request #78 from InsanusMokrassar/0.26.2
0.26.2
2020-04-08 16:48:00 +06:00
71b5e33dbc update common README 2020-04-08 15:28:03 +06:00
08d9d183f4 add filterCommandsWithArgs 2020-04-08 15:23:12 +06:00
7183634fd6 experimentally make source string available inside of text sources 2020-04-08 15:17:13 +06:00
cf9f270651 rename new getting updates extension to avoid JVM signature collisions 2020-04-08 14:56:56 +06:00
bd87938e9c fixes in UpdatesChatFilters 2020-04-08 14:51:26 +06:00
ba76eaeb90 update readmes 2020-04-08 14:34:55 +06:00
d8492ae168 fixes, new readme 2020-04-08 14:02:55 +06:00
0db85232d3 fixes in changelog 2020-04-08 13:20:48 +06:00
bcf2325be8 make new startGettingOfUpdates more useful 2020-04-08 13:19:19 +06:00
51174a13de added some of extensions in TelegramBotAPI-extensions-utils 2020-04-08 11:50:47 +06:00
dfc1fa4d7e refill of changelog 2020-04-08 11:11:31 +06:00
10a1d1cb38 add TelegramBotAPI-extensions-utils 2020-04-08 11:05:48 +06:00
6c39dc4d06 new startGettingOfUpdates extension 2020-04-08 10:44:44 +06:00
4877b8958e start 0.26.2 2020-04-08 10:37:05 +06:00
db9c460e66 Merge pull request #75 from InsanusMokrassar/0.26.1
0.26.1
2020-04-06 12:15:27 +06:00
1103 changed files with 26744 additions and 10237 deletions

11
.github/dependabot.yml vendored Normal file
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"

10
.github/labeler.yml vendored Normal file
View File

@@ -0,0 +1,10 @@
api: "TelegramBotAPI-extensions-api/**"
utils: "TelegramBotAPI-extensions-utils/**"
core: "TelegramBotAPI/**" # currently not work
code: "**/*.kt"
gradle: "**/*.gradle"
versions: "**/gradle.properties"
markdown:
- "**/*.md"
- "!CHANGELOG.md"

2
.github/pull_request_template.md vendored Normal file
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)

13
.github/workflows/greetings.yml vendored Normal file
View File

@@ -0,0 +1,13 @@
name: Greetings
on: [pull_request, issues]
jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: 'Welcome with your first issue'
pr-message: 'Welcome with your first PullRequest'

21
.github/workflows/kdocs.yml vendored Normal file
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: 1.8
- 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

18
.github/workflows/label.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler/blob/master/README.md
name: "Pull Request Labeler"
on:
- pull_request
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

View File

@@ -0,0 +1,23 @@
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: 1.8
- 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
run: ./gradlew publishAllPublicationsToGithubPackagesRepository --no-parallel -x signJsPublication -x signJvmPublication -x signKotlinMultiplatformPublication -x signMetadataPublication
env:
GITHUBPACKAGES_USER: ${{ github.actor }}
GITHUBPACKAGES_PASSWORD: ${{ secrets.GITHUB_TOKEN }}

3
.gitignore vendored
View File

@@ -8,3 +8,6 @@ settings.xml
.gradle/
build/
out/
local.properties
secret.gradle

View File

@@ -5,6 +5,11 @@ os: linux
dist: trusty
jdk: oraclejdk8
script:
- ./gradlew build -s
jobs:
include:
- stage: build
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

File diff suppressed because it is too large Load Diff

10
CONTRIBUTING.md Normal file
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:)

127
README.md
View File

@@ -1,27 +1,118 @@
[Participate in our common survey ☺](https://forms.gle/q6Xf8K3fD1pPsYUw9)
# TelegramBotAPI
| Common info | [![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin) [![Chat in Telegram](badges/chat.svg)](https://t.me/InMoTelegramBotAPI) [![Build Status](https://travis-ci.com/InsanusMokrassar/TelegramBotAPI.svg?branch=master)](https://travis-ci.com/InsanusMokrassar/TelegramBotAPI) |
| -----------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| TelegramBotAPI 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) |
| 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) |
Hello! This is a set of libraries for working with Telegram Bot API.
| Common info | [![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin) [![Build Status](https://github.com/InsanusMokrassar/TelegramBotAPI/workflows/Build/badge.svg)](https://github.com/InsanusMokrassar/TelegramBotAPI/actions) [Small survey](https://forms.gle/2Hex2ynbHWHhi1KY7)|
| -------------------------------------:|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Useful links | [![Chat in Telegram](badges/chat.svg)](https://t.me/InMoTelegramBotAPI) [![Create bot](badges/template.svg)](https://github.com/InsanusMokrassar/TelegramBotAPI-bot_template/generate) [![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 | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.core) |
| TelegramBotAPI API Extensions status | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.api/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.api) |
| TelegramBotAPI Util Extensions status | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.utils/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.utils) |
| TelegramBotAPI Behaviour Builder Extensions status | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.behaviour_builder/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi.extensions.behaviour_builder) |
| TelegramBotAPI All status | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/tgbotapi) |
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:
## Examples
* [TelegramBotAPI](TelegramBotAPI/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
There are several things you need to do to launch examples below:
Most part of some specific solves or unuseful
moments are describing by official [Telegram Bot API](https://core.telegram.org/bots/api).
* 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)
## Ok, where should I start?
More including instructions [available here](https://github.com/InsanusMokrassar/TelegramBotAPI/wiki/Including-in-your-project).
Other configuration examples:
Firstly, look at the [TelegramBotAPI](TelegramBotAPI/README.md). Here you can find all information about currently
covered Telegram Bot API and other things. After this you can look at the
[TelegramBotAPI Extensions](TelegramBotAPI-extensions-api/README.md).
* [For multiplatform](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/tree/master/ResenderBot)
* [For JVM](https://github.com/InsanusMokrassar/TelegramBotAPI-examples/blob/master/GetMeBot/build.gradle)
Anyway, all libraries are very typical inside of them. For example, any request in TelegramBotAPI look like
`requestsExecutor.execute(SomeRequest())`.
### Most common example
```kotlin
suspend fun main() {
val bot = telegramBot(TOKEN)
bot.buildBehaviour {
println(getMe())
onCommand("start") {
reply(it, "Hi:)")
}
}.join()
}
```
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`
### Handling only last messages
```kotlin
suspend fun main() {
val bot = telegramBot(TOKEN)
val flowsUpdatesFilter = FlowsUpdatesFilter()
bot.buildBehaviour(flowUpdatesFilter = flowsUpdatesFilter) {
println(getMe())
onCommand("start") {
reply(it, "Hi:)")
}
retrieveAccumulatedUpdates(this).join()
}
}
```
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.buildBehaviour {
println(getMe())
val nameReplyMarkup = ReplyKeyboardMarkup(
matrix {
row {
+SimpleKeyboardButton("nope")
}
}
)
onCommand("start") {
val photo = waitPhoto(
SendTextMessage(it.chat.id, "Send me your photo please")
).first()
val name = waitText(
SendTextMessage(
it.chat.id,
"Send me your name or choose \"nope\"",
replyMarkup = nameReplyMarkup
)
).first().text.takeIf { it != "nope" }
sendPhoto(
it.chat,
photo.mediaCollection,
entities = buildEntities {
if (name != null) regular(name) // may be collapsed up to name ?.let(::regular)
}
)
}
}.join()
}
```
### More examples
You may find examples in [this project](https://github.com/InsanusMokrassar/TelegramBotAPI-examples). Besides, you are
always welcome in our [wiki](https://github.com/InsanusMokrassar/TelegramBotAPI/wiki/About-this-project) and
[chat](https://t.me/InMoTelegramBotAPIChat).

View File

@@ -1,101 +0,0 @@
# TelegramBotAPI extensions
[![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin)
[![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)
[![Build Status](https://jenkins.insanusmokrassar.com/buildStatus/icon?job=TelegramBotAPI-extensions-api_master__publishing)](https://jenkins.insanusmokrassar.com/job/TelegramBotAPI-extensions-api_master__publishing/)
## What is it?
It is wrapper library for [TelegramBotAPI](../TelegramBotAPI/README.md). Here you can find extensions for
`RequestsExecutor`, which are more look like Telegram Bot API requests and in the same time have more obvious signatures
to help understand some restrictions in Telegram system.
## Compatibility
This library always compatible with original `TelegramBotAPI` library version
## How to implement library?
Common ways to implement this library are presented here. In some cases it will require additional steps
like inserting of additional libraries (like `kotlin stdlib`). In the examples will be used variable
`telegrambotapi-extensions-api.version`, which must be set up by developer. Available versions are presented on
[bintray](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI-extensions-api), next version is last published:
[![Download](https://api.bintray.com/packages/insanusmokrassar/StandardRepository/TelegramBotAPI-extensions-api/images/download.svg) ](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI-extensions-api/_latestVersion)
### Maven
Dependency config presented here:
```xml
<dependency>
<groupId>com.github.insanusmokrassar</groupId>
<artifactId>TelegramBotAPI-extensions-api</artifactId>
<version>${telegrambotapi-extensions-api.version}</version>
</dependency>
```
### Gradle
To use last versions you will need to add one line in repositories block of your `build.gradle`:
`jcenter()` or `mavenCentral()`
And add next line to your dependencies block:
```groovy
implementation "com.github.insanusmokrassar:TelegramBotAPI-extensions-api:$telegrambotapi_extensions_api_version"
```
or for old gradle:
```groovy
compile "com.github.insanusmokrassar:TelegramBotAPI-extensions-api:$telegrambotapi_extensions_api_version"
```
## Example of usage and comparison with `TelegramBotAPI`
Here presented review table for comparison of api from original [TelegramBotAPI](../TelegramBotAPI/README.md#Requests)
and extensions-api library:
In all examples supposed that you have created bot with next approximate lines:
```kotlin
val bot: RequestsExecutor = ...
```
| TelegramBotAPI | TelegramBotAPI-extensions-api |
|----------------|-------------------------------|
| bot.execute(GetMe) | bot.getMe() |
| bot.execute(SendTextMessage(someChatId, text)) | bot.sendTextMessage(chat, text) |
## Updates
Usually, it is more comfortable to use filter object to get separated types of updates:
```kotlin
val filter = FlowsUpdatesFilter(100)
```
In this case you will be able:
* Separate types of incoming updates (even media groups)
* Simplify launch of getting updates:
```kotlin
bot.startGettingOfUpdates(
filter,
scope = CoroutineScope(Dispatchers.Default)
)
```
* Use `filter` flows to comfortable filter, map and do other operations with the whole
getting updates process:
```kotlin
filter.messageFlow.mapNotNull {
it.data as? ContentMessage<*>
}.onEach {
println(it)
}.launchIn(
CoroutineScope(Dispatchers.Default)
)
```

View File

@@ -1,57 +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.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
description "API extensions which provide work with RequestsExecutor of TelegramBotAPI almost like it is described in original Telegram Bot API reference"
name "Telegram Bot API Extensions for API"
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"
}
}
}
}
}
}

View File

@@ -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 Extensions for API","description":"API extensions which provide work with RequestsExecutor of TelegramBotAPI almost like it is described in original Telegram Bot API reference","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"}

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

View File

@@ -1,28 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.DeleteMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
suspend fun RequestsExecutor.deleteMessage(
chatId: ChatIdentifier,
messageId: MessageIdentifier
) = execute(
DeleteMessage(chatId, messageId)
)
suspend fun RequestsExecutor.deleteMessage(
chat: Chat,
messageId: MessageIdentifier
) = deleteMessage(chat.id, messageId)
suspend fun RequestsExecutor.deleteMessage(
message: Message
) = deleteMessage(message.chat, message.messageId)
suspend fun Message.delete(
requestsExecutor: RequestsExecutor
) = requestsExecutor.deleteMessage(this)

View File

@@ -1,10 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot.getMe
@Deprecated(
"Replaced",
ReplaceWith("getMe", "com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot.GetMeKt.getMe")
)
suspend fun RequestsExecutor.getMe() = getMe()

View File

@@ -1,135 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.LiveLocation.editLiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.LiveLocation.stopLiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendLocation
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.LocationContent
import com.soywiz.klock.DateTime
import com.soywiz.klock.TimeSpan
import io.ktor.utils.io.core.Closeable
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
import kotlin.math.ceil
private val livePeriodDelayMillis = (livePeriodLimit.last - 60L) * 1000L
class LiveLocation internal constructor(
private val requestsExecutor: RequestsExecutor,
scope: CoroutineScope,
autoCloseTimeDelay: Double,
initMessage: ContentMessage<LocationContent>
) : Closeable {
private val doWhenClose = {
scope.launch {
requestsExecutor.stopLiveLocation(message)
}
}
private val autoCloseTime = DateTime.now() + TimeSpan(autoCloseTimeDelay)
val leftUntilCloseMillis: TimeSpan
get() = autoCloseTime - DateTime.now()
var isClosed: Boolean = false
private set
get() = field || leftUntilCloseMillis.millisecondsLong < 0L
private var message: ContentMessage<LocationContent> = initMessage
val lastLocation: Location
get() = message.content.location
suspend fun updateLocation(
location: Location,
replyMarkup: InlineKeyboardMarkup? = null
): Location {
if (!isClosed) {
message = requestsExecutor.editLiveLocation(
message,
location,
replyMarkup
)
return lastLocation
} else {
error("LiveLocation is closed")
}
}
override fun close() {
if (isClosed) {
return
}
isClosed = true
doWhenClose()
}
}
suspend fun RequestsExecutor.startLiveLocation(
scope: CoroutineScope,
chatId: ChatIdentifier,
latitude: Double,
longitude: Double,
liveTimeMillis: Long = livePeriodDelayMillis,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): LiveLocation {
val liveTimeAsDouble = liveTimeMillis.toDouble()
val locationMessage = execute(
SendLocation(
chatId,
latitude,
longitude,
ceil(liveTimeAsDouble / 1000).toLong(),
disableNotification,
replyToMessageId,
replyMarkup
)
)
return LiveLocation(
this,
scope,
liveTimeAsDouble,
locationMessage
)
}
suspend fun RequestsExecutor.startLiveLocation(
scope: CoroutineScope,
chat: Chat,
latitude: Double,
longitude: Double,
liveTimeMillis: Long = livePeriodDelayMillis,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): LiveLocation = startLiveLocation(
scope, chat.id, latitude, longitude, liveTimeMillis, disableNotification, replyToMessageId, replyMarkup
)
suspend fun RequestsExecutor.startLiveLocation(
scope: CoroutineScope,
chatId: ChatId,
location: Location,
liveTimeMillis: Long = livePeriodDelayMillis,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): LiveLocation = startLiveLocation(
scope, chatId, location.latitude, location.longitude, liveTimeMillis, disableNotification, replyToMessageId, replyMarkup
)
suspend fun RequestsExecutor.startLiveLocation(
scope: CoroutineScope,
chat: Chat,
location: Location,
liveTimeMillis: Long = livePeriodDelayMillis,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
): LiveLocation = startLiveLocation(
scope, chat.id, location.latitude, location.longitude, liveTimeMillis, disableNotification, replyToMessageId, replyMarkup
)

View File

@@ -1,34 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.StopPoll
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
suspend fun RequestsExecutor.stopPoll(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
StopPoll(chatId, messageId, replyMarkup)
)
suspend fun RequestsExecutor.stopPoll(
chat: Chat,
messageId: MessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = stopPoll(chat.id, messageId, replyMarkup)
suspend fun RequestsExecutor.stopPoll(
chatId: ChatId,
message: Message,
replyMarkup: InlineKeyboardMarkup? = null
) = stopPoll(chatId, message.messageId, replyMarkup)
suspend fun RequestsExecutor.stopPoll(
chat: Chat,
message: Message,
replyMarkup: InlineKeyboardMarkup? = null
) = stopPoll(chat.id, message.messageId, replyMarkup)

View File

@@ -1,22 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.answers
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.answers.AnswerCallbackQuery
import com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQuery.CallbackQuery
import com.github.insanusmokrassar.TelegramBotAPI.types.CallbackQueryIdentifier
suspend fun RequestsExecutor.answerCallbackQuery(
callbackQueryId: CallbackQueryIdentifier,
text: String? = null,
showAlert: Boolean? = null,
url: String? = null,
cachedTimeSeconds: Int? = null
) = execute(AnswerCallbackQuery(callbackQueryId, text, showAlert, url, cachedTimeSeconds))
suspend fun RequestsExecutor.answerCallbackQuery(
callbackQuery: CallbackQuery,
text: String? = null,
showAlert: Boolean? = null,
url: String? = null,
cachedTimeSeconds: Int? = null
) = answerCallbackQuery(callbackQuery.id, text, showAlert, url, cachedTimeSeconds)

View File

@@ -1,23 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.answers.payments
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.answers.payments.AnswerPreCheckoutQueryError
import com.github.insanusmokrassar.TelegramBotAPI.requests.answers.payments.AnswerPreCheckoutQueryOk
import com.github.insanusmokrassar.TelegramBotAPI.types.PreCheckoutQueryId
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.PreCheckoutQuery
suspend fun RequestsExecutor.answerPreCheckoutQueryOk(
id: PreCheckoutQueryId
) = execute(AnswerPreCheckoutQueryOk(id))
suspend fun RequestsExecutor.answerPreCheckoutQueryOk(
preCheckoutQuery: PreCheckoutQuery
) = answerPreCheckoutQueryOk(preCheckoutQuery.id)
suspend fun RequestsExecutor.answerPreCheckoutQueryError(
id: PreCheckoutQueryId,
error: String
) = execute(AnswerPreCheckoutQueryError(id, error))
suspend fun RequestsExecutor.answerPreCheckoutQueryError(
preCheckoutQuery: PreCheckoutQuery,
error: String
) = answerPreCheckoutQueryError(preCheckoutQuery.id, error)

View File

@@ -1,28 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.answers.payments
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.answers.payments.AnswerShippingQueryError
import com.github.insanusmokrassar.TelegramBotAPI.requests.answers.payments.AnswerShippingQueryOk
import com.github.insanusmokrassar.TelegramBotAPI.types.ShippingQueryIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.ShippingOption
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.ShippingQuery
suspend fun RequestsExecutor.answerShippingQueryOk(
id: ShippingQueryIdentifier,
shippingOptions: List<ShippingOption>
) = execute(AnswerShippingQueryOk(id, shippingOptions))
suspend fun RequestsExecutor.answerShippingQueryOk(
shippingQuery: ShippingQuery,
shippingOptions: List<ShippingOption>
) = answerShippingQueryOk(shippingQuery.id, shippingOptions)
suspend fun RequestsExecutor.answerShippingQueryError(
id: ShippingQueryIdentifier,
error: String
) = execute(AnswerShippingQueryError(id, error))
suspend fun RequestsExecutor.answerShippingQueryError(
shippingQuery: ShippingQuery,
error: String
) = answerShippingQueryError(shippingQuery.id, error)

View File

@@ -1,6 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.bot.GetMe
suspend fun RequestsExecutor.getMe() = execute(GetMe)

View File

@@ -1,6 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.bot.GetMyCommands
suspend fun RequestsExecutor.getMyCommands() = execute(GetMyCommands)

View File

@@ -1,9 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.bot
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.bot.SetMyCommands
import com.github.insanusmokrassar.TelegramBotAPI.types.BotCommand
suspend fun RequestsExecutor.setMyCommands(
commands: List<BotCommand>
) = execute(SetMyCommands(commands))

View File

@@ -1,14 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.ExportChatInviteLink
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.exportChatInviteLink(
chatId: ChatIdentifier
) = execute(ExportChatInviteLink(chatId))
suspend fun RequestsExecutor.exportChatInviteLink(
chat: PublicChat
) = exportChatInviteLink(chat.id)

View File

@@ -1,14 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.LeaveChat
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.leaveChat(
chatId: ChatIdentifier
) = execute(LeaveChat(chatId))
suspend fun RequestsExecutor.leaveChat(
chat: PublicChat
) = leaveChat(chat.id)

View File

@@ -1,14 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.get
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get.GetChat
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
suspend fun RequestsExecutor.getChat(
chatId: ChatIdentifier
) = execute(GetChat(chatId))
suspend fun RequestsExecutor.getChat(
chat: Chat
) = getChat(chat.id)

View File

@@ -1,14 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.get
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get.GetChatAdministrators
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.getChatAdministrators(
chatId: ChatIdentifier
) = execute(GetChatAdministrators(chatId))
suspend fun RequestsExecutor.getChatAdministrators(
chat: PublicChat
) = getChatAdministrators(chat.id)

View File

@@ -1,14 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.get
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.get.GetChatMembersCount
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.getChatMembersCount(
chatId: ChatIdentifier
) = execute(GetChatMembersCount(chatId))
suspend fun RequestsExecutor.getChatMembersCount(
chat: PublicChat
) = getChatMembersCount(chat.id)

View File

@@ -1,26 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.members
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members.GetChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.getChatMember(
chatId: ChatIdentifier,
userId: UserId
) = execute(GetChatMember(chatId, userId))
suspend fun RequestsExecutor.getChatMember(
chat: PublicChat,
userId: UserId
) = getChatMember(chat.id, userId)
suspend fun RequestsExecutor.getChatMember(
chatId: ChatId,
user: User
) = getChatMember(chatId, user.id)
suspend fun RequestsExecutor.getChatMember(
chat: PublicChat,
user: User
) = getChatMember(chat.id, user.id)

View File

@@ -1,30 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.members
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members.KickChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.kickChatMember(
chatId: ChatIdentifier,
userId: UserId,
untilDate: TelegramDate? = null
) = execute(KickChatMember(chatId, userId, untilDate))
suspend fun RequestsExecutor.kickChatMember(
chat: PublicChat,
userId: UserId,
untilDate: TelegramDate? = null
) = kickChatMember(chat.id, userId, untilDate)
suspend fun RequestsExecutor.kickChatMember(
chatId: ChatId,
user: User,
untilDate: TelegramDate? = null
) = kickChatMember(chatId, user.id, untilDate)
suspend fun RequestsExecutor.kickChatMember(
chat: PublicChat,
user: User,
untilDate: TelegramDate? = null
) = kickChatMember(chat.id, user.id, untilDate)

View File

@@ -1,30 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.members
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members.SetChatAdministratorCustomTitle
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.setChatAdministratorCustomTitle(
chatId: ChatId,
userId: UserId,
customTitle: String
) = execute(SetChatAdministratorCustomTitle(chatId, userId, customTitle))
suspend fun RequestsExecutor.setChatAdministratorCustomTitle(
chat: PublicChat,
userId: UserId,
customTitle: String
) = setChatAdministratorCustomTitle(chat.id, userId, customTitle)
suspend fun RequestsExecutor.setChatAdministratorCustomTitle(
chatId: ChatId,
user: User,
customTitle: String
) = setChatAdministratorCustomTitle(chatId, user.id, customTitle)
suspend fun RequestsExecutor.setChatAdministratorCustomTitle(
chat: PublicChat,
user: User,
customTitle: String
) = setChatAdministratorCustomTitle(chat.id, user.id, customTitle)

View File

@@ -1,27 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.members
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.members.UnbanChatMember
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.unbanChatMember(
chatId: ChatIdentifier,
userId: UserId
) = execute(UnbanChatMember(chatId, userId))
suspend fun RequestsExecutor.unbanChatMember(
chat: PublicChat,
userId: UserId
) = unbanChatMember(chat.id, userId)
suspend fun RequestsExecutor.unbanChatMember(
chatId: ChatId,
user: User
) = unbanChatMember(chatId, user.id)
suspend fun RequestsExecutor.unbanChatMember(
chat: PublicChat,
user: User
) = unbanChatMember(chat.id, user.id)

View File

@@ -1,14 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.modify
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.DeleteChatPhoto
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.deleteChatPhoto(
chatId: ChatIdentifier
) = execute(DeleteChatPhoto(chatId))
suspend fun RequestsExecutor.deleteChatPhoto(
chat: PublicChat
) = deleteChatPhoto(chat.id)

View File

@@ -1,29 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.modify
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.PinChatMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
suspend fun RequestsExecutor.pinChatMessage(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
disableNotification: Boolean = false
) = execute(PinChatMessage(chatId, messageId, disableNotification))
suspend fun RequestsExecutor.pinChatMessage(
chat: PublicChat,
messageId: MessageIdentifier,
disableNotification: Boolean = false
) = pinChatMessage(chat.id, messageId, disableNotification)
suspend fun RequestsExecutor.pinChatMessage(
message: Message,
disableNotification: Boolean = false
) = if (message.chat is PublicChat) {
pinChatMessage(message.chat.id, message.messageId, disableNotification)
} else {
error("It is possible to pin messages only in non one-to-one chats")
}

View File

@@ -1,16 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.modify
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.SetChatDescription
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.setChatDescription(
chatId: ChatIdentifier,
description: String
) = execute(SetChatDescription(chatId, description))
suspend fun RequestsExecutor.setChatDescription(
chat: PublicChat,
description: String
) = setChatDescription(chat.id, description)

View File

@@ -1,17 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.modify
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.SetChatPermissions
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.ChatPermissions
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.setDefaultChatMembersPermissions(
chatId: ChatIdentifier,
permissions: ChatPermissions
) = execute(SetChatPermissions(chatId, permissions))
suspend fun RequestsExecutor.setDefaultChatMembersPermissions(
chat: PublicChat,
permissions: ChatPermissions
) = setDefaultChatMembersPermissions(chat.id, permissions)

View File

@@ -1,17 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.modify
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.SetChatPhoto
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.setChatPhoto(
chatId: ChatIdentifier,
photo: MultipartFile
) = execute(SetChatPhoto(chatId, photo))
suspend fun RequestsExecutor.setChatPhoto(
chat: PublicChat,
photo: MultipartFile
) = setChatPhoto(chat.id, photo)

View File

@@ -1,16 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.modify
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.SetChatTitle
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.setChatTitle(
chatId: ChatIdentifier,
title: String
) = execute(SetChatTitle(chatId, title))
suspend fun RequestsExecutor.setChatTitle(
chat: PublicChat,
title: String
) = setChatTitle(chat.id, title)

View File

@@ -1,14 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.modify
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.modify.UnpinChatMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.PublicChat
suspend fun RequestsExecutor.unpinChatMessage(
chatId: ChatIdentifier
) = execute(UnpinChatMessage(chatId))
suspend fun RequestsExecutor.unpinChatMessage(
chat: PublicChat
) = unpinChatMessage(chat.id)

View File

@@ -1,14 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.stickers
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.stickers.DeleteChatStickerSet
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.SupergroupChat
suspend fun RequestsExecutor.deleteChatStickerSet(
chatId: ChatIdentifier
) = execute(DeleteChatStickerSet(chatId))
suspend fun RequestsExecutor.deleteChatStickerSet(
chat: SupergroupChat
) = deleteChatStickerSet(chat.id)

View File

@@ -1,17 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.chat.stickers
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.chat.stickers.SetChatStickerSet
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.StickerSetName
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.SupergroupChat
suspend fun RequestsExecutor.setChatStickerSet(
chatId: ChatIdentifier,
stickerSetName: StickerSetName
) = execute(SetChatStickerSet(chatId, stickerSetName))
suspend fun RequestsExecutor.setChatStickerSet(
chat: SupergroupChat,
stickerSetName: StickerSetName
) = setChatStickerSet(chat.id, stickerSetName)

View File

@@ -1,60 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.LiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation.EditChatMessageLiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.LocationContent
suspend fun RequestsExecutor.editLiveLocation(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
latitude: Double,
longitude: Double,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
EditChatMessageLiveLocation(
chatId, messageId, latitude, longitude, replyMarkup
)
)
suspend fun RequestsExecutor.editLiveLocation(
chat: Chat,
messageId: MessageIdentifier,
latitude: Double,
longitude: Double,
replyMarkup: InlineKeyboardMarkup? = null
) = editLiveLocation(chat.id, messageId, latitude, longitude, replyMarkup)
suspend fun RequestsExecutor.editLiveLocation(
message: ContentMessage<LocationContent>,
latitude: Double,
longitude: Double,
replyMarkup: InlineKeyboardMarkup? = null
) = editLiveLocation(message.chat, message.messageId, latitude, longitude, replyMarkup)
suspend fun RequestsExecutor.editLiveLocation(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
location: Location,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
EditChatMessageLiveLocation(
chatId, messageId, location.latitude, location.longitude, replyMarkup
)
)
suspend fun RequestsExecutor.editLiveLocation(
chat: Chat,
messageId: MessageIdentifier,
location: Location,
replyMarkup: InlineKeyboardMarkup? = null
) = editLiveLocation(chat.id, messageId, location.latitude, location.longitude, replyMarkup)
suspend fun RequestsExecutor.editLiveLocation(
message: ContentMessage<LocationContent>,
location: Location,
replyMarkup: InlineKeyboardMarkup? = null
) = editLiveLocation(message.chat, message.messageId, location.latitude, location.longitude, replyMarkup)

View File

@@ -1,23 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.LiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation.EditInlineMessageLiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.Location
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
suspend fun RequestsExecutor.editLiveLocation(
inlineMessageId: InlineMessageIdentifier,
latitude: Double,
longitude: Double,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
EditInlineMessageLiveLocation(
inlineMessageId, latitude, longitude, replyMarkup
)
)
suspend fun RequestsExecutor.editLiveLocation(
inlineMessageId: InlineMessageIdentifier,
location: Location,
replyMarkup: InlineKeyboardMarkup? = null
) = editLiveLocation(inlineMessageId, location.latitude, location.longitude, replyMarkup)

View File

@@ -1,31 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.LiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation.StopChatMessageLiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.LocationContent
suspend fun RequestsExecutor.stopLiveLocation(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
StopChatMessageLiveLocation(
chatId, messageId, replyMarkup
)
)
suspend fun RequestsExecutor.stopLiveLocation(
chat: Chat,
messageId: MessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = stopLiveLocation(chat.id, messageId, replyMarkup)
suspend fun RequestsExecutor.stopLiveLocation(
message: ContentMessage<LocationContent>,
replyMarkup: InlineKeyboardMarkup? = null
) = stopLiveLocation(message.chat, message.messageId, replyMarkup)

View File

@@ -1,15 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.LiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.LiveLocation.StopInlineMessageLiveLocation
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
suspend fun RequestsExecutor.stopLiveLocation(
inlineMessageId: InlineMessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
StopInlineMessageLiveLocation(
inlineMessageId, replyMarkup
)
)

View File

@@ -1,29 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.ReplyMarkup
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.ReplyMarkup.EditChatMessageReplyMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.Message
suspend fun RequestsExecutor.editMessageReplyMarkup(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
EditChatMessageReplyMarkup(chatId, messageId, replyMarkup)
)
suspend fun RequestsExecutor.editMessageReplyMarkup(
chat: Chat,
messageId: MessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = editMessageReplyMarkup(chat.id, messageId, replyMarkup)
suspend fun RequestsExecutor.editMessageReplyMarkup(
message: Message,
replyMarkup: InlineKeyboardMarkup? = null
) = editMessageReplyMarkup(message.chat.id, message.messageId, replyMarkup)

View File

@@ -1,11 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.ReplyMarkup
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.ReplyMarkup.EditInlineMessageReplyMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
suspend fun RequestsExecutor.editMessageReplyMarkup(
inlineMessageId: InlineMessageIdentifier,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(EditInlineMessageReplyMarkup(inlineMessageId, replyMarkup))

View File

@@ -1,39 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.caption
import com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.CaptionedInput
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.caption.EditChatMessageCaption
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MediaContent
suspend fun RequestsExecutor.editMessageCaption(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
text: String,
parseMode: ParseMode? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
EditChatMessageCaption(chatId, messageId, text, parseMode, replyMarkup)
)
suspend fun RequestsExecutor.editMessageCaption(
chat: Chat,
messageId: MessageIdentifier,
text: String,
parseMode: ParseMode? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = editMessageCaption(chat.id, messageId, text, parseMode, replyMarkup)
suspend fun <T> RequestsExecutor.editMessageCaption(
message: ContentMessage<T>,
text: String,
parseMode: ParseMode? = null,
replyMarkup: InlineKeyboardMarkup? = null
): ContentMessage<MediaContent> where T : CaptionedInput, T : MediaContent {
return editMessageCaption(message.chat.id, message.messageId, text, parseMode, replyMarkup)
}

View File

@@ -1,14 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.caption
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.caption.EditInlineMessageCaption
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
suspend fun RequestsExecutor.editMessageCaption(
inlineMessageId: InlineMessageIdentifier,
text: String,
parseMode: ParseMode? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(EditInlineMessageCaption(inlineMessageId, text, parseMode, replyMarkup))

View File

@@ -1,33 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.media
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.media.EditChatMessageMedia
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.InputMedia
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.abstracts.MediaContent
suspend fun RequestsExecutor.editMessageMedia(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
media: InputMedia,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
EditChatMessageMedia(chatId, messageId, media, replyMarkup)
)
suspend fun RequestsExecutor.editMessageMedia(
chat: Chat,
messageId: MessageIdentifier,
media: InputMedia,
replyMarkup: InlineKeyboardMarkup? = null
) = editMessageMedia(chat.id, messageId, media, replyMarkup)
suspend fun RequestsExecutor.editMessageMedia(
message: ContentMessage<out MediaContent>,
media: InputMedia,
replyMarkup: InlineKeyboardMarkup? = null
) = editMessageMedia(message.chat.id, message.messageId, media, replyMarkup)

View File

@@ -1,13 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.media
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.media.EditInlineMessageMedia
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.InputMedia
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
suspend fun RequestsExecutor.editMessageCaption(
inlineMessageId: InlineMessageIdentifier,
media: InputMedia,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(EditInlineMessageMedia(inlineMessageId, media, replyMarkup))

View File

@@ -1,39 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.text
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.text.EditChatMessageText
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.TextContent
suspend fun RequestsExecutor.editMessageText(
chatId: ChatIdentifier,
messageId: MessageIdentifier,
text: String,
parseMode: ParseMode? = null,
disableWebPagePreview: Boolean? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
EditChatMessageText(chatId, messageId, text, parseMode, disableWebPagePreview, replyMarkup)
)
suspend fun RequestsExecutor.editMessageText(
chat: Chat,
messageId: MessageIdentifier,
text: String,
parseMode: ParseMode? = null,
disableWebPagePreview: Boolean? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = editMessageText(chat.id, messageId, text, parseMode, disableWebPagePreview, replyMarkup)
suspend fun RequestsExecutor.editMessageText(
message: ContentMessage<TextContent>,
text: String,
parseMode: ParseMode? = null,
disableWebPagePreview: Boolean? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = editMessageText(message.chat.id, message.messageId, text, parseMode, disableWebPagePreview, replyMarkup)

View File

@@ -1,15 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.edit.text
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.edit.text.EditInlineMessageText
import com.github.insanusmokrassar.TelegramBotAPI.types.InlineMessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
suspend fun RequestsExecutor.editMessageText(
inlineMessageId: InlineMessageIdentifier,
text: String,
parseMode: ParseMode? = null,
disableWebPagePreview: Boolean? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(EditInlineMessageText(inlineMessageId, text, parseMode, disableWebPagePreview, replyMarkup))

View File

@@ -1,54 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.games
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.games.GetGameHighScoresByChat
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.message.abstracts.ContentMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.message.content.GameContent
suspend fun RequestsExecutor.getGameScore(
userId: UserId,
chatId: ChatId,
messageId: MessageIdentifier
) = execute(
GetGameHighScoresByChat(userId, chatId, messageId)
)
suspend fun RequestsExecutor.getGameScore(
user: CommonUser,
chatId: ChatId,
messageId: MessageIdentifier
) = getGameScore(
user.id, chatId, messageId
)
suspend fun RequestsExecutor.getGameScore(
userId: UserId,
chat: Chat,
messageId: MessageIdentifier
) = getGameScore(
userId, chat.id, messageId
)
suspend fun RequestsExecutor.getGameScore(
user: CommonUser,
chat: Chat,
messageId: MessageIdentifier
) = getGameScore(
user.id, chat.id, messageId
)
suspend fun RequestsExecutor.getGameScore(
userId: UserId,
message: ContentMessage<GameContent>
) = getGameScore(
userId, message.chat.id, message.messageId
)
suspend fun RequestsExecutor.getGameScore(
user: CommonUser,
message: ContentMessage<GameContent>
) = getGameScore(
user.id, message.chat.id, message.messageId
)

View File

@@ -1,19 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.games
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.games.GetGameHighScoresByInlineMessageId
import com.github.insanusmokrassar.TelegramBotAPI.types.*
suspend fun RequestsExecutor.getGameScore(
userId: UserId,
inlineMessageId: InlineMessageIdentifier
) = execute(
GetGameHighScoresByInlineMessageId(
userId, inlineMessageId
)
)
suspend fun RequestsExecutor.getGameScore(
user: CommonUser,
inlineMessageId: InlineMessageIdentifier
) = getGameScore(user.id, inlineMessageId)

View File

@@ -1,16 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.get
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
import com.github.insanusmokrassar.TelegramBotAPI.requests.get.GetFile
import com.github.insanusmokrassar.TelegramBotAPI.types.files.abstracts.TelegramMediaFile
suspend fun RequestsExecutor.getFileAdditionalInfo(
fileId: FileId
) = execute(
GetFile(fileId)
)
suspend fun RequestsExecutor.getFileAdditionalInfo(
file: TelegramMediaFile
) = getFileAdditionalInfo(file.fileId)

View File

@@ -1,17 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.get
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.get.GetStickerSet
import com.github.insanusmokrassar.TelegramBotAPI.types.files.Sticker
suspend fun RequestsExecutor.getStickerSet(
name: String
) = execute(
GetStickerSet(name)
)
suspend fun RequestsExecutor.getStickerSet(
sticker: Sticker
) = getStickerSet(
sticker.stickerSetName ?: error("Sticker must contains stickerSetName to be correctly used in getStickerSet method")
)

View File

@@ -1,22 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.get
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.get.GetUserProfilePhotos
import com.github.insanusmokrassar.TelegramBotAPI.types.CommonUser
import com.github.insanusmokrassar.TelegramBotAPI.types.UserId
suspend fun RequestsExecutor.getUserProfilePhotos(
userId: UserId,
offset: Int? = null,
limit: Int? = null
) = execute(
GetUserProfilePhotos(
userId, offset, limit
)
)
suspend fun RequestsExecutor.getUserProfilePhotos(
user: CommonUser,
offset: Int? = null,
limit: Int? = null
) = getUserProfilePhotos(user.id, offset, limit)

View File

@@ -1,102 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendAction
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.actions.*
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
suspend fun RequestsExecutor.sendBotAction(
chatId: ChatIdentifier,
action: BotAction
) = execute(
SendAction(chatId, action)
)
suspend fun RequestsExecutor.sendBotAction(
chat: Chat,
action: BotAction
) = sendBotAction(chat.id, action)
suspend fun RequestsExecutor.sendActionTyping(
chatId: ChatIdentifier
) = sendBotAction(chatId, TypingAction)
suspend fun RequestsExecutor.sendActionUploadPhoto(
chatId: ChatIdentifier
) = sendBotAction(chatId, UploadPhotoAction)
suspend fun RequestsExecutor.sendActionRecordVideo(
chatId: ChatIdentifier
) = sendBotAction(chatId, RecordVideoAction)
suspend fun RequestsExecutor.sendActionUploadVideo(
chatId: ChatIdentifier
) = sendBotAction(chatId, UploadVideoAction)
suspend fun RequestsExecutor.sendActionRecordAudio(
chatId: ChatIdentifier
) = sendBotAction(chatId, RecordAudioAction)
suspend fun RequestsExecutor.sendActionUploadAudio(
chatId: ChatIdentifier
) = sendBotAction(chatId, UploadAudioAction)
suspend fun RequestsExecutor.sendActionUploadDocument(
chatId: ChatIdentifier
) = sendBotAction(chatId, UploadDocumentAction)
suspend fun RequestsExecutor.sendActionFindLocation(
chatId: ChatIdentifier
) = sendBotAction(chatId, FindLocationAction)
suspend fun RequestsExecutor.sendActionRecordVideoNote(
chatId: ChatIdentifier
) = sendBotAction(chatId, RecordVideoNoteAction)
suspend fun RequestsExecutor.sendActionUploadVideoNote(
chatId: ChatIdentifier
) = sendBotAction(chatId, UploadVideoNoteAction)
suspend fun RequestsExecutor.sendActionTyping(
chat: Chat
) = sendBotAction(chat, TypingAction)
suspend fun RequestsExecutor.sendActionUploadPhoto(
chat: Chat
) = sendBotAction(chat, UploadPhotoAction)
suspend fun RequestsExecutor.sendActionRecordVideo(
chat: Chat
) = sendBotAction(chat, RecordVideoAction)
suspend fun RequestsExecutor.sendActionUploadVideo(
chat: Chat
) = sendBotAction(chat, UploadVideoAction)
suspend fun RequestsExecutor.sendActionRecordAudio(
chat: Chat
) = sendBotAction(chat, RecordAudioAction)
suspend fun RequestsExecutor.sendActionUploadAudio(
chat: Chat
) = sendBotAction(chat, UploadAudioAction)
suspend fun RequestsExecutor.sendActionUploadDocument(
chat: Chat
) = sendBotAction(chat, UploadDocumentAction)
suspend fun RequestsExecutor.sendActionFindLocation(
chat: Chat
) = sendBotAction(chat, FindLocationAction)
suspend fun RequestsExecutor.sendActionRecordVideoNote(
chat: Chat
) = sendBotAction(chat, RecordVideoNoteAction)
suspend fun RequestsExecutor.sendActionUploadVideoNote(
chat: Chat
) = sendBotAction(chat, UploadVideoNoteAction)

View File

@@ -1,55 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendContact
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
suspend fun RequestsExecutor.sendContact(
chatId: ChatIdentifier,
phoneNumber: String,
firstName: String,
lastName: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendContact(
chatId, phoneNumber, firstName, lastName, disableNotification, replyToMessageId, replyMarkup
)
)
suspend fun RequestsExecutor.sendContact(
chatId: ChatIdentifier,
contact: Contact,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendContact(
chatId, contact, disableNotification, replyToMessageId, replyMarkup
)
)
suspend fun RequestsExecutor.sendContact(
chat: Chat,
phoneNumber: String,
firstName: String,
lastName: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendContact(
chat.id, phoneNumber, firstName, lastName, disableNotification, replyToMessageId, replyMarkup
)
suspend fun RequestsExecutor.sendContact(
chat: Chat,
contact: Contact,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendContact(
chat.id, contact, disableNotification, replyToMessageId, replyMarkup
)

View File

@@ -1,24 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendDice
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
suspend fun RequestsExecutor.sendDice(
chatId: ChatIdentifier,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendDice(chatId, disableNotification, replyToMessageId, replyMarkup)
)
suspend fun RequestsExecutor.sendDice(
chat: Chat,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendDice(chat.id, disableNotification, replyToMessageId, replyMarkup)

View File

@@ -1,71 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendLocation
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
suspend fun RequestsExecutor.sendLocation(
chatId: ChatIdentifier,
latitude: Double,
longitude: Double,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendLocation(
chatId,
latitude,
longitude,
disableNotification = disableNotification,
replyToMessageId = replyToMessageId,
replyMarkup = replyMarkup
)
)
suspend fun RequestsExecutor.sendLocation(
chatId: ChatIdentifier,
location: Location,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendLocation(
chatId,
location.latitude,
location.longitude,
disableNotification,
replyToMessageId,
replyMarkup
)
suspend fun RequestsExecutor.sendLocation(
chat: Chat,
latitude: Double,
longitude: Double,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendLocation(
chat.id,
latitude,
longitude,
disableNotification,
replyToMessageId,
replyMarkup
)
suspend fun RequestsExecutor.sendLocation(
chat: Chat,
location: Location,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendLocation(
chat.id,
location.latitude,
location.longitude,
disableNotification,
replyToMessageId,
replyMarkup
)

View File

@@ -1,54 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendTextMessage
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
suspend fun RequestsExecutor.sendMessage(
chatId: ChatIdentifier,
text: String,
parseMode: ParseMode? = null,
disableWebPagePreview: Boolean? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendTextMessage(chatId, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, replyMarkup)
)
suspend fun RequestsExecutor.sendTextMessage(
chatId: ChatIdentifier,
text: String,
parseMode: ParseMode? = null,
disableWebPagePreview: Boolean? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendMessage(
chatId, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, replyMarkup
)
suspend fun RequestsExecutor.sendMessage(
chat: Chat,
text: String,
parseMode: ParseMode? = null,
disableWebPagePreview: Boolean? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendMessage(chat.id, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, replyMarkup)
suspend fun RequestsExecutor.sendTextMessage(
chat: Chat,
text: String,
parseMode: ParseMode? = null,
disableWebPagePreview: Boolean? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendTextMessage(chat.id, text, parseMode, disableWebPagePreview, disableNotification, replyToMessageId, replyMarkup)

View File

@@ -1,59 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.SendVenue
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
suspend fun RequestsExecutor.sendVenue(
chatId: ChatIdentifier,
latitude: Double,
longitude: Double,
title: String,
address: String,
foursquareId: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendVenue(
chatId, latitude, longitude, title, address, foursquareId, disableNotification, replyToMessageId, replyMarkup
)
)
suspend fun RequestsExecutor.sendVenue(
chat: Chat,
latitude: Double,
longitude: Double,
title: String,
address: String,
foursquareId: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendVenue(
chat.id, latitude, longitude, title, address, foursquareId, disableNotification, replyToMessageId, replyMarkup
)
suspend fun RequestsExecutor.sendVenue(
chatId: ChatIdentifier,
venue: Venue,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendVenue(
chatId, venue, disableNotification, replyToMessageId, replyMarkup
)
)
suspend fun RequestsExecutor.sendVenue(
chat: Chat,
venue: Venue,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendVenue(
chat.id, venue, disableNotification, replyToMessageId, replyMarkup
)

View File

@@ -1,51 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.games
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.games.SendGame
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.games.Game
suspend fun RequestsExecutor.sendGame(
chatId: ChatIdentifier,
gameShortName: String,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendGame(
chatId, gameShortName, disableNotification, replyToMessageId, replyMarkup
)
)
suspend fun RequestsExecutor.sendGame(
chat: Chat,
gameShortName: String,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendGame(
chat.id, gameShortName, disableNotification, replyToMessageId, replyMarkup
)
suspend fun RequestsExecutor.sendGame(
chatId: ChatIdentifier,
game: Game,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendGame(
chatId, game.title, disableNotification, replyToMessageId, replyMarkup
)
suspend fun RequestsExecutor.sendGame(
chat: Chat,
game: Game,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendGame(
chat.id, game.title, disableNotification, replyToMessageId, replyMarkup
)

View File

@@ -1,54 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendAnimation
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.files.AnimationFile
suspend fun RequestsExecutor.sendAnimation(
chatId: ChatIdentifier,
animation: InputFile,
thumb: InputFile? = null,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
width: Int? = null,
height: Int? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendAnimation(
chatId,
animation,
thumb,
text,
parseMode,
duration,
width,
height,
disableNotification,
replyToMessageId,
replyMarkup
)
)
suspend fun RequestsExecutor.sendAnimation(
chatId: ChatIdentifier,
animation: AnimationFile,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
width: Int? = null,
height: Int? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendAnimation(
chatId, animation.fileId, animation.thumb ?.fileId, text, parseMode, duration, width, height, disableNotification, replyToMessageId, replyMarkup
)

View File

@@ -1,51 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendAudio
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.files.AudioFile
suspend fun RequestsExecutor.sendAudio(
chatId: ChatIdentifier,
audio: InputFile,
thumb: InputFile? = null,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
performer: String? = null,
title: String? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendAudio(
chatId,
audio,
thumb,
text,
parseMode,
duration,
performer,
title,
disableNotification,
replyToMessageId,
replyMarkup
)
)
suspend fun RequestsExecutor.sendAudio(
chatId: ChatIdentifier,
audio: AudioFile,
text: String? = null,
parseMode: ParseMode? = null,
title: String? = audio.title,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendAudio(
chatId, audio.fileId, audio.thumb ?.fileId, text, parseMode, audio.duration, audio.performer, title, disableNotification, replyToMessageId, replyMarkup
)

View File

@@ -1,44 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendDocument
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.files.DocumentFile
suspend fun RequestsExecutor.sendDocument(
chatId: ChatIdentifier,
document: InputFile,
thumb: InputFile? = null,
text: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendDocument(
chatId,
document,
thumb,
text,
parseMode,
disableNotification,
replyToMessageId,
replyMarkup
)
)
suspend fun RequestsExecutor.sendDocument(
chatId: ChatIdentifier,
document: DocumentFile,
text: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendDocument(
chatId, document.fileId, document.thumb ?.fileId, text, parseMode, disableNotification, replyToMessageId, replyMarkup
)

View File

@@ -1,28 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendMediaGroup
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.InputMedia.MediaGroupMemberInputMedia
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
suspend fun RequestsExecutor.sendMediaGroup(
chatId: ChatIdentifier,
media: List<MediaGroupMemberInputMedia>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null
) = execute(
SendMediaGroup(
chatId, media, disableNotification, replyToMessageId
)
)
suspend fun RequestsExecutor.sendMediaGroup(
chat: Chat,
media: List<MediaGroupMemberInputMedia>,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null
) = sendMediaGroup(
chat.id, media, disableNotification, replyToMessageId
)

View File

@@ -1,29 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendPhoto
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
suspend fun RequestsExecutor.sendPhoto(
chatId: ChatIdentifier,
fileId: InputFile,
caption: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendPhoto(
chatId,
fileId,
caption,
parseMode,
disableNotification,
replyToMessageId,
replyMarkup
)
)

View File

@@ -1,18 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendSticker
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
suspend fun RequestsExecutor.sendSticker(
chatId: ChatIdentifier,
sticker: InputFile,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendSticker(chatId, sticker, disableNotification, replyToMessageId, replyMarkup)
)

View File

@@ -1,51 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendVideo
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.files.VideoFile
suspend fun RequestsExecutor.sendVideo(
chatId: ChatIdentifier,
video: InputFile,
thumb: InputFile? = null,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
width: Int? = null,
height: Int? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendVideo(
chatId,
video,
thumb,
text,
parseMode,
duration,
width,
height,
null,
disableNotification,
replyToMessageId,
replyMarkup
)
)
suspend fun RequestsExecutor.sendVideo(
chatId: ChatIdentifier,
video: VideoFile,
text: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendVideo(
chatId, video.fileId, video.thumb ?.fileId, text, parseMode, video.duration, video.width, video.height, disableNotification, replyToMessageId, replyMarkup
)

View File

@@ -1,48 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendVideoNote
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.files.VideoFile
suspend fun RequestsExecutor.sendVideoNote(
chatId: ChatIdentifier,
videoNote: InputFile,
thumb: InputFile? = null,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
size: Int? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendVideoNote(
chatId,
videoNote,
thumb,
text,
parseMode,
duration,
size,
disableNotification,
replyToMessageId,
replyMarkup
)
)
suspend fun RequestsExecutor.sendVideoNote(
chatId: ChatIdentifier,
videoNote: VideoFile,
text: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendVideoNote(
chatId, videoNote.fileId, videoNote.thumb ?.fileId, text, parseMode, videoNote.duration, videoNote.width, disableNotification, replyToMessageId, replyMarkup
)

View File

@@ -1,46 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.media
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.InputFile
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.media.SendVoice
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.ParseMode.ParseMode
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.files.AudioFile
suspend fun RequestsExecutor.sendVoice(
chatId: ChatIdentifier,
voice: InputFile,
thumb: InputFile? = null,
text: String? = null,
parseMode: ParseMode? = null,
duration: Long? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendVoice(
chatId,
voice,
thumb,
text,
parseMode,
duration,
disableNotification,
replyToMessageId,
replyMarkup
)
)
suspend fun RequestsExecutor.sendVoice(
chatId: ChatIdentifier,
voice: AudioFile,
text: String? = null,
parseMode: ParseMode? = null,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendVoice(
chatId, voice.fileId, voice.thumb ?.fileId, text, parseMode, voice.duration, disableNotification, replyToMessageId, replyMarkup
)

View File

@@ -1,54 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.payments
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.payments.SendInvoice
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.InlineKeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.LabeledPrice
import com.github.insanusmokrassar.TelegramBotAPI.types.payments.abstracts.Currency
suspend fun RequestsExecutor.sendInvoice(
chatId: ChatId,
title: String,
description: String,
payload: String,
providerToken: String,
startParameter: StartParameter,
currency: Currency,
prices: List<LabeledPrice>,
providerData: String? = null,
requireName: Boolean = false,
requirePhoneNumber: Boolean = false,
requireEmail: Boolean = false,
requireShippingAddress: Boolean = false,
shouldSendPhoneNumberToProvider: Boolean = false,
shouldSendEmailToProvider: Boolean = false,
priceDependOnShipAddress: Boolean = false,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = execute(
SendInvoice(chatId, title, description, payload, providerToken, startParameter, currency, prices, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, replyToMessageId, replyMarkup)
)
suspend fun RequestsExecutor.sendInvoice(
user: CommonUser,
title: String,
description: String,
payload: String,
providerToken: String,
startParameter: StartParameter,
currency: Currency,
prices: List<LabeledPrice>,
providerData: String? = null,
requireName: Boolean = false,
requirePhoneNumber: Boolean = false,
requireEmail: Boolean = false,
requireShippingAddress: Boolean = false,
shouldSendPhoneNumberToProvider: Boolean = false,
shouldSendEmailToProvider: Boolean = false,
priceDependOnShipAddress: Boolean = false,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: InlineKeyboardMarkup? = null
) = sendInvoice(user.id, title, description, payload, providerToken, startParameter, currency, prices, providerData, requireName, requirePhoneNumber, requireEmail, requireShippingAddress, shouldSendPhoneNumberToProvider, shouldSendEmailToProvider, priceDependOnShipAddress, disableNotification, replyToMessageId, replyMarkup)

View File

@@ -1,135 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.send.polls
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.polls.SendQuizPoll
import com.github.insanusmokrassar.TelegramBotAPI.requests.send.polls.SendRegularPoll
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.MessageIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.types.buttons.KeyboardMarkup
import com.github.insanusmokrassar.TelegramBotAPI.types.chat.abstracts.Chat
import com.github.insanusmokrassar.TelegramBotAPI.types.polls.QuizPoll
import com.github.insanusmokrassar.TelegramBotAPI.types.polls.RegularPoll
suspend fun RequestsExecutor.sendRegularPoll(
chatId: ChatIdentifier,
question: String,
options: List<String>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendRegularPoll(
chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, disableNotification, replyToMessageId, replyMarkup
)
)
suspend fun RequestsExecutor.sendRegularPoll(
chatId: ChatIdentifier,
poll: RegularPoll,
isClosed: Boolean = false,
question: String = poll.question,
options: List<String> = poll.options.map { it.text },
isAnonymous: Boolean = poll.isAnonymous,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendRegularPoll(
chatId, question, options, isAnonymous, isClosed, allowMultipleAnswers, disableNotification, replyToMessageId, replyMarkup
)
)
suspend fun RequestsExecutor.sendRegularPoll(
chat: Chat,
question: String,
options: List<String>,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
allowMultipleAnswers: Boolean = false,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendRegularPoll(
chat.id, question, options, isAnonymous, isClosed, allowMultipleAnswers, disableNotification, replyToMessageId, replyMarkup
)
suspend fun RequestsExecutor.sendRegularPoll(
chat: Chat,
poll: RegularPoll,
isClosed: Boolean = false,
question: String = poll.question,
options: List<String> = poll.options.map { it.text },
isAnonymous: Boolean = poll.isAnonymous,
allowMultipleAnswers: Boolean = poll.allowMultipleAnswers,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendRegularPoll(
chat.id, question, options, isAnonymous, isClosed, allowMultipleAnswers, disableNotification, replyToMessageId, replyMarkup
)
suspend fun RequestsExecutor.sendQuizPoll(
chatId: ChatIdentifier,
question: String,
options: List<String>,
correctOptionId: Int,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendQuizPoll(
chatId, question, options, correctOptionId, isAnonymous, isClosed, disableNotification, replyToMessageId, replyMarkup
)
)
suspend fun RequestsExecutor.sendQuizPoll(
chat: Chat,
question: String,
options: List<String>,
correctOptionId: Int,
isAnonymous: Boolean = true,
isClosed: Boolean = false,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendQuizPoll(
chat.id, question, options, correctOptionId, isAnonymous, isClosed, disableNotification, replyToMessageId, replyMarkup
)
suspend fun RequestsExecutor.sendQuizPoll(
chatId: ChatIdentifier,
isClosed: Boolean = false,
quizPoll: QuizPoll,
question: String = quizPoll.question,
options: List<String> = quizPoll.options.map { it.text },
correctOptionId: Int = quizPoll.correctOptionId ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = execute(
SendQuizPoll(
chatId, question, options, correctOptionId, isAnonymous, isClosed, disableNotification, replyToMessageId, replyMarkup
)
)
suspend fun RequestsExecutor.sendQuizPoll(
chat: Chat,
isClosed: Boolean = false,
quizPoll: QuizPoll,
question: String = quizPoll.question,
options: List<String> = quizPoll.options.map { it.text },
correctOptionId: Int = quizPoll.correctOptionId ?: error("Correct option ID must be provided by income QuizPoll or by developer"),
isAnonymous: Boolean = quizPoll.isAnonymous,
disableNotification: Boolean = false,
replyToMessageId: MessageIdentifier? = null,
replyMarkup: KeyboardMarkup? = null
) = sendQuizPoll(
chat.id, question, options, correctOptionId, isAnonymous, isClosed, disableNotification, replyToMessageId, replyMarkup
)

View File

@@ -1,20 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.stickers
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.DeleteStickerFromSet
import com.github.insanusmokrassar.TelegramBotAPI.types.files.Sticker
suspend fun RequestsExecutor.deleteStickerFromSet(
sticker: FileId
) = execute(
DeleteStickerFromSet(
sticker
)
)
suspend fun RequestsExecutor.deleteStickerFromSet(
sticker: Sticker
) = deleteStickerFromSet(
sticker.fileId
)

View File

@@ -1,24 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.stickers
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.SetStickerPositionInSet
import com.github.insanusmokrassar.TelegramBotAPI.types.files.Sticker
suspend fun RequestsExecutor.setStickerPositionInSet(
sticker: FileId,
position: Int
) = execute(
SetStickerPositionInSet(
sticker,
position
)
)
suspend fun RequestsExecutor.setStickerPositionInSet(
sticker: Sticker,
position: Int
) = setStickerPositionInSet(
sticker.fileId,
position
)

View File

@@ -1,21 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.stickers
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
import com.github.insanusmokrassar.TelegramBotAPI.requests.stickers.UploadStickerFile
import com.github.insanusmokrassar.TelegramBotAPI.types.CommonUser
import com.github.insanusmokrassar.TelegramBotAPI.types.UserId
suspend fun RequestsExecutor.uploadStickerFile(
userId: UserId,
sticker: MultipartFile
) = execute(
UploadStickerFile(userId, sticker)
)
suspend fun RequestsExecutor.uploadStickerFile(
user: CommonUser,
sticker: MultipartFile
) = execute(
UploadStickerFile(user.id, sticker)
)

View File

@@ -1,158 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.updates
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.bot.exceptions.RequestException
import com.github.insanusmokrassar.TelegramBotAPI.extensions.api.InternalUtils.convertWithMediaGroupUpdates
import com.github.insanusmokrassar.TelegramBotAPI.extensions.api.InternalUtils.lastUpdateIdentifier
import com.github.insanusmokrassar.TelegramBotAPI.extensions.api.getUpdates
import com.github.insanusmokrassar.TelegramBotAPI.types.*
import com.github.insanusmokrassar.TelegramBotAPI.types.update.*
import com.github.insanusmokrassar.TelegramBotAPI.types.update.MediaGroupUpdates.*
import com.github.insanusmokrassar.TelegramBotAPI.types.update.abstracts.Update
import com.github.insanusmokrassar.TelegramBotAPI.updateshandlers.*
import io.ktor.client.features.HttpRequestTimeoutException
import kotlinx.coroutines.*
fun RequestsExecutor.startGettingOfUpdates(
timeoutSeconds: Seconds = 30,
scope: CoroutineScope = CoroutineScope(Dispatchers.Default),
exceptionsHandler: (suspend (Exception) -> Unit)? = null,
allowedUpdates: List<String>? = null,
updatesReceiver: UpdateReceiver<Update>
): Job = scope.launch {
var lastUpdateIdentifier: UpdateIdentifier? = null
while (isActive) {
try {
supervisorScope {
val updates = getUpdates(
offset = lastUpdateIdentifier?.plus(1),
timeout = timeoutSeconds,
allowed_updates = allowedUpdates
).let { originalUpdates ->
val converted = originalUpdates.convertWithMediaGroupUpdates()
/**
* Dirty hack for cases when the media group was retrieved not fully:
*
* We are throw out the last media group and will reretrieve it again in the next get updates
* and it will guarantee that it is full
*/
if (originalUpdates.size == getUpdatesLimit.last && converted.last() is SentMediaGroupUpdate) {
converted - converted.last()
} else {
converted
}
}
supervisorScope {
for (update in updates) {
updatesReceiver(update)
lastUpdateIdentifier = update.lastUpdateIdentifier()
}
}
}
} catch (e: HttpRequestTimeoutException) {
exceptionsHandler ?.invoke(e) // it is ok due to mechanism of long polling
} catch (e: RequestException) {
exceptionsHandler ?.invoke(e) // it is not ok, but in most cases it will mean that there is some limit for requests count
delay(1000L)
} catch (e: Exception) {
exceptionsHandler ?.invoke(e)
}
}
}
fun RequestsExecutor.startGettingOfUpdates(
updatesFilter: UpdatesFilter,
timeoutSeconds: Seconds = 30,
exceptionsHandler: (suspend (Exception) -> Unit)? = null,
scope: CoroutineScope = CoroutineScope(Dispatchers.Default)
): Job = startGettingOfUpdates(
timeoutSeconds,
scope,
exceptionsHandler,
updatesFilter.allowedUpdates,
updatesFilter.asUpdateReceiver
)
fun RequestsExecutor.startGettingOfUpdates(
messageCallback: UpdateReceiver<MessageUpdate>? = null,
messageMediaGroupCallback: UpdateReceiver<MessageMediaGroupUpdate>? = null,
editedMessageCallback: UpdateReceiver<EditMessageUpdate>? = null,
editedMessageMediaGroupCallback: UpdateReceiver<EditMessageMediaGroupUpdate>? = null,
channelPostCallback: UpdateReceiver<ChannelPostUpdate>? = null,
channelPostMediaGroupCallback: UpdateReceiver<ChannelPostMediaGroupUpdate>? = null,
editedChannelPostCallback: UpdateReceiver<EditChannelPostUpdate>? = null,
editedChannelPostMediaGroupCallback: UpdateReceiver<EditChannelPostMediaGroupUpdate>? = null,
chosenInlineResultCallback: UpdateReceiver<ChosenInlineResultUpdate>? = null,
inlineQueryCallback: UpdateReceiver<InlineQueryUpdate>? = null,
callbackQueryCallback: UpdateReceiver<CallbackQueryUpdate>? = null,
shippingQueryCallback: UpdateReceiver<ShippingQueryUpdate>? = null,
preCheckoutQueryCallback: UpdateReceiver<PreCheckoutQueryUpdate>? = null,
pollCallback: UpdateReceiver<PollUpdate>? = null,
pollAnswerCallback: UpdateReceiver<PollAnswerUpdate>? = null,
timeoutSeconds: Seconds = 30,
exceptionsHandler: (suspend (Exception) -> Unit)? = null,
scope: CoroutineScope = GlobalScope
): Job {
return startGettingOfUpdates(
SimpleUpdatesFilter(
messageCallback,
messageMediaGroupCallback,
editedMessageCallback,
editedMessageMediaGroupCallback,
channelPostCallback,
channelPostMediaGroupCallback,
editedChannelPostCallback,
editedChannelPostMediaGroupCallback,
chosenInlineResultCallback,
inlineQueryCallback,
callbackQueryCallback,
shippingQueryCallback,
preCheckoutQueryCallback,
pollCallback,
pollAnswerCallback
),
timeoutSeconds,
exceptionsHandler,
scope
)
}
fun RequestsExecutor.startGettingOfUpdates(
messageCallback: UpdateReceiver<MessageUpdate>? = null,
mediaGroupCallback: UpdateReceiver<MediaGroupUpdate>? = null,
editedMessageCallback: UpdateReceiver<EditMessageUpdate>? = null,
channelPostCallback: UpdateReceiver<ChannelPostUpdate>? = null,
editedChannelPostCallback: UpdateReceiver<EditChannelPostUpdate>? = null,
chosenInlineResultCallback: UpdateReceiver<ChosenInlineResultUpdate>? = null,
inlineQueryCallback: UpdateReceiver<InlineQueryUpdate>? = null,
callbackQueryCallback: UpdateReceiver<CallbackQueryUpdate>? = null,
shippingQueryCallback: UpdateReceiver<ShippingQueryUpdate>? = null,
preCheckoutQueryCallback: UpdateReceiver<PreCheckoutQueryUpdate>? = null,
pollCallback: UpdateReceiver<PollUpdate>? = null,
pollAnswerCallback: UpdateReceiver<PollAnswerUpdate>? = null,
timeoutSeconds: Seconds = 30,
exceptionsHandler: (suspend (Exception) -> Unit)? = null,
scope: CoroutineScope = CoroutineScope(Dispatchers.Default)
): Job = startGettingOfUpdates(
messageCallback = messageCallback,
messageMediaGroupCallback = mediaGroupCallback,
editedMessageCallback = editedMessageCallback,
editedMessageMediaGroupCallback = mediaGroupCallback,
channelPostCallback = channelPostCallback,
channelPostMediaGroupCallback = mediaGroupCallback,
editedChannelPostCallback = editedChannelPostCallback,
editedChannelPostMediaGroupCallback = mediaGroupCallback,
chosenInlineResultCallback = chosenInlineResultCallback,
inlineQueryCallback = inlineQueryCallback,
callbackQueryCallback = callbackQueryCallback,
shippingQueryCallback = shippingQueryCallback,
preCheckoutQueryCallback = preCheckoutQueryCallback,
pollCallback = pollCallback,
pollAnswerCallback = pollAnswerCallback,
timeoutSeconds = timeoutSeconds,
exceptionsHandler = exceptionsHandler,
scope = scope
)

View File

@@ -1,6 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.webhook
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.webhook.DeleteWebhook
suspend fun RequestsExecutor.deleteWebhook() = execute(DeleteWebhook())

View File

@@ -1,6 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.webhook
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.webhook.GetWebhookInfo
suspend fun RequestsExecutor.getWebhookInfo() = execute(GetWebhookInfo())

View File

@@ -1,28 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.extensions.api.webhook
import com.github.insanusmokrassar.TelegramBotAPI.bot.RequestsExecutor
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.FileId
import com.github.insanusmokrassar.TelegramBotAPI.requests.abstracts.MultipartFile
import com.github.insanusmokrassar.TelegramBotAPI.requests.webhook.SetWebhook
suspend fun RequestsExecutor.setWebhookInfo(
url: String,
certificate: FileId,
maxAllowedConnections: Int? = null,
allowedUpdates: List<String>? = null
) = execute(
SetWebhook(
url, certificate, maxAllowedConnections, allowedUpdates
)
)
suspend fun RequestsExecutor.setWebhookInfo(
url: String,
certificate: MultipartFile,
maxAllowedConnections: Int? = null,
allowedUpdates: List<String>? = null
) = execute(
SetWebhook(
url, certificate, maxAllowedConnections, allowedUpdates
)
)

311
TelegramBotAPI.minder Normal file
View File

@@ -0,0 +1,311 @@
<?xml version="1.0"?>
<minder version="1.11.3">
<theme name="default" label="Default" index="-1"/>
<styles>
<style level="0" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
<style level="1" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
<style level="2" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
<style level="3" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
<style level="4" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
<style level="5" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
<style level="6" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
<style level="7" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
<style level="8" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
<style level="9" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
<style level="10" isset="true" branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="200" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true" connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
</styles>
<drawarea x="-950.47548925255796" y="-49.650554065281653" scale="0.5"/>
<images/>
<nodes>
<node id="0" posx="1378.798161778599" posy="159.04571601189673" width="472" height="168" side="top" fold="false" treesize="743" layout="Downwards" group="false">
<style branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="439" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true"/>
<nodename posx="1394.798161778599" posy="175.04571601189673" maxwidth="488.96484375">
<text data="tgbotapi.core&#10;&#10;Root project with API. It is not recommended to use its requests directly and better to use at least tgbotapi.extensions.api"/>
</nodename>
<nodenote></nodenote>
<nodes>
<node id="1" posx="1411.798161778599" posy="427.04571601189673" width="406" height="145" side="bottom" fold="false" treesize="743" color="#68b723" colorroot="true" layout="Downwards" group="false">
<style branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="none" nodewidth="394" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true"/>
<nodename posx="1427.798161778599" posy="443.04571601189673" maxwidth="419.451171875">
<text data="TelegramBotAPI extensions&#10;&#10;Family of projects which are fully based on TelegramBotAPI and extend its functionality"/>
</nodename>
<nodenote></nodenote>
<nodes>
<node id="2" posx="1247.298161778599" posy="672.04571601189673" width="296" height="191" side="bottom" fold="false" treesize="296" color="#68b723" colorroot="true" layout="Downwards" group="false">
<style branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="203" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true"/>
<nodename posx="1263.298161778599" posy="688.04571601189673" maxwidth="295.90315755208337">
<text data="tgbotapi.extensions.api&#10;&#10;Extensions project for make requests more look like in the Telegram Bot API and give opportunity to use it's easier"/>
</nodename>
<nodenote></nodenote>
</node>
<node id="3" posx="1609.298161778599" posy="672.04571601189673" width="307" height="168" side="bottom" fold="false" treesize="439" color="#68b723" colorroot="true" layout="Downwards" group="false">
<style branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="286" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true"/>
<nodename posx="1625.298161778599" posy="688.04571601189673" maxwidth="299.252197265625">
<text data="tgbotapi.extensions.utils&#10;&#10;Extensions project with utils things which will make easier different operations"/>
</nodename>
<nodenote></nodenote>
<nodes>
<node id="4" posx="1543.298161778599" posy="940.04571601189673" width="439" height="122" side="bottom" fold="false" treesize="439" color="#68b723" colorroot="false" layout="Downwards" group="false">
<style branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="387" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true"/>
<nodename posx="1559.298161778599" posy="956.04571601189673" maxwidth="408.97932942708348">
<text data="tgbotapi.extensions.behaviour_builder&#10;&#10;Extension project for building bot behaviour via special dsl"/>
</nodename>
<nodenote></nodenote>
</node>
</nodes>
</node>
</nodes>
</node>
</nodes>
</node>
<node id="5" posx="1391.8445078072455" posy="1155.6062730594231" width="461" height="236" side="bottom" fold="false" treesize="461" layout="Downwards" group="false">
<style branchmargin="100" linktype="curved" linkwidth="5" linkarrow="true" linkdash="solid" nodeborder="bracket" nodewidth="430" nodeborderwidth="3" nodefill="false" nodemargin="11" nodepadding="5" nodefont="Roboto Mono 14" nodemarkup="true"/>
<nodename posx="1407.8445078072455" posy="1171.6062730594231" maxwidth="453.885498046875">
<text data="tgbotapi&#10;&#10;Here included all available TelegramBotAPI libraries:&#13;&#10;&#13;&#10;* tgbotapi.core&#13;&#10;* tgbotapi.extensions.api&#13;&#10;* tgbotapi.extensions.utils&#10;* tgbotapi.extensions.behaviour_builder">
<color>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="67" end="68" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="84" end="85" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="111" end="112" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
<range start="139" end="140" extra="rgb(255,0,0)"/>
</color>
</text>
</nodename>
<nodenote></nodenote>
</node>
</nodes>
<groups/>
<connections>
<connection from_id="2" to_id="5" drag_x="1475.8213347929195" drag_y="1014.8259945356604" color="#777777">
<style connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
<title></title>
<note></note>
</connection>
<connection from_id="4" to_id="5" drag_x="1691.5447998046875" drag_y="1107.00439453125" color="#777777">
<style connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
<title></title>
<note></note>
</connection>
<connection from_id="3" to_id="5" drag_x="1483.48876953125" drag_y="896.18115234375">
<style connectiondash="dotted" connectionlwidth="2" connectionarrow="fromto" connectionpadding="3" connectionfont="Sans 10" connectiontwidth="100"/>
<title></title>
<note></note>
</connection>
</connections>
<stickers/>
</minder>

View File

@@ -1,203 +0,0 @@
# TelegramBotAPI
[![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin)
[![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)
[![Build Status](https://jenkins.insanusmokrassar.com/buildStatus/icon?job=TelegramBotAPI_master__publishing)](https://jenkins.insanusmokrassar.com/job/TelegramBotAPI_master__publishing/)
## What is it?
Library for Object-Oriented and type-safe work with Telegram Bot API. Most part of some specific solves or unuseful
moments are describing by official [Telegram Bot API](https://core.telegram.org/bots/api).
## Compatibility
This version compatible with [30th of March 2020 update of TelegramBotAPI (version 4.7)](https://core.telegram.org/bots/api#march-30-2020).
There is only one exception of implemented functionality - Telegram Passport API, which was presented in
[August 2018 update of TelegramBotAPI](https://core.telegram.org/bots/api-changelog#august-27-2018) update. It will be implemented
as soon as possible.
## How to implement library?
Common ways to implement this library are presented here. In some cases it will require additional steps
like inserting of additional libraries (like `kotlin stdlib`). In the examples will be used variable
`telegrambotapi.version`, which must be set up by developer. Available versions are presented on
[bintray](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI), next version is last published:
[![Download](https://api.bintray.com/packages/insanusmokrassar/StandardRepository/TelegramBotAPI/images/download.svg) ](https://bintray.com/insanusmokrassar/StandardRepository/TelegramBotAPI/_latestVersion)
Currently, last versions of library can be available from the Maven repository with errors (for the reason difficult in publishing
of signed artifacts in Bintray). You can:
* Use earlier version (available version you can find
[here](https://mvnrepository.com/artifact/com.github.insanusmokrassar/TelegramBotAPI))
* Add `jCenter` repository in build config
### Maven
Dependency config presented here:
```xml
<dependency>
<groupId>com.github.insanusmokrassar</groupId>
<artifactId>TelegramBotAPI</artifactId>
<version>${telegrambotapi.version}</version>
</dependency>
```
### Gradle
To use last versions you will need to add one line in repositories block of your `build.gradle`:
`jcenter()` or `mavenCentral()`
And add next line to your dependencies block:
```groovy
implementation "com.github.insanusmokrassar:TelegramBotAPI:$telegrambotapi_version"
```
or for old gradle:
```groovy
compile "com.github.insanusmokrassar:TelegramBotAPI:$telegrambotapi_version"
```
## How to work with library?
For now, this library have no some API god-object. Instead of this, this library has several
important objects:
* [RequestsExecutor](https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/RequestsExecutor.kt)
* [Requests](https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests)
* [Types](https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types)
### Types
Types declare different objects representation. For example, `Chat` for now represented as
interface and has several realisations:
* `PrivateChat`
* `GroupChat`
* `SupergroupChat`
* `ChannelChat`
Instead of common garbage with all information as in original [Chat](https://core.telegram.org/bots/api#chat),
here it was separated for more obvious difference between chats types and their possible content.
The same principle work with a lot of others things in this Telegram bot API.
### Requests
Requests usually are very simple objects, but some of them are using their own
build factories. For example, the next code show, how to get information about bot:
```kotlin
val requestsExecutor: RequestsExecutor = ...
requestsExecutor.execute(GetMe())
```
Also there is an alternative syntax for requests (like `requestsExecutor.getMe()` in project
[TelegramBotAPI-extensions-api](../TelegramBotAPI-extensions-api/README.md))
The result type of [GetMe (and getMe extension)](https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/requests/GetMe.kt)
request is
[ExtendedBot](https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/types/User.kt).
### RequestsExecutor
It is base object which can be used to execute requests in API. For now by default included Ktor
realisation of `RequestsExecutor`, but it is possible, that in future it will be extracted in separated
project. How to create `RequestsExecutor`:
```kotlin
val requestsExecutor = KtorRequestsExecutor(
TelegramAPIUrlsKeeper(TOKEN)
)
```
Here:
* `KtorRequestsExecutor` - default realisation with [ktor](https://ktor.io)
* `TelegramAPIUrlsKeeper` - special keeper, which you can save and use for getting files full urls (`resolveFileURL`
extension inside of `PathedFile.kt`)
* `TOKEN` is just a token of bot which was retrieved according to
[instruction](https://core.telegram.org/bots#3-how-do-i-create-a-bot).
By default, for JVM there is implemented `CIO` client engine, but there is not server engine. Both can be changed like
here:
```groovy
dependencies {
// ...
implementation "io.ktor:ktor-server-cio:$ktor_version" // for implementing of server engine
implementation "io.ktor:ktor-client-okhttp:$ktor_version" // for implementing of additional client engine
// ...
}
```
You can avoid using of `server` dependency in case if you will not use `Webhook`s. In this case,
dependencies list will be simplify:
```groovy
dependencies {
// ...
implementation "io.ktor:ktor-client-okhttp:$ktor_version" // for implementing of additional client engine
// ...
}
```
Here was used `okhttp` realisation of client, but there are several others engines for Ktor. More information
available on ktor.io site for [client](https://ktor.io/clients/http-client/engines.html) and [server](https://ktor.io/quickstart/artifacts.html)
engines.
## Getting updates
In this library currently realised two ways to get updates from telegram:
* Polling - in this case bot will request updates from time to time (you can set up delay between requests)
* Webhook via reverse proxy or something like this
### Updates filters
Currently webhook method contains `UpdatesFilter` as necessary argument for getting updates.
`UpdatesFilter` will sort updates and throw their into different callbacks. Currently supporting
separate getting updates for media groups - they are accumulating with debounce in one second
(for being sure that all objects of media group was received).
Updates polling also support `UpdatesFilter` but it is not required to use it and you can get updates directly
in `UpdateReceiver`, which you will provide to `startGettingOfUpdates` method
### Webhook set up
If you wish to use webhook method, you will need:
* White IP - your IP address or host, which available for calling. [TelegramBotAPI](https://core.telegram.org/bots/api#setwebhook)
recommend to use some unique address for each bot which you are using
* SSL certificate. Usually you can obtain the certificate using your domain provider, [Let'sEncrypt](https://letsencrypt.org/) or [create it](https://core.telegram.org/bots/self-signed)
* Nginx or something like this
Template for Nginx server config you can find in [this gist](https://gist.github.com/InsanusMokrassar/fcc6e09cebd07e46e8f0fdec234750c4#file-nginxssl-conf).
For webhook you can provide `File` with public part of certificate, `URL` where bot will be available and inner `PORT` which
will be used to start receiving of updates. Actually, you can skip passing of `File` when you have something like
nginx for proxy forwarding.
In case of using `nginx` with reverse-proxy config, setting up of Webhook will look like:
```kotlin
requestsExecutor.setWebhook(
WEBHOOK_URL,
INTERNAL_PORT,
filter,
ENGINE_FACTORY
)
```
Here:
* `WEBHOOK_URL` - the url which will be used by Telegram system to send updates
* `INTERNAL_PORT` - the port which will be used in bot for listening of updates
* `filter` - instance of [UpdatesFilter](https://github.com/InsanusMokrassar/TelegramBotAPI/blob/master/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/updateshandlers/UpdatesFilter.kt),
which will be used to filter incoming updates
* `ENGINE_FACTORY` - used factory name, for example, `CIO` in case of usage `io.ktor:ktor-server-cio` as server engine

View File

@@ -1,57 +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.withXml {
asNode().children().last() + {
resolveStrategy = Closure.DELEGATE_FIRST
description "Library for Object-Oriented and type-safe work with Telegram Bot API"
name "Telegram Bot API"
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"
}
}
}
}
}
}

View File

@@ -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","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"}]}}

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

View File

@@ -1,18 +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 {
val captionEntities: List<TextPart>
}
fun CaptionedInput.fullEntitiesList() = caption ?.fullListOfSubSource(captionEntities) ?.map { it.source } ?: emptyList()

View File

@@ -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
}

View File

@@ -1,8 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
interface Livable {
/**
* Period in SECONDS
*/
val livePeriod: Int?
}

View File

@@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
interface MimeTyped {
val mimeType: String? // TODO::replace by something like enum or interface
}

View File

@@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
interface Performerable {
val performer: String?
}

View File

@@ -1,17 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
interface TextSource {
val asMarkdownSource: String
val asMarkdownV2Source: String
val asHtmlSource: String
}
interface MultilevelTextSource : TextSource {
val textParts: List<TextPart>
}
data class TextPart(
val range: IntRange,
val source: TextSource
)

View File

@@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts
interface Titled {
val title: String?
}

View File

@@ -1,7 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
import com.github.insanusmokrassar.TelegramBotAPI.types.ChatIdentifier
interface ChatRequest {
val chatId: ChatIdentifier
}

View File

@@ -1,5 +0,0 @@
package com.github.insanusmokrassar.TelegramBotAPI.CommonAbstracts.types
interface DisableNotification {
val disableNotification: Boolean
}

Some files were not shown because too many files have changed in this diff Show More