diff --git a/tgbot/middlewares/subscription.py b/tgbot/middlewares/subscription.py index 1fdbfa7..73ba456 100644 --- a/tgbot/middlewares/subscription.py +++ b/tgbot/middlewares/subscription.py @@ -24,14 +24,14 @@ async def setup_channels(cls, dp: Dispatcher, channels_ids: list[int]) -> None: async def on_process_message(self, message: Message, data: dict) -> None: user = data.get('user') if not user: - raise KeyError(f"User not found in data") + raise KeyError("User not found in data") await self.check_subscriptions(message, user=user) async def on_process_callback_query(self, call: CallbackQuery, data: dict) -> None: user = data.get('user') if not user: - raise KeyError(f"User not found in data") + raise KeyError("User not found in data") await self.check_subscriptions(call.message, user=user, call=call, callback_data=data.get("callback_data")) diff --git a/tgbot/states/__init__.py b/tgbot/states/__init__.py index 6192fb0..eeb5b95 100644 --- a/tgbot/states/__init__.py +++ b/tgbot/states/__init__.py @@ -1,2 +1,7 @@ from .send_all import SendAllState from .ping import PingState + +__all__ = [ + "SendAllState", + "PingState" +]