Add ALIASES variable to Bot

This commit is contained in:
Joscha 2019-04-12 20:05:36 +00:00
parent 1d772e7215
commit f46ca47a28
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,9 @@
# Changelog # Changelog
## Next version
- add ALIASES variable to Bot
## 0.1.0 (2019-04-12) ## 0.1.0 (2019-04-12)
- use setuptools - use setuptools

View file

@ -14,6 +14,8 @@ logger = logging.getLogger(__name__)
__all__ = ["Bot"] __all__ = ["Bot"]
class Bot(Client): class Bot(Client):
ALIASES: List[str] = []
PING_REPLY: str = "Pong!" PING_REPLY: str = "Pong!"
HELP_GENERAL: Optional[str] = None HELP_GENERAL: Optional[str] = None
HELP_SPECIFIC: Optional[List[str]] = None HELP_SPECIFIC: Optional[List[str]] = None
@ -76,7 +78,7 @@ class Bot(Client):
await command.run(room, message, nicks, data) await command.run(room, message, nicks, data)
async def on_send(self, room: Room, message: LiveMessage) -> None: async def on_send(self, room: Room, message: LiveMessage) -> None:
await self.process_commands(room, message) await self.process_commands(room, message, aliases=self.ALIASES)
# Help util # Help util