add poll answer support
This commit is contained in:
1 parent
f6109bb91a
commit
ee5a6bdcc3
4 files changed
+100
-4
No files matched your search
+25
-1
@@ -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,
|
||||
)
|
||||
)
|
||||
Reference in new issue
Block a user