peony.commands package¶
peony.commands.event_handlers module¶
-
class
peony.commands.event_handlers.
EventHandler
(func, event, prefix=None, strict=False)[source]¶ Bases:
peony.commands.tasks.Task
peony.commands.event_types module¶
-
class
peony.commands.event_types.
Event
(func, name)[source]¶ Bases:
object
Represents an event, the handler attribute is an instance of HandlerParameters: - func (callable) – a function that returns True when the data received corresponds to an event
- name (str) – name given to the event
-
class
peony.commands.event_types.
Events
(*args, **kwargs)[source]¶ Bases:
dict
A class to manage event handlers easily
-
class
peony.commands.event_types.
Handler
(event)[source]¶ Bases:
object
A decorator, the decorated function is used when the event is detected related to this handler is detectedParameters: event (func) – a function that returns True when the data received corresponds to an event
peony.commands.tasks module¶
-
peony.commands.tasks.
task
¶ alias of
peony.commands.tasks.Task
peony.commands.utils module¶
-
peony.commands.utils.
doc
(func)[source]¶ - Find the message shown when someone calls the help command
Parameters: func (function) – the function Returns: The help message for this command Return type: str