aboutsummaryrefslogtreecommitdiff
path: root/helpers.py
diff options
context:
space:
mode:
Diffstat (limited to 'helpers.py')
-rw-r--r--helpers.py26
1 files changed, 25 insertions, 1 deletions
diff --git a/helpers.py b/helpers.py
index e2450f0..d42b315 100644
--- a/helpers.py
+++ b/helpers.py
@@ -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,
+ )
+ )