Hoist webhook detection outside of store_user helper

This commit is contained in:
Rapptz committed 2023-06-11 12:41:04 -04:00
1 parent 94bf7d8644
commit f1bade4bda
4 files changed
+8 -9

No files matched your search

+2 -2
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