__init__.py 624 B

123456789101112131415161718192021222324
  1. from ..types import CommandConfiguration
  2. from .as_command import as_command, decorated_commands
  3. from .on_event import on_startup, on_shutdown, decorated_startup, decorated_shutdown
  4. from .error_handling import with_failure_handling
  5. __all__ = [
  6. "as_command",
  7. "on_startup",
  8. "on_shutdown",
  9. "get_command_config",
  10. "with_failure_handling",
  11. ]
  12. def get_command_config() -> CommandConfiguration:
  13. return CommandConfiguration(
  14. commands=decorated_commands,
  15. call_and_response={},
  16. aliases={},
  17. bangs=(),
  18. startup=decorated_startup,
  19. shutdown=decorated_shutdown,
  20. )