diff --git a/deck/chat.py b/deck/chat.py index 3cc1827..976992a 100644 --- a/deck/chat.py +++ b/deck/chat.py @@ -9,16 +9,13 @@ try: except: pass -def _echo(msg, state): - return msg, state - class DeckChat: def __init__(self, start_state={}, chat_prefix='> ', command_prefix='/', paginate=0): """Init the chat class""" self.command_prefix = command_prefix # prefix that commands start with self.chat_prefix = chat_prefix # prefix to write before input self.command_handlers = { # command handler storage - 'default': _echo # echo handler by default + 'default': lambda m,s: (m,s) # echo handler by default } self.state = start_state # internal state object (impl-specific) self.paginate_n = paginate # paginate the responses exceeding N>0 lines