migration to JS engine #1

Merged
akulij merged 131 commits from dev into main 2025-05-31 08:49:52 +00:00
Showing only changes of commit bc46e0fda4 - Show all commits

View File

@ -122,6 +122,13 @@ impl BotFunction {
} }
} }
pub fn context(&self) -> Option<*mut quickjs_rusty::JSContext> {
match &self.func {
FunctionMarker::Function(js_function) => Some(js_function.context()),
FunctionMarker::StrTemplate(_) => None,
}
}
pub fn call(&self) -> ScriptResult<JsValue> { pub fn call(&self) -> ScriptResult<JsValue> {
self.call_args(Default::default()) self.call_args(Default::default())
} }