added deck.chat modules
This commit is contained in:
+3
-1
@@ -23,7 +23,9 @@ class DeckChat:
|
||||
def command(self, command, handler):
|
||||
"""
|
||||
Register a new handler inside the chat instance.
|
||||
The handler accepts a single parameter, which is the state object.
|
||||
The handler accepts two parameters: a message and a state object,
|
||||
and returns the response and the new state object.
|
||||
Non-command handler is registered under the 'default' command.
|
||||
"""
|
||||
cmd = command.strip().lower()
|
||||
if cmd.startswith(self.command_prefix):
|
||||
|
||||
Reference in New Issue
Block a user