How can i send a poll? I am trying the following code but it returns no error and the poll is not sent: ``` from typing import Optional from telethon.sync import TelegramClient from telethon.tl.types import * from telethon.tl.functions.messages import * def _build_poll(question: str, *answers: str, closed: Optional[bool] = None, id: int = 0) -> InputMediaPoll: """Build a poll object.""" return InputMediaPoll(Poll( id=id, question=question, answers=[ PollAnswer(text=i, option=bytes([idx])) for idx, i in enumerate(answers) ], closed=closed )) poll = _build_poll(f"Question", "Answer 1", "Answer 2", "Answer 3") message = client.send_message(-325188743, file=poll) ``` Is there any better way to submit a poll with telethon?
How can i send a poll? I am trying the following code but it returns no error and the poll is not sent:
Is there any better way to submit a poll with telethon?