mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-09-03 08:35:53 +00:00
Remove _get_poll lookup in Message constructor
This was triggering a terrible performance regression for no good reason for all created messages that didn't have a poll, which is essentially 99.99% of messages leading to MESSAGE_CREATE dispatches having degraded performance.
This commit is contained in:
@ -721,11 +721,6 @@ 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)
|
||||
|
Reference in New Issue
Block a user