embedded bots: Support multi-entry state modification.

This commit is contained in:
derAnfaenger
2017-11-20 14:54:41 +01:00
committed by Tim Abbott
parent cbadd3d430
commit d2af8d4cbd
2 changed files with 22 additions and 23 deletions

View File

@@ -49,9 +49,10 @@ class StateHandler:
def put(self, key: Text, value: Text) -> None:
set_bot_state(self.user_profile, key, self.marshal(value))
set_bot_state(self.user_profile, [(key, self.marshal(value))])
def remove(self, key: Text) -> None:
remove_bot_state(self.user_profile, key)
remove_bot_state(self.user_profile, [key])
def contains(self, key: Text) -> bool:
return is_key_in_bot_state(self.user_profile, key)