hopfenspace / MateBot

Micro service providing an API for MateBot clients

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve the way the command registry handles commands

CrsiX opened this issue · comments

commented

The registry should fulfill the following requirements in any way:

  1. Singleton-like behavior (e.g. prohibit two different instances of a command)
  2. Allow parsing and the generation of help & usage messages (e.g. don't do silly stuff)
  3. Easy to use (e.g. adding and removing commands and so on is simple enaugh)
  4. Divide the command executors from the Telegram updater or handler
commented

The new mate_bot.registry module addressed this issue. It looks like it solves the issue gracefully.