Dummy command for testing.
| 14 | |
| 15 | |
| 16 | class DummyCommand(UnifiedCommand): |
| 17 | """Dummy command for testing.""" |
| 18 | |
| 19 | def __init__( |
| 20 | self, name="test", description="Test command", aliases=None, help_text=None |
| 21 | ): |
| 22 | super().__init__() |
| 23 | self._name = name |
| 24 | self._description = description |
| 25 | self._aliases = aliases or [] |
| 26 | self._help_text = help_text |
| 27 | |
| 28 | @property |
| 29 | def name(self) -> str: |
| 30 | return self._name |
| 31 | |
| 32 | @property |
| 33 | def description(self) -> str: |
| 34 | return self._description |
| 35 | |
| 36 | @property |
| 37 | def modes(self): |
| 38 | return CommandMode.ALL |
| 39 | |
| 40 | @property |
| 41 | def aliases(self): |
| 42 | return self._aliases |
| 43 | |
| 44 | @property |
| 45 | def hidden(self): |
| 46 | return False |
| 47 | |
| 48 | @property |
| 49 | def help_text(self): |
| 50 | return self._help_text |
| 51 | |
| 52 | async def execute(self, **kwargs) -> CommandResult: |
| 53 | return CommandResult(success=True, output=f"{self.name} executed") |
| 54 | |
| 55 | |
| 56 | class DummyCommandGroup(CommandGroup): |
no outgoing calls