Merge pull request #273 from uburuntu/fix-copy-poll

fix: send_copy for poll: missed attribute getting
This commit is contained in:
Alex Root Junior 2020-02-22 23:16:48 +02:00 committed by GitHub
commit a00548c061
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1626,7 +1626,7 @@ class Message(base.TelegramObject):
elif self.poll:
kwargs.pop("parse_mode")
return await self.bot.send_poll(
question=self.poll.question, options=self.poll.options, **kwargs
question=self.poll.question, options=[option.text for option in self.poll.options], **kwargs
)
else:
raise TypeError("This type of message can't be copied.")