Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: type-hinting in ScheduledEvent.subscribers #2400

Merged
merged 13 commits into from Mar 22, 2024
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -21,6 +21,8 @@ These changes are available on the `master` branch, but have not yet been releas

- Fixed the type-hinting of `Member.move_to` and `Member.edit` to reflect actual
behavior. ([#2386](https://github.com/Pycord-Development/pycord/pull/2386))
- Fixed the type-hinting of `ScheduledEvent.subscribers` to reflect actual behavior.
([#2400](https://github.com/Pycord-Development/pycord/pull/2400))
yoggys marked this conversation as resolved.
Show resolved Hide resolved
- Fixed a deprecation warning from being displayed when running `python -m discord -v`
by replacing the deprecated module.
([#2392](https://github.com/Pycord-Development/pycord/pull/2392))
Expand Down
2 changes: 1 addition & 1 deletion discord/iterators.py
Expand Up @@ -852,7 +852,7 @@ class ScheduledEventSubscribersIterator(_AsyncIterator[Union["User", "Member"]])
def __init__(
self,
event: ScheduledEvent,
limit: int,
limit: int | None,
yoggys marked this conversation as resolved.
Show resolved Hide resolved
with_member: bool = False,
before: datetime.datetime | int = None,
after: datetime.datetime | int = None,
yoggys marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
4 changes: 2 additions & 2 deletions discord/scheduled_events.py
Expand Up @@ -482,11 +482,11 @@ async def cancel(self, *, reason: str | None = None) -> None:
def subscribers(
self,
*,
limit: int = 100,
limit: int | None = 100,
as_member: bool = False,
before: Snowflake | datetime.datetime | None = None,
after: Snowflake | datetime.datetime | None = None,
) -> AsyncIterator:
) -> ScheduledEventSubscribersIterator:
"""Returns an :class:`AsyncIterator` representing the users or members subscribed to the event.

The ``after`` and ``before`` parameters must represent member
Expand Down