New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add attribute "correct" for PollOption #788
base: master
Are you sure you want to change the base?
Conversation
46258d2
to
bb9a42b
Compare
bb9a42b
to
8a452d1
Compare
8a452d1
to
c6bde62
Compare
|
Can we add explanation option also |
@kinshusharma0412 I monkeypatched it to include
there is |
Yes explanation added as you say Thanks brother If possible to add explanation in send_poll class. |
I do not know how to attach file so code down blow
|
Here is results Print(message)👇👇👇 { |
After some time This error comes init() got an unexpected keyword argument 'results' But |
No error for this code 👇👇👇 |
Pyrogram - Telegram MTProto API Client Library for PythonCopyright (C) 2017-2021 Dan https://github.com/delivranceThis file is part of Pyrogram.Pyrogram is free software: you can redistribute it and/or modifyit under the terms of the GNU Lesser General Public License as publishedby the Free Software Foundation, either version 3 of the License, or(at your option) any later version.Pyrogram is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU Lesser General Public License for more details.You should have received a copy of the GNU Lesser General Public Licensealong with Pyrogram. If not, see http://www.gnu.org/licenses/.from typing import List, Union import pyrogram class Poll(Object, Update):
|
Pyrogram - Telegram MTProto API Client Library for PythonCopyright (C) 2017-2021 Dan https://github.com/delivranceThis file is part of Pyrogram.Pyrogram is free software: you can redistribute it and/or modifyit under the terms of the GNU Lesser General Public License as publishedby the Free Software Foundation, either version 3 of the License, or(at your option) any later version.Pyrogram is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See theGNU Lesser General Public License for more details.You should have received a copy of the GNU Lesser General Public Licensealong with Pyrogram. If not, see http://www.gnu.org/licenses/.import pyrogram class PollOption(Object):
|
I found that I can't find which answer is correct in a quiz poll. so I created this PR to add the "correct" option for PollOption. This is an essential feature that I need for one of my project.
I've made the "correct" option optional.
Example result of result of PollOption of a quiz poll
I've tested it locally by install it from git repo. seems to work fine (when I print the message/poll, it shows "correct" in poll option when it's a quiz poll, or no "correct" attribute when the poll type is not quiz)