BinaryONe
commited on
Commit
·
6985e27
1
Parent(s):
45d48f2
Adding Poll In Upload
Browse files
FileStream/bot/plugins/FileHandlers/callback.py
CHANGED
|
@@ -5,8 +5,8 @@ import datetime
|
|
| 5 |
from pyrogram import filters, Client, raw, types,enums
|
| 6 |
from pyrogram.errors import FloodWait
|
| 7 |
from pyrogram.raw import functions
|
| 8 |
-
|
| 9 |
-
from pyrogram.raw.base import PollAnswer, Poll
|
| 10 |
from pyrogram.enums.parse_mode import ParseMode
|
| 11 |
from pyrogram.file_id import FileId, FileType, PHOTO_TYPES
|
| 12 |
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery, WebAppInfo
|
|
@@ -182,12 +182,19 @@ async def cb_data(bot: Client, update: CallbackQuery):
|
|
| 182 |
message_id=response_id,
|
| 183 |
media=InputMediaPoll(
|
| 184 |
poll=Poll(
|
|
|
|
| 185 |
question="Is this a poll question?",
|
| 186 |
-
answers=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 187 |
multiple_choice=True,
|
| 188 |
-
|
| 189 |
),
|
| 190 |
)
|
|
|
|
| 191 |
print("Update:",update)
|
| 192 |
"""
|
| 193 |
PollAnswer(
|
|
|
|
| 5 |
from pyrogram import filters, Client, raw, types,enums
|
| 6 |
from pyrogram.errors import FloodWait
|
| 7 |
from pyrogram.raw import functions
|
| 8 |
+
from pyrogram.raw.types import Poll,PollAnswer
|
| 9 |
+
#from pyrogram.raw.base import PollAnswer, Poll
|
| 10 |
from pyrogram.enums.parse_mode import ParseMode
|
| 11 |
from pyrogram.file_id import FileId, FileType, PHOTO_TYPES
|
| 12 |
from pyrogram.types import InlineKeyboardMarkup, InlineKeyboardButton, CallbackQuery, WebAppInfo
|
|
|
|
| 182 |
message_id=response_id,
|
| 183 |
media=InputMediaPoll(
|
| 184 |
poll=Poll(
|
| 185 |
+
id=FileStream.rnd_id(),
|
| 186 |
question="Is this a poll question?",
|
| 187 |
+
answers=[
|
| 188 |
+
PollAnswer(text="Movie", option=bytes([1])),
|
| 189 |
+
PollAnswer(text="WebSeries", option=bytes([2])),
|
| 190 |
+
PollAnswer(text="Anime", option=bytes([3])),
|
| 191 |
+
PollAnswer(text="Documentary", option=bytes([4]))
|
| 192 |
+
],
|
| 193 |
multiple_choice=True,
|
| 194 |
+
quiz=False,
|
| 195 |
),
|
| 196 |
)
|
| 197 |
+
)
|
| 198 |
print("Update:",update)
|
| 199 |
"""
|
| 200 |
PollAnswer(
|