Skip to content

Commit

Permalink
Add missing import & Fix typehint of thread
Browse files Browse the repository at this point in the history
  • Loading branch information
izxxr authored Sep 7, 2021
1 parent eb49f07 commit 6fdc107
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions discord/raw_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

from typing import TYPE_CHECKING, Optional, Set, List

from .enums import ChannelType, try_enum

if TYPE_CHECKING:
from .types.raw_models import (
MessageDeleteEvent,
Expand Down Expand Up @@ -293,7 +295,7 @@ class RawThreadDeleteEvent(_RawReprMixin):
The ID of the guild the deleted thread belonged to.
parent_id: :class:`int`
The ID of the channel the thread belonged to.
thread: :class:`Optional[discord.Thread]`
thread: Optional[:class:`discord.Thread`]
The thread that was deleted. This may be ``None`` if deleted thread is not found in internal cache.
"""
# TODO: Typehint data as RawThreadDeleteEvent when added to types.raw_models
Expand All @@ -302,6 +304,6 @@ def __init__(self, data) -> None:
self.thread_type: ChannelType = try_enum(ChannelType, data.get('type'))
self.guild_id: int = data.get('guild_id')
self.parent_id: int = data.get('parent_id')
self.thread: Thread = None
self.thread: Optional[Thread] = None


0 comments on commit 6fdc107

Please sign in to comment.