From a469f2dc0c4e483d26e32fdce356e7508d127c6e Mon Sep 17 00:00:00 2001 From: JL710 Date: Mon, 25 Aug 2025 20:09:58 +0200 Subject: [PATCH 1/2] fix: datetime type for create_scheduled_event --- CHANGELOG.md | 2 ++ discord/guild.py | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d76398448..5d79649429 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -140,6 +140,8 @@ These changes are available on the `master` branch, but have not yet been releas ([#2843](https://github.com/Pycord-Development/pycord/pull/2843)) - Fixed `TypeError` when using `@option` with certain annotations and along with `channel_types`. ([#2835](https://github.com/Pycord-Development/pycord/pull/2835)) +- Fixed type hint for argument `start_time` and `end_time` of `Guild.create_scheduled_event` + ([#2879](https://github.com/Pycord-Development/pycord/pull/2879)) ### Changed diff --git a/discord/guild.py b/discord/guild.py index 488f4aa074..1bbbd65bed 100644 --- a/discord/guild.py +++ b/discord/guild.py @@ -3831,8 +3831,8 @@ async def create_scheduled_event( *, name: str, description: str = MISSING, - start_time: datetime, - end_time: datetime = MISSING, + start_time: datetime.datetime, + end_time: datetime.datetime = MISSING, location: str | int | VoiceChannel | StageChannel | ScheduledEventLocation, privacy_level: ScheduledEventPrivacyLevel = ScheduledEventPrivacyLevel.guild_only, reason: str | None = None, From 47f0b74ca074f846470fe97b348c899f6e3f7c39 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 18:10:29 +0000 Subject: [PATCH 2/2] style(pre-commit): auto fixes from pre-commit.com hooks --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d79649429..796c50ca4b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -140,7 +140,8 @@ These changes are available on the `master` branch, but have not yet been releas ([#2843](https://github.com/Pycord-Development/pycord/pull/2843)) - Fixed `TypeError` when using `@option` with certain annotations and along with `channel_types`. ([#2835](https://github.com/Pycord-Development/pycord/pull/2835)) -- Fixed type hint for argument `start_time` and `end_time` of `Guild.create_scheduled_event` +- Fixed type hint for argument `start_time` and `end_time` of + `Guild.create_scheduled_event` ([#2879](https://github.com/Pycord-Development/pycord/pull/2879)) ### Changed