Browse Source

Remove unnecessary warning logs for poll events

pull/10109/head
Rapptz 11 months ago
committed by dolfies
parent
commit
ba7f8251b3
  1. 14
      discord/state.py

14
discord/state.py

@ -3505,12 +3505,7 @@ class ConnectionState:
if message and user:
poll = self._update_poll_counts(message, raw.answer_id, True, raw.user_id == self.self_id)
if not poll:
_log.warning(
'POLL_VOTE_ADD referencing message with ID: %s does not have a poll. Discarding.', raw.message_id
)
return
if poll:
self.dispatch('poll_vote_add', user, poll.get_answer(raw.answer_id))
def parse_message_poll_vote_remove(self, data: gw.PollVoteActionEvent) -> None:
@ -3528,12 +3523,7 @@ class ConnectionState:
if message and user:
poll = self._update_poll_counts(message, raw.answer_id, False, raw.user_id == self.self_id)
if not poll:
_log.warning(
'POLL_VOTE_REMOVE referencing message with ID: %s does not have a poll. Discarding.', raw.message_id
)
return
if poll:
self.dispatch('poll_vote_remove', user, poll.get_answer(raw.answer_id))
def _get_reaction_user(self, channel: MessageableChannel, user_id: int) -> Optional[Union[User, Member]]:

Loading…
Cancel
Save