mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
commit
76dbb05259
@ -6,6 +6,7 @@ import time
|
|||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import six
|
import six
|
||||||
|
import copy
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import pickle
|
import pickle
|
||||||
@ -1287,18 +1288,16 @@ class TeleBot:
|
|||||||
chat_id = message.chat.id
|
chat_id = message.chat.id
|
||||||
was_poped = False
|
was_poped = False
|
||||||
if chat_id in self.next_step_handlers.keys():
|
if chat_id in self.next_step_handlers.keys():
|
||||||
handlers = self.next_step_handlers[chat_id]
|
handlers = copy.deepcopy(self.next_step_handlers[chat_id])
|
||||||
|
self.next_step_handlers.pop(chat_id, None)
|
||||||
if (handlers):
|
if (handlers):
|
||||||
for handler in handlers:
|
for handler in handlers:
|
||||||
self._exec_task(handler["callback"], message, *handler["args"], **handler["kwargs"])
|
self._exec_task(handler["callback"], message, *handler["args"], **handler["kwargs"])
|
||||||
new_messages.pop(i) # removing message that detects with next_step_handler
|
new_messages.pop(i) # removing message that detects with next_step_handler
|
||||||
was_poped = True
|
was_poped = True
|
||||||
self.next_step_handlers.pop(chat_id, None)
|
|
||||||
new_messages.pop(i) # removing message that detects with next_step_handler
|
new_messages.pop(i) # removing message that detects with next_step_handler
|
||||||
if self.next_step_saver is not None:
|
if self.next_step_saver is not None:
|
||||||
self.next_step_saver.start_save_timer()
|
self.next_step_saver.start_save_timer()
|
||||||
i += 1
|
|
||||||
|
|
||||||
if (not was_poped):
|
if (not was_poped):
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user