matrix-reportbot/commands/__init__.py
Kumi 5997ee8ab1
Implement chat message classification
!gptbot roomsettings command
Permit custom commands (!gptbot custom ...)
2023-05-01 08:12:50 +00:00

27 lines
485 B
Python

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",
]:
function = getattr(import_module(
"commands." + command), "command_" + command)
COMMANDS[command] = function
COMMANDS[None] = command_unknown