1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Update of state handlers

No need to create state handlers
This commit is contained in:
_run
2021-10-01 15:56:54 +05:00
parent 4a6b5b3d28
commit 2e4280a947
4 changed files with 77 additions and 93 deletions

View File

@@ -179,6 +179,10 @@ class State:
"""
self.add_state(chat_id,new_state)
def _add_data(self, chat_id, key, value):
result = self._states[chat_id]['data'][key] = value
return result
def finish(self, chat_id):
"""
Finish(delete) state of a user.