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

This commit is contained in:
Michael
2026-05-21 10:33:10 -04:00
committed by GitHub
parent 84f9877860
commit d354614b10
+1 -2
View File
@@ -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,7 +2285,6 @@ 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
if owner is not MISSING: