matrix-reportbot/commands/__init__.py

31 lines
524 B
Python
Raw Normal View History

from importlib import import_module
from .unknown import command_unknown
COMMANDS = {}
for command in [
"help",
"newroom",
"stats",
"botinfo",
"coin",
"ignoreolder",
"systemmessage",
"imagine",
"calculate",
"classify",
"chat",
"custom",
"privacy",
"roomsettings",
"dice",
"parcel",
2023-05-09 10:27:03 +00:00
"space",
]:
function = getattr(import_module(
"commands." + command), "command_" + command)
COMMANDS[command] = function
COMMANDS[None] = command_unknown