telegram_libs 0.1.11__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 +1 -1
- telegram_libs/utils.py +12 -3
- {telegram_libs-0.1.11.dist-info → telegram_libs-0.1.12.dist-info}/METADATA +1 -1
- {telegram_libs-0.1.11.dist-info → telegram_libs-0.1.12.dist-info}/RECORD +6 -6
- {telegram_libs-0.1.11.dist-info → telegram_libs-0.1.12.dist-info}/LICENSE +0 -0
- {telegram_libs-0.1.11.dist-info → telegram_libs-0.1.12.dist-info}/WHEEL +0 -0
telegram_libs/__init__.py
CHANGED
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
|
-
|
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,7 +81,7 @@ 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,
|
75
|
-
"timestamp":
|
84
|
+
"timestamp": datetime.now().isoformat(),
|
76
85
|
"resolved": False,
|
77
86
|
}
|
78
87
|
support_collection.insert_one(support_doc)
|
@@ -98,7 +107,7 @@ async def handle_feedback_response(update: Update, context: ContextTypes.DEFAULT
|
|
98
107
|
"username": update.effective_user.username,
|
99
108
|
"feedback": update.message.text,
|
100
109
|
"bot_name": bot_name,
|
101
|
-
"timestamp":
|
110
|
+
"timestamp": datetime.now().isoformat(),
|
102
111
|
}
|
103
112
|
feedback_collection.insert_one(feedback_doc)
|
104
113
|
await update.message.reply_text(t("feedback.response", update.effective_user.language_code, common=True))
|
@@ -1,12 +1,12 @@
|
|
1
|
-
telegram_libs/__init__.py,sha256=
|
1
|
+
telegram_libs/__init__.py,sha256=Goxb5nZfiXVHZrzSy70a7AtGf3AiUSDJhBWl57NR_g4,82
|
2
2
|
telegram_libs/constants.py,sha256=F6pgwAuv2FgGZxxFwYYJomM4_hosexLoYsvHXQiuVNg,538
|
3
3
|
telegram_libs/locales/en.json,sha256=kMGNE9ThGbaKH3PwappBGkWRgTupPETTG46zCMU5myk,749
|
4
4
|
telegram_libs/locales/ru.json,sha256=lShsh98seaHRtanmq1IRv8_bgRLieTaq-jHjaoOwS0M,1134
|
5
5
|
telegram_libs/mongo.py,sha256=7UOy_cE0ofIbH7QiiirAjOgo_FM9JImtgxQ8ouEsFeo,245
|
6
6
|
telegram_libs/subscription.py,sha256=d7xmzplUrm1nNlWlkqW6dddOYa3t_7PAM3iPme0K5F0,1690
|
7
7
|
telegram_libs/translation.py,sha256=8Kb2cgqKKZH4X_i2Le0V_K1imZdoaCzYAca831DOBig,2049
|
8
|
-
telegram_libs/utils.py,sha256=
|
9
|
-
telegram_libs-0.1.
|
10
|
-
telegram_libs-0.1.
|
11
|
-
telegram_libs-0.1.
|
12
|
-
telegram_libs-0.1.
|
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,,
|
File without changes
|
File without changes
|