Skip to content

ExitCommand

Base classes

Name Children Inherits
SlashedCommand
slashed.commands
Base class for declarative commands.

⋔ Inheritance diagram

graph TD
  3425274392["help_cmd.ExitCommand"]
  807245086["commands.SlashedCommand"]
  900363605["base.BaseCommand"]
  925645236["abc.ABC"]
  2751680898["builtins.object"]
  807245086 --> 3425274392
  900363605 --> 807245086
  925645236 --> 900363605
  2751680898 --> 925645236

🛈 DocStrings

Bases: SlashedCommand

Exit the chat session.

Usage

/exit

Terminates the current session.

Source code in src/slashed/builtin/help_cmd.py
class ExitCommand(SlashedCommand):
    """Exit the chat session.

    Usage:
      /exit

    Terminates the current session.
    """

    name = "exit"
    category = "system"

    async def execute_command(self, ctx: CommandContext[Any]) -> None:
        """Exit the chat session."""
        msg = "Session ended."
        raise ExitCommandError(msg)

execute_command async

execute_command(ctx: CommandContext[Any]) -> None

Exit the chat session.

Source code in src/slashed/builtin/help_cmd.py
async def execute_command(self, ctx: CommandContext[Any]) -> None:
    """Exit the chat session."""
    msg = "Session ended."
    raise ExitCommandError(msg)

:fa-brands-github: Show source on GitHub