Hoist webhook detection outside of store_user helper

This commit is contained in:
Rapptz
2023-06-11 12:21:37 -04:00
parent 94bf7d8644
commit f1bade4bda
4 changed files with 8 additions and 9 deletions

View File

@ -715,9 +715,9 @@ class _WebhookState:
return self._parent._get_guild(guild_id)
return None
def store_user(self, data: Union[UserPayload, PartialUserPayload]) -> BaseUser:
def store_user(self, data: Union[UserPayload, PartialUserPayload], *, cache: bool = True) -> BaseUser:
if self._parent is not None:
return self._parent.store_user(data)
return self._parent.store_user(data, cache=cache)
# state parameter is artificial
return BaseUser(state=self, data=data) # type: ignore