Register a command, plus any aliases pointing at the same handler.
(self, command: SlashCommand)
| 134 | self._canonical_names: list[str] = [] |
| 135 | |
| 136 | def register(self, command: SlashCommand) -> None: |
| 137 | """Register a command, plus any aliases pointing at the same handler.""" |
| 138 | if command.name not in self._commands: |
| 139 | self._canonical_names.append(command.name) |
| 140 | self._commands[command.name] = command |
| 141 | for alias in command.aliases: |
| 142 | self._commands[alias] = command |
| 143 | |
| 144 | def lookup(self, raw_input: str) -> tuple[SlashCommand, str] | None: |
| 145 | """Parse a slash command and return its handler plus raw args.""" |
no outgoing calls