Skip to content

Commit 6235720

Browse files
authored
Merge branch 'master' into patch-1
2 parents dbe5da3 + b991975 commit 6235720

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ These changes are available on the `master` branch, but have not yet been releas
1515
- Added new AutoMod trigger metadata properties `regex_patterns`, `allow_list`, and
1616
`mention_total_limit`; and added the `mention_spam` trigger type.
1717
([#1809](https://github.com/Pycord-Development/pycord/pull/1809))
18+
- Added missing `image` parameter to `Guild.create_scheduled_event()` method.
19+
([#1831](https://github.com/Pycord-Development/pycord/pull/1831))
1820
- Added new message types, `interaction_premium_upsell`, `stage_start`, `stage_end`,
1921
`stage_speaker`, `stage_raise_hand`, `stage_topic`, and
2022
`guild_application_premium_subscription`.

discord/guild.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3647,6 +3647,7 @@ async def create_scheduled_event(
36473647
location: str | int | VoiceChannel | StageChannel | ScheduledEventLocation,
36483648
privacy_level: ScheduledEventPrivacyLevel = ScheduledEventPrivacyLevel.guild_only,
36493649
reason: str | None = None,
3650+
image: bytes = MISSING,
36503651
) -> ScheduledEvent | None:
36513652
"""|coro|
36523653
Creates a scheduled event.
@@ -3669,6 +3670,8 @@ async def create_scheduled_event(
36693670
so there is no need to change this parameter.
36703671
reason: Optional[:class:`str`]
36713672
The reason to show in the audit log.
3673+
image: Optional[:class:`bytes`]
3674+
The cover image of the scheduled event
36723675
36733676
Returns
36743677
-------
@@ -3706,6 +3709,9 @@ async def create_scheduled_event(
37063709
if end_time is not MISSING:
37073710
payload["scheduled_end_time"] = end_time.isoformat()
37083711

3712+
if image is not MISSING:
3713+
payload["image"] = utils._bytes_to_base64_data(image)
3714+
37093715
data = await self._state.http.create_scheduled_event(
37103716
guild_id=self.id, reason=reason, **payload
37113717
)

discord/http.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2231,6 +2231,7 @@ def create_scheduled_event(
22312231
"description",
22322232
"entity_type",
22332233
"entity_metadata",
2234+
"image",
22342235
)
22352236
payload = {k: v for k, v in payload.items() if k in valid_keys}
22362237

0 commit comments

Comments
 (0)