Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
Lulalaby authored Dec 19, 2022
1 parent 7bcb24f commit 14e5bfd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions discord/guild.py
Original file line number Diff line number Diff line change
Expand Up @@ -3650,7 +3650,7 @@ async def create_scheduled_event(
location: str | int | VoiceChannel | StageChannel | ScheduledEventLocation,
privacy_level: ScheduledEventPrivacyLevel = ScheduledEventPrivacyLevel.guild_only,
reason: str | None = None,
cover: bytes = MISSING,
image: bytes = MISSING,
) -> ScheduledEvent | None:
"""|coro|
Creates a scheduled event.
Expand All @@ -3673,7 +3673,7 @@ async def create_scheduled_event(
so there is no need to change this parameter.
reason: Optional[:class:`str`]
The reason to show in the audit log.
cover: Optional[:class:`bytes`]
image: Optional[:class:`bytes`]
The cover image of the scheduled event
Returns
Expand Down Expand Up @@ -3712,8 +3712,8 @@ async def create_scheduled_event(
if end_time is not MISSING:
payload["scheduled_end_time"] = end_time.isoformat()

if cover is not MISSING:
payload["image"] = utils._bytes_to_base64_data(cover)
if image is not MISSING:
payload["image"] = utils._bytes_to_base64_data(image)

data = await self._state.http.create_scheduled_event(
guild_id=self.id, reason=reason, **payload
Expand Down

0 comments on commit 14e5bfd

Please sign in to comment.