Fix RPCError 400 QUIZ_CORRECT_ANSWER_EMPTY (#367)

* Fix RPCError 400 QUIZ_CORRECT_ANSWER_EMPTY

* Fix RPCError 400 QUIZ_CORRECT_ANSWER_EMPTY
This commit is contained in:
trenoduro 2020-03-21 16:03:29 +01:00 committed by GitHub
parent 1996fb1481
commit a2652f02b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,7 @@ class SendPoll(BaseClient):
public_voters=not is_anonymous or None, public_voters=not is_anonymous or None,
quiz=type == "quiz" or None quiz=type == "quiz" or None
), ),
correct_answers=[bytes([correct_option_id])] if correct_option_id else None correct_answers=None if correct_option_id is None else [bytes([correct_option_id])]
), ),
message="", message="",
silent=disable_notification or None, silent=disable_notification or None,