-
-
Notifications
You must be signed in to change notification settings - Fork 480
fux: GuildSchedule not being cached correctly #3025
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
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for opening this pull request! This pull request can be checked-out with: git fetch origin pull/3025/head:pr-3025
git checkout pr-3025This pull request can be installed with: pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3025/head |
|
Audit Logs still need to be rework (i didnt understand how it work yet) |
|
should we use use_cache_on_error, instead of only use cache ? that way we will be able to fetch first and if unavailable we will get |
Paillat-dev
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, make this pr not interfere with the recurrence one from anonymous. There will probably be merge conflicts once that one is merged, but they shouldn't both implement recurrence in a different way.
| return self.value | ||
|
|
||
|
|
||
| class ScheduledEventLocationType(ScheduledEventEntityType): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you can probably do something like
@deprecated(...)
def __new__(*args, **kwargs) -> Self:
return super().__new__(*args, **kwargs)
or something
|
|
||
|
|
||
| class ScheduledEventLocationType(ScheduledEventEntityType): | ||
| """Scheduled event location type (deprecated alias for ScheduledEventEntityType)""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| """Scheduled event location type (deprecated alias for ScheduledEventEntityType)""" | |
| """Scheduled event location type (deprecated alias for :class:`ScheduledEventEntityType`)""" |
| @property | ||
| @deprecated(instead="scheduled_start_time", since="2.7", removed="3.0") | ||
| def start_time(self) -> datetime.datetime: | ||
| """ | ||
| Returns the scheduled start time of the event. | ||
| .. deprecated:: 2.7 | ||
| Use :attr:`scheduled_start_time` instead. | ||
| """ | ||
| return self.scheduled_start_time | ||
|
|
||
| @property | ||
| @deprecated(instead="scheduled_end_time", since="2.7", removed="3.0") | ||
| def end_time(self) -> datetime.datetime | None: | ||
| """ | ||
| Returns the scheduled end time of the event. | ||
| .. deprecated:: 2.7 | ||
| Use :attr:`scheduled_end_time` instead. | ||
| """ | ||
| return self.scheduled_end_time | ||
|
|
||
| @property | ||
| @deprecated(instead="user_count", since="2.7", removed="3.0") | ||
| def subscriber_count(self) -> int | None: | ||
| """ | ||
| Returns the number of users subscribed to the event. | ||
| .. deprecated:: 2.7 | ||
| Use :attr:`user_count` instead. | ||
| """ | ||
| return self.user_count |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't really see the point of renaming these, sure it's not the API official name, but it's not that bad here I feel like.
| .. deprecated:: 2.7 | ||
| Use the `image` argument instead. | ||
| Use ``image`` instead. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this mean ?
Summary
summary is not complete, just check the code
Added
New Enums :
ScheduledEventRecurrenceFrequency (yearly, monthly, weekly, daily)
ScheduledEventRecurrenceWeekday (monday-sunday)
ScheduledEventRecurrenceMonth (january-december)
New Classes:
ScheduledEventEntityMetadata (location)
ScheduledEventRecurrenceNWeekday Represents n-weekday entries (e.g., "1st Tuesday")
ScheduledEventRecurrenceRule: Full recurrence rule with validation
Auto-validates on to_payload() serialization
New fields Guild.create_scheduled_event():
Enforces Discord's constraints:
Information
examples, ...).
Checklist
type: ignorecomments were used, a comment is also left explaining why.