More work on Matrix, move commands to new HTML locales, fix Mastodon

This commit is contained in:
2024-06-28 01:57:42 +02:00
parent 2c73846554
commit 4afb5f3275
28 changed files with 307 additions and 271 deletions

View File

@ -25,7 +25,7 @@ def luaAttributeFilter(obj, attr_name, is_setting):
# TODO make print behave the same as normal Lua, and expose a function for printing without newlines
def cLua(context:EventContext, data:InputMessageData) -> None:
# TODO update quoted api getting
scriptText = (data.command.body or (data.Quoted and data.Quoted.Body))
scriptText = (data.command.body or (data.quoted and data.quoted.text_plain))
if not scriptText:
return SendMessage(context, {"Text": "You must provide some Lua code to execute."})
luaRuntime = NewLuaRuntime(max_memory=LuaMemoryLimit, register_eval=False, register_builtins=False, attribute_filter=luaAttributeFilter)