From f46ca47a28d10a95c8f65b70febe1bf3a1fe6929 Mon Sep 17 00:00:00 2001 From: Joscha Date: Fri, 12 Apr 2019 20:05:36 +0000 Subject: [PATCH] Add ALIASES variable to Bot --- CHANGELOG.md | 4 ++++ yaboli/bot.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 441303b..ed9a9d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## Next version + +- add ALIASES variable to Bot + ## 0.1.0 (2019-04-12) - use setuptools diff --git a/yaboli/bot.py b/yaboli/bot.py index 1777498..23ecf32 100644 --- a/yaboli/bot.py +++ b/yaboli/bot.py @@ -14,6 +14,8 @@ logger = logging.getLogger(__name__) __all__ = ["Bot"] class Bot(Client): + ALIASES: List[str] = [] + PING_REPLY: str = "Pong!" HELP_GENERAL: Optional[str] = None HELP_SPECIFIC: Optional[List[str]] = None @@ -76,7 +78,7 @@ class Bot(Client): await command.run(room, message, nicks, data) 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