telegram_libs 0.1.30__tar.gz → 0.1.32__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: telegram_libs
3
- Version: 0.1.30
3
+ Version: 0.1.32
4
4
  Summary: Common libraries for Telegram bots
5
5
  Author: Andrey Gritsaenko gricaenko.95a@gmail.com
6
6
  Requires-Python: >=3.11,<4.0
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "telegram_libs"
3
- version = "0.1.30"
3
+ version = "0.1.32"
4
4
  description = "Common libraries for Telegram bots"
5
5
  authors = ["Andrey Gritsaenko gricaenko.95a@gmail.com"]
6
6
  readme = "README.md"
@@ -109,10 +109,13 @@ class RateLimitManager:
109
109
  async def check_limit_with_response(self, update: Update, context: ContextTypes.DEFAULT_TYPE, user_id: int) -> bool:
110
110
  """Check if user can perform an action and handle the response."""
111
111
  if not self.check_and_increment(user_id):
112
- lang = self.mongo_manager.get_user_info(user_id).get("lang")
112
+ lang = self.mongo_manager.get_user_info(update).get("lang")
113
113
  message = t("rate_limit.exceeded", lang, common=True)
114
114
  await update.message.reply_text(message)
115
- await get_subscription_keyboard(update, lang)
115
+ reply_markup = get_subscription_keyboard(update, lang)
116
+ await update.message.reply_text(
117
+ t("subscription.choose_plan", lang, common=True), reply_markup=reply_markup
118
+ )
116
119
  return False
117
120
  return True
118
121
 
File without changes
File without changes