mirror of
https://gitlab.com/octospacc/WinDog.git
synced 2025-02-21 05:50:44 +01:00
17 lines
544 B
Python
Executable File
17 lines
544 B
Python
Executable File
# ================================== #
|
|
# 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 # TODO send error message
|
|
SendMessage(context, {"TextPlain": json_dumps(message, default=(lambda obj: obj.__dict__), indent=" ")})
|
|
|
|
RegisterModule(name="Dumper", group="Geek", endpoints=[
|
|
SafeNamespace(names=["dump"], handler=cDump),
|
|
])
|
|
|