telegram_libs 0.1.10__py3-none-any.whl → 0.1.12__py3-none-any.whl

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.
telegram_libs/__init__.py CHANGED
@@ -2,4 +2,4 @@
2
2
  Telegram Libs - Common libraries for Telegram bots
3
3
  """
4
4
 
5
- __version__ = "0.1.10"
5
+ __version__ = "0.1.12"
@@ -9,7 +9,7 @@
9
9
  "info": "Buying a subscription you will get unlimited access to other {0} bots, to see all bots click /more"
10
10
  },
11
11
  "support": {
12
- "message": "If you have any questions or need help, please contact our support team at @support_channel.",
12
+ "message": "If you have any questions or need help, please write it now and we will solve your issue as soon as possible.",
13
13
  "response": "Thank you! Our support team will contact you soon."
14
14
  },
15
15
  "feedback": {
@@ -9,7 +9,7 @@
9
9
  "info": "Купив подписку, вы получите неограниченный доступ к другим {0} ботам, чтобы увидеть всех ботов, нажмите /more"
10
10
  },
11
11
  "support": {
12
- "message": "Если у вас есть вопросы или нужна помощь, пожалуйста, свяжитесь с нашей службой поддержки @support_channel.",
12
+ "message": "Если у вас есть вопросы или нужна помощь, пожалуйста, напишите сейчас, и мы решим вашу проблему как можно скорее.",
13
13
  "response": "Спасибо! Наша служба поддержки свяжется с вами в ближайшее время."
14
14
  },
15
15
  "feedback": {
telegram_libs/utils.py CHANGED
@@ -1,3 +1,6 @@
1
+ from functools import partial
2
+ from logging import basicConfig, getLogger, INFO
3
+ from datetime import datetime
1
4
  from telegram import (
2
5
  InlineKeyboardButton,
3
6
  InlineKeyboardMarkup,
@@ -7,7 +10,13 @@ from telegram.ext import ContextTypes, Application, CommandHandler, MessageHandl
7
10
  from telegram_libs.constants import BOTS_AMOUNT
8
11
  from telegram_libs.translation import t
9
12
  from telegram_libs.mongo import mongo_client
10
- from functools import partial
13
+
14
+
15
+ basicConfig(
16
+ format="%(asctime)s - %(name)s - %(levelname)s - %(message)s", level=INFO
17
+ )
18
+ logger = getLogger(__name__)
19
+
11
20
 
12
21
  FEEDBACK_WAITING = "feedback_waiting"
13
22
  SUPPORT_WAITING = "support_waiting"
@@ -72,6 +81,8 @@ async def handle_support_response(update: Update, context: ContextTypes.DEFAULT_
72
81
  "username": update.effective_user.username,
73
82
  "message": update.message.text,
74
83
  "bot_name": bot_name,
84
+ "timestamp": datetime.now().isoformat(),
85
+ "resolved": False,
75
86
  }
76
87
  support_collection.insert_one(support_doc)
77
88
  await update.message.reply_text(t("support.response", update.effective_user.language_code, common=True))
@@ -96,6 +107,7 @@ async def handle_feedback_response(update: Update, context: ContextTypes.DEFAULT
96
107
  "username": update.effective_user.username,
97
108
  "feedback": update.message.text,
98
109
  "bot_name": bot_name,
110
+ "timestamp": datetime.now().isoformat(),
99
111
  }
100
112
  feedback_collection.insert_one(feedback_doc)
101
113
  await update.message.reply_text(t("feedback.response", update.effective_user.language_code, common=True))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: telegram_libs
3
- Version: 0.1.10
3
+ Version: 0.1.12
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
@@ -0,0 +1,12 @@
1
+ telegram_libs/__init__.py,sha256=Goxb5nZfiXVHZrzSy70a7AtGf3AiUSDJhBWl57NR_g4,82
2
+ telegram_libs/constants.py,sha256=F6pgwAuv2FgGZxxFwYYJomM4_hosexLoYsvHXQiuVNg,538
3
+ telegram_libs/locales/en.json,sha256=kMGNE9ThGbaKH3PwappBGkWRgTupPETTG46zCMU5myk,749
4
+ telegram_libs/locales/ru.json,sha256=lShsh98seaHRtanmq1IRv8_bgRLieTaq-jHjaoOwS0M,1134
5
+ telegram_libs/mongo.py,sha256=7UOy_cE0ofIbH7QiiirAjOgo_FM9JImtgxQ8ouEsFeo,245
6
+ telegram_libs/subscription.py,sha256=d7xmzplUrm1nNlWlkqW6dddOYa3t_7PAM3iPme0K5F0,1690
7
+ telegram_libs/translation.py,sha256=8Kb2cgqKKZH4X_i2Le0V_K1imZdoaCzYAca831DOBig,2049
8
+ telegram_libs/utils.py,sha256=qHxOZ0KfrSKsFDhlpKLjGKDInTBXHmjtPxTHTFkCplE,5125
9
+ telegram_libs-0.1.12.dist-info/LICENSE,sha256=ZXkWPZbCc61L29Gz6ZHPwn1c4Pm0TnfIqtx8jGWi9F4,1069
10
+ telegram_libs-0.1.12.dist-info/METADATA,sha256=8PtxVYaFnAwBi2XFIXu8I2MjTg_6Gq_jmgZS-Q_tI2g,804
11
+ telegram_libs-0.1.12.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
12
+ telegram_libs-0.1.12.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- telegram_libs/__init__.py,sha256=zJ7P4cSnN9eH2I7zKDtM50HAH0CKHfanZjIjnVeJfZA,82
2
- telegram_libs/constants.py,sha256=F6pgwAuv2FgGZxxFwYYJomM4_hosexLoYsvHXQiuVNg,538
3
- telegram_libs/locales/en.json,sha256=l9BAvVgBkvKH_kRiAb9md5Ls0Riv9kfGyXEGca6cOk4,732
4
- telegram_libs/locales/ru.json,sha256=YwxuBb-OeQKqjASCkNqK_Kr2V_wRGrrnEqHXaUMawso,1111
5
- telegram_libs/mongo.py,sha256=7UOy_cE0ofIbH7QiiirAjOgo_FM9JImtgxQ8ouEsFeo,245
6
- telegram_libs/subscription.py,sha256=d7xmzplUrm1nNlWlkqW6dddOYa3t_7PAM3iPme0K5F0,1690
7
- telegram_libs/translation.py,sha256=8Kb2cgqKKZH4X_i2Le0V_K1imZdoaCzYAca831DOBig,2049
8
- telegram_libs/utils.py,sha256=JPntJwEMsUrg1q2AFBBK82o8YAFaewXq652qv7FmWWI,4784
9
- telegram_libs-0.1.10.dist-info/LICENSE,sha256=ZXkWPZbCc61L29Gz6ZHPwn1c4Pm0TnfIqtx8jGWi9F4,1069
10
- telegram_libs-0.1.10.dist-info/METADATA,sha256=AqsjI-HerHwu_7lapgZpuki8AivpvXWPedRWHPmMXcc,804
11
- telegram_libs-0.1.10.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
12
- telegram_libs-0.1.10.dist-info/RECORD,,