Skip to content

events

Class info

Classes

Name Children Inherits
CommandExecutedEvent
slashed.events
Event emitted when a command is executed.
    CommandOutputEvent
    slashed.events
    Event emitted when a command is executed.
      CommandRegisteredEvent
      slashed.events
      Event emitted when a command is registered.
        CommandUnregisteredEvent
        slashed.events
        Event emitted when a command is unregistered.

          🛈 DocStrings

          Event definitions for command system.

          CommandExecutedEvent dataclass

          Event emitted when a command is executed.

          Source code in src/slashed/events.py
          @dataclass
          class CommandExecutedEvent[TData]:
              """Event emitted when a command is executed."""
          
              command: str
              context: CommandContext[TData]
              success: bool
              result: Any | None = None
              error: Exception | None = None
          

          CommandOutputEvent dataclass

          Event emitted when a command is executed.

          Source code in src/slashed/events.py
          @dataclass
          class CommandOutputEvent[TData]:
              """Event emitted when a command is executed."""
          
              output: str
              context: CommandContext[TData]
          

          CommandRegisteredEvent dataclass

          Event emitted when a command is registered.

          Source code in src/slashed/events.py
          @dataclass
          class CommandRegisteredEvent:
              """Event emitted when a command is registered."""
          
              command: BaseCommand
          

          CommandUnregisteredEvent dataclass

          Event emitted when a command is unregistered.

          Source code in src/slashed/events.py
          @dataclass
          class CommandUnregisteredEvent:
              """Event emitted when a command is unregistered."""
          
              name: str