379 Commits

Author SHA1 Message Date
Akulij
f16554b764 fix: use separate db for tests 2025-06-08 15:38:58 +05:00
Akulij
e239ff1c44 fix test_get_random_users 2025-06-08 15:38:51 +05:00
Akulij
2fefe22846 fix test_drop_media 2025-06-08 15:35:50 +05:00
Akulij
e3e8a0cf79 refactor /src/botscript/application.rs 2025-06-08 15:05:41 +05:00
Akulij
b86a8f4a52 impl ScriptError::from for types BotError and PoisonError 2025-06-08 15:01:14 +05:00
Akulij
7e01186178 use async_trait for RawCall
All checks were successful
Build && Deploy / cargo build (push) Successful in 1m5s
2025-06-07 03:33:13 +05:00
Akulij
12af8f3653 delete unused import 2025-06-07 03:31:34 +05:00
Akulij
fd24b6953e on downloading new script notify admin about failure 2025-06-07 03:31:03 +05:00
Akulij
4b78ebbb7b allow unwrap in src/commands.rs's tests 2025-06-07 03:30:45 +05:00
Akulij
93852b9155 refactor timezoned time creation in botscript 2025-06-07 03:23:35 +05:00
Akulij
1edaac9d8a remove unnecessary use on Arc in Runner 2025-06-07 03:18:06 +05:00
Akulij
51e4d1a1fc fix warnings in botscript/application 2025-06-07 03:17:34 +05:00
Akulij
c0eb5ba412 bot_manager: fix MutexGuard lifetime 2025-06-07 02:59:07 +05:00
Akulij
c3386a1e2f use MessageAnswererError in message_answerer.rs 2025-06-07 02:56:17 +05:00
Akulij
3c0ae02139 fix: reutnr error from bot managers dispatcher 2025-06-07 02:55:29 +05:00
Akulij
0c1ab767d3 handle MessageAnswererError in BotError 2025-06-07 02:55:09 +05:00
Akulij
6776716faf fix $crate literal in query_call_consume macro 2025-06-07 02:54:35 +05:00
Akulij
5399fb682e handle MessageAnswererError in ScriptError 2025-06-07 02:54:08 +05:00
Akulij
c9a3916304 do not use unwrap in botscript/application.rs 2025-06-07 02:53:44 +05:00
Akulij
18d6331344 bot manager: propagate errors 2025-06-07 02:53:06 +05:00
Akulij
f6a5a42b71 propagate error instead of unwrap in bot_handler.rs 2025-06-07 02:52:37 +05:00
Akulij
8e57f5da7e fix: do not box leak in botscript/application 2025-06-07 02:27:42 +05:00
Akulij
e6c9cfb0c1 fix warnings in botscript.rs 2025-06-07 02:27:24 +05:00
Akulij
0c3fb0788a delete unnecessary printlns 2025-06-07 02:10:04 +05:00
Akulij
bd8b1e8843 impl GetCollection via async_trait 2025-06-07 02:08:00 +05:00
Akulij
5a7bb0e0f6 clippy fix 2025-06-07 01:50:30 +05:00
Akulij
4a090de77b fix warnings in src/message_answerer.rs 2025-06-07 01:46:35 +05:00
Akulij
3bb03365ed fix warnings in main.rs 2025-06-07 01:43:50 +05:00
Akulij
b27edd421d delete not used anymore UserCommands 2025-06-07 01:40:12 +05:00
Akulij
7752160807 delete unused functions in main.rs 2025-06-07 01:39:01 +05:00
Akulij
3dbfbe48ce fix: reuse init logic in Runner::init_with_db 2025-06-07 01:37:34 +05:00
Akulij
99403b7282 fix: implement js's db callback without box leak 2025-06-07 01:28:21 +05:00
Akulij
b8bd104f3d use CallbackInfo for buttons 2025-06-06 03:32:58 +05:00
Akulij
6e31fa86e6 create function that stores button parts and creates tg button wrapper 2025-06-06 03:32:27 +05:00
Akulij
bde3c1a0e1 fix: call "answer callback query" when handling callback 2025-06-06 02:08:39 +05:00
Akulij
31d38fbf48 fix: make BotDialog variants optional via providing default value
All checks were successful
Build && Deploy / cargo build (push) Successful in 1m2s
2025-06-06 01:57:04 +05:00
Akulij
a869362bf5 notify admin when literal not found instead of silently failing 2025-06-06 01:51:27 +05:00
Akulij
b114c80097 update handling of varianted messages 2025-06-06 01:38:22 +05:00
Akulij
591244b5a1 craate getter for varianted commands 2025-06-06 01:37:35 +05:00
Akulij
06a6542349 change design of variants implementation in BotConfig 2025-06-06 01:37:03 +05:00
Akulij
0bc7978c99 fix deserialization Message's created_at 2025-06-06 01:35:25 +05:00
Akulij
2e356ac067 make BotMessage's handler to recursively generate BotMessage 2025-06-06 00:19:37 +05:00
Akulij
2662a00776 provide MessageInfo to BotMessage's handler 2025-06-05 23:16:06 +05:00
Akulij
5669de716a create MessageInfo and MessageInfoBuilder 2025-06-05 23:13:39 +05:00
Akulij
6d017b1993 fix: provide default serde value for BotMessage.variants 2025-06-05 23:12:56 +05:00
Akulij
8a3e8c4705 filter variant to use only defined in runtime config
All checks were successful
Build && Deploy / cargo build (push) Successful in 1m5s
2025-06-05 22:59:28 +05:00
Akulij
50e2d6e824 use variants of messages 2025-06-05 22:59:12 +05:00
Akulij
c301b72f0c create MessageVariant 2025-06-05 22:56:52 +05:00
Akulij
4103c5dfbe create BotMessage.update_defaults method for some logic for default values 2025-06-05 22:36:30 +05:00
Akulij
303dbfdaa8 make BotMessage.meta optional 2025-06-05 22:35:51 +05:00