MCPcopy Create free account
hub / github.com/eternnoir/pyTelegramBotAPI / enable_save_next_step_handlers

Method enable_save_next_step_handlers

telebot/__init__.py:311–327  ·  view source on GitHub ↗

Enable saving next step handlers (by default saving disabled) This function explicitly assigns FileHandlerBackend (instead of Saver) just to keep backward compatibility whose purpose was to enable file saving capability for handlers. And the same implementation is n

(self, delay: Optional[int]=120, filename: Optional[str]="./.handler-saves/step.save")

Source from the content-addressed store, hash-verified

309 return self._user
310
311 def enable_save_next_step_handlers(self, delay: Optional[int]=120, filename: Optional[str]="./.handler-saves/step.save"):
312 """
313 Enable saving next step handlers (by default saving disabled)
314
315 This function explicitly assigns FileHandlerBackend (instead of Saver) just to keep backward
316 compatibility whose purpose was to enable file saving capability for handlers. And the same
317 implementation is now available with FileHandlerBackend
318
319 :param delay: Delay between changes in handlers and saving, defaults to 120
320 :type delay: :obj:`int`, optional
321
322 :param filename: Filename of save file, defaults to "./.handler-saves/step.save"
323 :type filename: :obj:`str`, optional
324
325 :return: None
326 """
327 self.next_step_backend = FileHandlerBackend(self.next_step_backend.handlers, filename, delay)
328
329
330 def enable_saving_states(self, filename: Optional[str]="./.state-save/states.pkl"):

Callers 1

step_example.pyFile · 0.80

Calls 1

FileHandlerBackendClass · 0.90

Tested by

no test coverage detected