mirror of
https://gitlab.com/octospacc/WinDog.git
synced 2025-06-05 22:09:20 +02:00
Misc updates, improve global API, start work on db and module strings
This commit is contained in:
16
ModWinDog/Dumper/Dumper.py
Executable file
16
ModWinDog/Dumper/Dumper.py
Executable file
@ -0,0 +1,16 @@
|
||||
# ================================== #
|
||||
# WinDog multi-purpose chatbot #
|
||||
# Licensed under AGPLv3 by OctoSpacc #
|
||||
# ================================== #
|
||||
|
||||
from json import dumps as json_dumps
|
||||
|
||||
def cDump(context:EventContext, data:InputMessageData):
|
||||
if not (message := ObjGet(data, "quoted")):
|
||||
pass
|
||||
SendMessage(context, {"TextPlain": json_dumps(message, default=(lambda obj: obj.__dict__), indent=" ")})
|
||||
|
||||
RegisterModule(name="Dumper", group="Geek", endpoints=[
|
||||
SafeNamespace(names=["dump"], handler=cDump),
|
||||
])
|
||||
|
Reference in New Issue
Block a user