diff --git a/examples/asynchronous_telebot/custom_states.py b/examples/asynchronous_telebot/custom_states.py index 7658a81..01cc66d 100644 --- a/examples/asynchronous_telebot/custom_states.py +++ b/examples/asynchronous_telebot/custom_states.py @@ -8,7 +8,8 @@ from telebot.asyncio_storage import StateRedisStorage,StateMemoryStorage,StatePi # new feature for states. from telebot.asyncio_handler_backends import State, StatesGroup -bot = AsyncTeleBot('TOKEN') +# default state storage is statememorystorage +bot = AsyncTeleBot('TOKEN', states_storage=StateMemoryStorage()) # Just create different statesgroup diff --git a/telebot/async_telebot.py b/telebot/async_telebot.py index a2edafb..7bdb0dc 100644 --- a/telebot/async_telebot.py +++ b/telebot/async_telebot.py @@ -164,7 +164,7 @@ class AsyncTeleBot: """ def __init__(self, token: str, parse_mode: Optional[str]=None, offset=None, - exception_handler=None, states_storage=StateMemoryStorage()) -> None: # TODO: ADD TYPEHINTS + exception_handler=None, state_storage=StateMemoryStorage()) -> None: # TODO: ADD TYPEHINTS self.token = token self.offset = offset @@ -193,7 +193,7 @@ class AsyncTeleBot: self.custom_filters = {} self.state_handlers = [] - self.current_states = states_storage + self.current_states = state_storage self.middlewares = []