Skip to content

Commit

Permalink
Update guild.py fetch_members() type hints
Browse files Browse the repository at this point in the history
Actually type hint for None OR int using Union[int, None]
  • Loading branch information
IotaSpencer authored and Lulalaby committed May 5, 2022
1 parent 8d5eda0 commit fb3065d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion discord/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -1731,7 +1731,7 @@ async def active_threads(self) -> List[Thread]:
return threads

# TODO: Remove Optional typing here when async iterators are refactored
def fetch_members(self, *, limit: int = 1000, after: Optional[SnowflakeTime] = None) -> MemberIterator:
def fetch_members(self, *, limit: Union[int, None] = 1000, after: Optional[SnowflakeTime] = None) -> MemberIterator:
"""Retrieves an :class:`.AsyncIterator` that enables receiving the guild's members. In order to use this,
:meth:`Intents.members` must be enabled.
Expand Down

0 comments on commit fb3065d

Please sign in to comment.