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.
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.
Co-authored-by: Paillat <paillat@pycord.dev> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
when anonymous pr will be merged i'll edit it to make it work |
Paillat-dev
left a comment
There was a problem hiding this comment.
I think you mmerged by mistake this pr with the component limits one
|
merge conflicts, please resolve |
|
@Lumabots If you have a moment to fix merge commits |
Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>
|
This pull request does not follow the required pull request template. Please use the default template ( Problems detected: |
|
i added that line mb |
Paillat-dev
left a comment
There was a problem hiding this comment.
Some nitpicks, other than that seems good. I remember testing awhile ago. However I think it would be beneficial to have someone else review as well
| ) = MISSING, | ||
| entity_type: ScheduledEventEntityType = MISSING, | ||
| entity_metadata: ScheduledEventEntityMetadata | None = MISSING, | ||
| channel_id: int | VoiceChannel | StageChannel = MISSING, |
There was a problem hiding this comment.
I think it would be better to accept VoiceChannel | StageChannel | Object and then access .id, and rename the param to channel
| return utils.snowflake_time(self.id) | ||
|
|
||
| @property | ||
| @typing_extensions.deprecated( |
There was a problem hiding this comment.
I think another comment of mine asked to import from typing extensions directly and not like this
| if ( | ||
| entity_type is not MISSING | ||
| and entity_type == ScheduledEventEntityType.external | ||
| ): |
There was a problem hiding this comment.
This validation only runs when entity_type is explicitly passed. I can think of an edge case when someone edits entity_metadata on an already EXTERNAL event without repassing entity_type, an it won't get validated.
| self.scheduled_start_time: datetime.datetime = datetime.datetime.fromisoformat( | ||
| data.get("scheduled_start_time") | ||
| ) | ||
| if end_time := data.get("scheduled_end_time", None): | ||
| end_time = utils.parse_time(end_time) | ||
| self.end_time: datetime.datetime | None = end_time | ||
| if scheduled_end_time := data.get("scheduled_end_time", None): | ||
| scheduled_end_time = datetime.datetime.fromisoformat(scheduled_end_time) | ||
| self.scheduled_end_time: datetime.datetime | None = scheduled_end_time |
There was a problem hiding this comment.
datetime.fromisoformat got full ISO 8601 parsing in 3.11 and since minimum supported version is 3.10 this will raise ValueError if, for instance, it ever gets a z-suffixed timestamp.
Co-authored-by: Paillat <paillat@pycord.dev> Signed-off-by: Lumouille <144063653+Lumabots@users.noreply.github.com>

Summary
summary is not complete, just check the code
I have read the Contributing Guidelines
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.