diff options
| author | huker667 <huker@tuta.io> | 2026-07-09 16:07:31 +0300 |
|---|---|---|
| committer | huker667 <huker@tuta.io> | 2026-07-09 16:07:31 +0300 |
| commit | ee5a6bdcc379527c537e23b689816555832fda5c (patch) | |
| tree | e6c0d99573a744ea750a821ad7b5cb16ccc242d9 /helpers.py | |
| parent | f6109bb91a0dd4bd2558c087752a381d6ffdb4a3 (diff) | |
| download | uzbekgpt-ee5a6bdcc379527c537e23b689816555832fda5c.tar.gz uzbekgpt-ee5a6bdcc379527c537e23b689816555832fda5c.tar.bz2 uzbekgpt-ee5a6bdcc379527c537e23b689816555832fda5c.zip | |
add poll answer support
Diffstat (limited to 'helpers.py')
| -rw-r--r-- | helpers.py | 26 |
1 files changed, 25 insertions, 1 deletions
@@ -1,6 +1,6 @@ import time -from aiogram.methods import AnswerGuestQuery +from aiogram.methods import AnswerGuestQuery, SendPoll from aiogram.types import InlineQueryResultArticle, InputTextMessageContent, Message from aiogram.enums import ChatType @@ -88,3 +88,27 @@ async def g_answer(data, message, text, title="da", id="1", parse_mode="Markdown ), ) ) + + +async def answer_poll( + data, + message, + question, + options, + is_anonymous=True, + poll_type="regular", + allows_multiple_answers=False, + correct_option_id=None, + user_id=None +): + return await data["bot"]( + SendPoll( + chat_id=user_id, + question=question, + options=options, + is_anonymous=is_anonymous, + type=poll_type, + allows_multiple_answers=allows_multiple_answers, + correct_option_id=correct_option_id, + ) + ) |