Skip to content

Commit

Permalink
Fix Webhook poll sending raising AttributeError with a mocked state
Browse files Browse the repository at this point in the history
  • Loading branch information
DA-344 authored May 16, 2024
1 parent 9d979d3 commit 2751b55
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions discord/webhook/async_.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,11 @@ def _get_guild(self, guild_id: Optional[int]) -> Optional[Guild]:
return self._parent._get_guild(guild_id)
return None

def _get_poll(self, msg_id: Optional[int]) -> Optional[Poll]:
if self._parent is not None:
return self._parent._get_poll(msg_id)
return None

def store_user(self, data: Union[UserPayload, PartialUserPayload], *, cache: bool = True) -> BaseUser:
if self._parent is not None:
return self._parent.store_user(data, cache=cache)
Expand Down

0 comments on commit 2751b55

Please sign in to comment.