diff options
| author | Rapptz <[email protected]> | 2021-06-10 07:57:41 -0400 |
|---|---|---|
| committer | Rapptz <[email protected]> | 2021-06-10 07:57:41 -0400 |
| commit | fc66c5b92da9964ac50ef36d3a79044b2f77c0b3 (patch) | |
| tree | 1c905ff7c56f9d6a7030699e33d86841d2befefe /discord/webhook | |
| parent | Don't use class attribute syntax for Guild typings (diff) | |
| download | discord.py-fc66c5b92da9964ac50ef36d3a79044b2f77c0b3.tar.xz discord.py-fc66c5b92da9964ac50ef36d3a79044b2f77c0b3.zip | |
Fix some webhook related type checker errors
Diffstat (limited to 'discord/webhook')
| -rw-r--r-- | discord/webhook/async_.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/discord/webhook/async_.py b/discord/webhook/async_.py index 7486415c..18f650ba 100644 --- a/discord/webhook/async_.py +++ b/discord/webhook/async_.py @@ -625,6 +625,8 @@ class WebhookMessage(Message): .. versionadded:: 1.6 """ + _state: _WebhookState + async def edit( self, content: Optional[str] = MISSING, @@ -794,7 +796,7 @@ class BaseWebhook(Hashable): If this is a partial webhook, then this will always return ``None``. """ guild = self.guild - return guild and guild.get_channel(self.channel_id) + return guild and guild.get_channel(self.channel_id) # type: ignore @property def created_at(self) -> datetime.datetime: @@ -1148,7 +1150,7 @@ class Webhook(BaseWebhook): def _create_message(self, data): state = _WebhookState(self, parent=self._state) channel = self.channel or Object(id=int(data['channel_id'])) - return WebhookMessage(data=data, state=state, channel=channel) + return WebhookMessage(data=data, state=state, channel=channel) # type: ignore @overload async def send( |