139 Commits

Author SHA1 Message Date
Akulij
e3e8a0cf79 refactor /src/botscript/application.rs 2025-06-08 15:05:41 +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
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
f08af9609e sdfalkajsdfj
Some checks failed
Build && Deploy / cargo build (push) Failing after 10m46s
2025-06-01 13:39:10 +05:00
Akulij
f8628a11f5 make BotRuntime for js runtime management
Some checks failed
Build && Deploy / cargo build (push) Has been cancelled
2025-06-01 12:06:38 +05:00
Akulij
af85c57c67 change order of drop for BotController
Some checks failed
Build && Deploy / cargo build (push) Has been cancelled
2025-06-01 11:38:04 +05:00
Akulij
b980a653cb attach user_application to runner 2025-05-31 13:46:54 +05:00
Akulij
bee93b32d1 use BotController 2025-05-31 10:48:52 +05:00
Akulij
0265942449 enable Send for BotController 2025-05-31 10:48:15 +05:00
Akulij
e993a6c941 derive Clone on Config 2025-05-31 10:47:49 +05:00
Akulij
67ad3c2acd plug provided handlers in start_bot 2025-05-28 11:11:25 +05:00
Akulij
866a028de1 move out bot handlers to separate module 2025-05-28 11:10:32 +05:00
Akulij
d10acc992a start bot instances in main 2025-05-27 14:21:36 +05:00
Akulij
8e3c647727 fix: handle io and RwLock error for bot manager 2025-05-27 14:20:02 +05:00
Akulij
8fed0daf4c extend BotController creation implementation 2025-05-27 14:17:29 +05:00
Akulij
e1b6b5aa10 derive Clone for BotController 2025-05-27 14:14:23 +05:00
Akulij
4a35243a4c store RunnerConfig in BotController as atomic rw lock for thread safety 2025-05-27 14:13:28 +05:00
Akulij
1757571f35 create bot_name field in Config 2025-05-27 14:11:33 +05:00
Akulij
77ba6dcfc5 define const MAIN_BOT_SCRIPT 2025-05-27 14:10:48 +05:00
Akulij
6ac3665dee fix: add bot_handler to compile tree 2025-05-27 04:17:26 +05:00
Akulij
ef5d74cf1c create bot_manager module to handle background bot start 2025-05-27 04:17:05 +05:00
Akulij
d5dbaa0b75 refactor message answer and replace 2025-05-25 09:40:41 +05:00
Akulij
4548419946 implement botscript_command_handler 2025-05-23 16:36:34 +05:00
Akulij
e8dbf3db76 access RunnerConfig instead of manually using commands hash map 2025-05-23 16:29:54 +05:00
Akulij
d174ee7bc7 fix: handle Runner in BotController
reason: earlier, Runner and js runtime in it were freed after init of
BotController, which potentially was able to lead into hanging function
in config without runtime, BUT, there is check in in JS_FreeRuntime to
have zero objects, so bug found without hesitation ;)
2025-05-21 14:07:02 +05:00
Akulij
2ccfc19a6c create filter to handle botscript-defined commands 2025-05-20 02:47:00 +05:00
Akulij
0e10cdbdf0 create command module
defines BotCommand struct
2025-05-20 01:07:11 +05:00
Akulij
29cd73e98f create basic handler to answer BotMessage 2025-05-20 00:44:08 +05:00
Akulij
3d9a1c31b4 use RunnerConfig in BotController 2025-05-20 00:42:32 +05:00
Akulij
08c1b67f02 create botscript runner 2025-05-10 03:27:35 +03:00
Akulij
4ba2d87ee0 create function for user replies to support
All checks were successful
Build && Deploy / cargo build (push) Successful in 36s
2025-05-09 20:35:39 +03:00
Akulij
2cf71b964d update users state to MessageForwardReply on support reply 2025-05-09 19:09:09 +03:00
Akulij
abc079831d create MessageForwardReply state 2025-05-09 19:08:37 +03:00
Akulij
2590055ea1 fix: enable html parse mode for message sent from support
All checks were successful
Build && Deploy / cargo build (push) Successful in 38s
2025-05-09 00:29:36 +03:00
Akulij
aaed6fcdca store MessageForward in LeaveApplication callback 2025-05-09 00:29:16 +03:00
Akulij
c1c331ab29 return chat and message id in answer message 2025-05-09 00:24:59 +03:00
Akulij
729f0c3eea return teloxide's Message struct in send_application_to_chat 2025-05-09 00:23:41 +03:00
Akulij
27a829b784 create AdminMisconfiguration error 2025-05-09 00:21:54 +03:00
Akulij
c69b6595fd handle replies to MessageForward from support chat 2025-05-08 23:55:23 +03:00
Akulij
4277fc5523 use answer_message_varianted_silence_flag in replace message
All checks were successful
Build && Deploy / cargo build (push) Successful in 56s
2025-05-04 19:18:33 +03:00
Akulij
4e95c846d1 use text variations in replace_message 2025-05-04 19:18:05 +03:00
Akulij
624951392e create answer_message_varianted_silence_flag
reason: to be able to silence if it used as fallback in replace_message
2025-05-04 19:17:27 +03:00
Akulij
f69eff72d6 store variant in Message 2025-05-04 19:14:54 +03:00
Akulij
af53efca0e change variant_text naming asnwer_message_varianted, to not mix up with argument 2025-05-04 19:14:11 +03:00
Akulij
c371f81008 send /start message variants based on meta (?start=...)
All checks were successful
Build && Deploy / cargo build (push) Successful in 59s
2025-05-04 18:43:10 +03:00
Akulij
e68ba4b796 implement variant editing thru Edit state 2025-05-04 18:41:40 +03:00
Akulij
f86286b1d4 use variant in answer_message_varianted 2025-05-04 18:11:55 +03:00