BinaryONe
commited on
Commit
·
6725133
1
Parent(s):
d2be74d
Polls Update
Browse files
FileStream/bot/plugins/FileHandlers/callback.py
CHANGED
@@ -121,15 +121,12 @@ async def cb_data(bot: Client, update: CallbackQuery):
|
|
121 |
file_caption = getattr(message, "caption", f"{get_name(message)}" ) or "None/Unknown"
|
122 |
file_name = get_name(message)
|
123 |
print("Daetail",file_caption,file_name)
|
124 |
-
await FileStream.delete_messages(
|
125 |
-
chat_id=user_id,
|
126 |
-
message_ids=response_id
|
127 |
-
)
|
128 |
await FileStream.send_poll(
|
129 |
type= enums.PollType.REGULAR,
|
130 |
reply_to_message_id=message_id,
|
131 |
explanation=f"{file_caption}",
|
132 |
-
question=f"{message_id}_{user_id}_File Name :\n{file_caption}",
|
133 |
options=["Movie", "WebSeries", "Anime", "Documentary", "Regular"],
|
134 |
allows_multiple_answers=True,
|
135 |
chat_id=user_id
|
|
|
121 |
file_caption = getattr(message, "caption", f"{get_name(message)}" ) or "None/Unknown"
|
122 |
file_name = get_name(message)
|
123 |
print("Daetail",file_caption,file_name)
|
124 |
+
#await FileStream.delete_messages(chat_id=user_id,message_ids=response_id)
|
|
|
|
|
|
|
125 |
await FileStream.send_poll(
|
126 |
type= enums.PollType.REGULAR,
|
127 |
reply_to_message_id=message_id,
|
128 |
explanation=f"{file_caption}",
|
129 |
+
question=f"{message_id}_{user_id}_{response_id}_File Name :\n{file_caption}",
|
130 |
options=["Movie", "WebSeries", "Anime", "Documentary", "Regular"],
|
131 |
allows_multiple_answers=True,
|
132 |
chat_id=user_id
|
FileStream/bot/plugins/FileHandlers/polls.py
CHANGED
@@ -12,6 +12,7 @@ async def get_result(FileStream , message):
|
|
12 |
question_parts = message.question.split('_')
|
13 |
msg_id = int(question_parts[0])
|
14 |
user_id = int(question_parts[1])
|
|
|
15 |
options_list = [option.text for option in message.options if option.voter_count == 1]
|
16 |
print("OPtion List",options_list, "USERID", user_id, "MSGID", msg_id)
|
17 |
#update FileStream.stop_poll(user_id, message.id)
|
@@ -22,9 +23,10 @@ async def get_result(FileStream , message):
|
|
22 |
}
|
23 |
#"user_id":message.from_user.id if (message.chat.type == ChatType.PRIVATE) else message.chat.id
|
24 |
main_msg= await FileStream.get_messages(user_id, msg_id)
|
|
|
25 |
#reply = await message.reply_text(LANG.PROCESSING_TEXT)
|
26 |
reply_markup, stream_text = await upload_type_func(file_info=get_file_info(main_msg, instruction),replied_message=message.id)
|
27 |
-
await
|
28 |
text=stream_text,
|
29 |
parse_mode=ParseMode.HTML,
|
30 |
disable_web_page_preview=True,
|
|
|
12 |
question_parts = message.question.split('_')
|
13 |
msg_id = int(question_parts[0])
|
14 |
user_id = int(question_parts[1])
|
15 |
+
reply_id= int(question_parts[2])
|
16 |
options_list = [option.text for option in message.options if option.voter_count == 1]
|
17 |
print("OPtion List",options_list, "USERID", user_id, "MSGID", msg_id)
|
18 |
#update FileStream.stop_poll(user_id, message.id)
|
|
|
23 |
}
|
24 |
#"user_id":message.from_user.id if (message.chat.type == ChatType.PRIVATE) else message.chat.id
|
25 |
main_msg= await FileStream.get_messages(user_id, msg_id)
|
26 |
+
reply= await FileStream.get_messages(user_id, reply_id)
|
27 |
#reply = await message.reply_text(LANG.PROCESSING_TEXT)
|
28 |
reply_markup, stream_text = await upload_type_func(file_info=get_file_info(main_msg, instruction),replied_message=message.id)
|
29 |
+
await reply.edit_text(
|
30 |
text=stream_text,
|
31 |
parse_mode=ParseMode.HTML,
|
32 |
disable_web_page_preview=True,
|