390 Commits

Author SHA1 Message Date
Akulij
5ff1d3f49e temporarly use debug version
Some checks failed
Build && Deploy / cargo build (push) Has been cancelled
2025-05-31 15:22:02 +05:00
Akulij
351dd27ab3 more debug info
Some checks failed
Build && Deploy / cargo build (push) Has been cancelled
2025-05-31 15:19:06 +05:00
Akulij
a47665c9c0 more debug info
Some checks failed
Build && Deploy / cargo build (push) Has been cancelled
2025-05-31 15:13:31 +05:00
Akulij
4eab8e1f26 more debug info
Some checks failed
Build && Deploy / cargo build (push) Has been cancelled
2025-05-31 15:05:56 +05:00
Akulij
198c363038 temporarly use println
Some checks failed
Build && Deploy / cargo build (push) Has been cancelled
2025-05-31 14:57:39 +05:00
Akulij
a2455008ba more debug info
Some checks failed
Build && Deploy / cargo build (push) Has been cancelled
2025-05-31 14:40:20 +05:00
Akulij
f5d108d350 add debug info when calling js handler
Some checks failed
Build && Deploy / cargo build (push) Has been cancelled
2025-05-31 14:32:23 +05:00
Akulij
126708d8fa set literal for leave_application 2025-05-31 14:32:08 +05:00
Akulij
689d191d53 cd.yaml: install clang for quickjs-ng compilation
All checks were successful
Build && Deploy / cargo build (push) Successful in 54s
2025-05-31 14:10:38 +05:00
Akulij
e9059f2bdf create build.yaml workflow to test build on dev branch
All checks were successful
Build && Deploy / cargo build (push) Successful in 1m48s
2025-05-31 14:07:10 +05:00
Akulij
adad94ad43 update mainbot.js logic 2025-05-31 13:47:46 +05:00
Akulij
714853730a create /cancel command for users 2025-05-31 13:47:14 +05:00
Akulij
b980a653cb attach user_application to runner 2025-05-31 13:46:54 +05:00
Akulij
b8d07d0ad5 create MessageForward.store_db to store by DB type
reason: easier to use with RwLock
2025-05-31 13:45:45 +05:00
Akulij
2e447e87fd create Application.store_db to store by DB type 2025-05-31 13:45:02 +05:00
Akulij
d749b57811 call js function handler if set in script_handler 2025-05-31 13:43:41 +05:00
Akulij
a106891050 create call_attacher for Runner to attach global objects on initialization 2025-05-31 13:42:54 +05:00
Akulij
9cd0765030 create BotMessage js function handler getter 2025-05-31 13:42:10 +05:00
Akulij
bc46e0fda4 create BotFunction context getter 2025-05-31 13:41:42 +05:00
Akulij
845071c800 create botscript application module for js's runtime user_application function 2025-05-31 13:39:17 +05:00
Akulij
c936ea38a9 update mainbot.js 2025-05-31 11:04:35 +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
6dfe9b839d fix logic: move bot insertion to db to /deploy command, instead of function in bot_manager 2025-05-31 10:45:34 +05:00
Akulij
f27fb670bd create BotManager 2025-05-31 10:43:05 +05:00
Akulij
22025cde11 handle callbacks in script_handler 2025-05-31 10:35:52 +05:00
Akulij
3bd16a58cd add replace flag to BotMessage 2025-05-31 10:34:29 +05:00
Akulij
474795bd99 create RunnerConfig.get_callback_message 2025-05-31 10:34:06 +05:00
Akulij
fdf1e352a6 add buttons field to BotDialog 2025-05-31 10:33:26 +05:00
Akulij
39e376195c create BotInstance::update_script 2025-05-31 10:31:09 +05:00
Akulij
308b15ed69 create BotInstance::restart_one and restart_all 2025-05-31 10:30:39 +05:00
Akulij
102fae25c7 create BotInstance::get_by_name 2025-05-31 10:30:03 +05:00
Akulij
bc2397a32c derive Clone for BotInstance 2025-05-31 10:29:03 +05:00
Akulij
fde7087172 create /newscript command handler 2025-05-31 10:28:22 +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
e63187dcd3 rename botscript_command_handler to more correct handle_botmessage 2025-05-28 10:15:30 +05:00
Akulij
098cff72bd delete inspector in botscript handler 2025-05-28 10:14:14 +05:00
Akulij
d428c8798d make script_handler return a public type 2025-05-27 15:35:40 +05:00
Akulij
6eb6f2f454 fix: start bot with it's db name 2025-05-27 15:34:50 +05:00
Akulij
2fdd8a346d fix: instead of actually starting bot on /deploy, just put info in DB
reason: it's not a responsibility of /deploy command to store bot info
AND starting bot thread, isntead it is responsible only for storing info
in DB, as every other command does, and then bot will lazily start by
bot manager
2025-05-27 15:12:14 +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