Spaces:
Running
Running
BinaryONe
commited on
Commit
·
4f269a1
1
Parent(s):
9c4f610
changes In Upload
Browse files
FileStream/bot/plugins/FileHandlers/callback.py
CHANGED
@@ -141,14 +141,21 @@ async def cb_data(bot: Client, update: CallbackQuery):
|
|
141 |
new_question = file_caption
|
142 |
new_options = ["Yes", "No", "Maybe"]
|
143 |
poll = raw.types.InputMediaPoll(
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
|
|
|
|
149 |
)
|
150 |
-
|
151 |
-
|
|
|
|
|
|
|
|
|
|
|
152 |
"""
|
153 |
print(polls)
|
154 |
file_info = get_file_info(message, instruction)
|
|
|
141 |
new_question = file_caption
|
142 |
new_options = ["Yes", "No", "Maybe"]
|
143 |
poll = raw.types.InputMediaPoll(
|
144 |
+
poll=raw.types.Poll(
|
145 |
+
id=FileStream.rnd_id(),
|
146 |
+
question=new_question,
|
147 |
+
answers=[
|
148 |
+
raw.types.PollAnswer(text=text, option=bytes([i]))
|
149 |
+
for i, text in enumerate(new_options)
|
150 |
+
]
|
151 |
)
|
152 |
+
)
|
153 |
+
await FileStream.edit_message_media(
|
154 |
+
user_id=user_id,
|
155 |
+
message_id=message_id,
|
156 |
+
media=poll,
|
157 |
+
caption="" # Add an empty caption if required)
|
158 |
+
)
|
159 |
"""
|
160 |
print(polls)
|
161 |
file_info = get_file_info(message, instruction)
|