Browse Source

Fix safety_alerts_channel typing not accepting None in Guild.edit()

pull/10230/merge
Michael 2 months ago
committed by GitHub
parent
commit
d354614b10
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      discord/guild.py

5
discord/guild.py

@ -2027,7 +2027,7 @@ class Guild(Hashable):
widget_channel: Optional[Snowflake] = MISSING,
mfa_level: MFALevel = MISSING,
raid_alerts_disabled: bool = MISSING,
safety_alerts_channel: TextChannel = MISSING,
safety_alerts_channel: Optional[TextChannel] = MISSING,
invites_disabled_until: datetime.datetime = MISSING,
dms_disabled_until: datetime.datetime = MISSING,
) -> Guild:
@ -2285,8 +2285,7 @@ class Guild(Hashable):
raise TypeError(
f'safety_alerts_channel must be of type TextChannel not {safety_alerts_channel.__class__.__name__}'
)
fields['safety_alerts_channel_id'] = safety_alerts_channel.id
fields['safety_alerts_channel_id'] = safety_alerts_channel.id
if owner is not MISSING:
if self.owner_id != self._state.self_id:

Loading…
Cancel
Save