fix: send_copy for poll: missed attribute getting

This commit is contained in:
Ramzan Bekbulatov 2020-02-07 15:02:00 +03:00 committed by GitHub
parent 9d94ac62c9
commit 30a17413f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1654,7 +1654,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.")