Skip to content

fix: safety_alerts_channel accept None in Guild.edit()#10446

Merged
Rapptz merged 2 commits into
Rapptz:masterfrom
vmphase:fix-10445
May 21, 2026
Merged

fix: safety_alerts_channel accept None in Guild.edit()#10446
Rapptz merged 2 commits into
Rapptz:masterfrom
vmphase:fix-10445

Conversation

@vmphase
Copy link
Copy Markdown
Contributor

@vmphase vmphase commented Apr 30, 2026

Summary

Fixes #10445. safety_alerts_channel in Guild.edit() had two bugs:

  • typed as TextChannel instead of Optional[TextChannel], despite the implementation handling None and the docstring documenting it as accepted.
  • safety_alerts_channel.id assignment was outside the else block, causing an AttributeError when None is passed

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • This PR fixes an issue.
  • This PR adds something new (e.g. new method or parameters).
  • This PR is a breaking change (e.g. methods or parameters removed/renamed)
  • This PR is not a code change (e.g. documentation, README, ...)

@Rapptz Rapptz merged commit d354614 into Rapptz:master May 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maybe a small type bug in Guild.edit()

2 participants