Spaces:
Running
Running
BinaryONe
commited on
Commit
·
b345ea7
1
Parent(s):
cedcdbf
Adding Poll In Upload
Browse files
FileStream/bot/plugins/FileHandlers/callback.py
CHANGED
@@ -131,10 +131,10 @@ async def cb_data(bot: Client, update: CallbackQuery):
|
|
131 |
try:
|
132 |
user_id = str(usr_cmd[1])
|
133 |
message_id = int(usr_cmd[2])
|
134 |
-
|
135 |
message = await FileStream.get_messages(user_id, message_id)
|
136 |
-
response = await FileStream.get_messages(user_id,
|
137 |
-
print("Response Update:",update,f"Message ID:{
|
138 |
instruction = {
|
139 |
"privacy_type": "PUBLIC",
|
140 |
"user_id": user_id,
|
@@ -173,17 +173,17 @@ async def cb_data(bot: Client, update: CallbackQuery):
|
|
173 |
"""
|
174 |
update=await FileStream.edit_message_media(
|
175 |
chat_id=user_id,
|
176 |
-
message_id=
|
177 |
media=InputMediaPoll(
|
178 |
poll=Poll(
|
179 |
id=FileStream.rnd_id(),
|
180 |
question="Is this a poll question?",
|
181 |
answers=[
|
182 |
-
PollAnswer("Movie",
|
183 |
-
PollAnswer("WebSeries",
|
184 |
-
PollAnswer("Anime",
|
185 |
-
PollAnswer("Documentary",
|
186 |
-
PollAnswer("Regular",
|
187 |
],
|
188 |
multiple_choice=True,
|
189 |
quiz=False,
|
|
|
131 |
try:
|
132 |
user_id = str(usr_cmd[1])
|
133 |
message_id = int(usr_cmd[2])
|
134 |
+
response_id = int(usr_cmd[3])
|
135 |
message = await FileStream.get_messages(user_id, message_id)
|
136 |
+
response = await FileStream.get_messages(user_id, response_id)
|
137 |
+
print("Response Update:",update,f"Message ID:{response_id}")
|
138 |
instruction = {
|
139 |
"privacy_type": "PUBLIC",
|
140 |
"user_id": user_id,
|
|
|
173 |
"""
|
174 |
update=await FileStream.edit_message_media(
|
175 |
chat_id=user_id,
|
176 |
+
message_id=response_id,
|
177 |
media=InputMediaPoll(
|
178 |
poll=Poll(
|
179 |
id=FileStream.rnd_id(),
|
180 |
question="Is this a poll question?",
|
181 |
answers=[
|
182 |
+
PollAnswer("Movie", bytes([0])),
|
183 |
+
PollAnswer("WebSeries", bytes([1])),
|
184 |
+
PollAnswer("Anime", bytes([2])),
|
185 |
+
PollAnswer("Documentary", bytes([3])),
|
186 |
+
PollAnswer("Regular", bytes([4]))
|
187 |
],
|
188 |
multiple_choice=True,
|
189 |
quiz=False,
|