Add ALIASES variable to Bot
This commit is contained in:
parent
1d772e7215
commit
f46ca47a28
2 changed files with 7 additions and 1 deletions
|
|
@ -1,5 +1,9 @@
|
|||
# Changelog
|
||||
|
||||
## Next version
|
||||
|
||||
- add ALIASES variable to Bot
|
||||
|
||||
## 0.1.0 (2019-04-12)
|
||||
|
||||
- use setuptools
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue