mirror of
https://github.com/eternnoir/pyTelegramBotAPI.git
synced 2023-08-10 21:12:57 +03:00
Avoid circular import
This commit is contained in:
@ -1,7 +1,6 @@
|
||||
from pyclbr import Class
|
||||
from telebot.storage.base_storage import StateStorageBase, StateContext
|
||||
import json
|
||||
from telebot.handler_backends import State
|
||||
|
||||
redis_installed = True
|
||||
try:
|
||||
@ -66,7 +65,7 @@ class StateRedisStorage(StateStorageBase):
|
||||
"""
|
||||
response = self.get_record(chat_id)
|
||||
user_id = str(user_id)
|
||||
if isinstance(state, State):
|
||||
if hasattr(state, 'name'):
|
||||
state = state.name
|
||||
|
||||
if response:
|
||||
|
Reference in New Issue
Block a user