Fix Webhook poll sending raising AttributeError with a mocked state

This commit is contained in:
DA344
2024-05-15 20:45:06 -04:00
committed by GitHub
parent 9d979d3df1
commit 2751b55357
+5
View File
@@ -721,6 +721,11 @@ class _WebhookState:
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)