Skip to content

Fix Guild.edit safety_alerts_channel None handling#10449

Closed
kadam257 wants to merge 1 commit into
Rapptz:masterfrom
kadam257:fix/guild-edit-safety-alerts-channel
Closed

Fix Guild.edit safety_alerts_channel None handling#10449
kadam257 wants to merge 1 commit into
Rapptz:masterfrom
kadam257:fix/guild-edit-safety-alerts-channel

Conversation

@kadam257
Copy link
Copy Markdown

Summary

safety_alerts_channel on Guild.edit was typed as
TextChannel despite the docstring saying Optional[TextChannel],
and passing None crashed because the .id assignment ran outside
the else: branch. Widens the type and fixes the indent to match
the sibling rules_channel / public_updates_channel blocks.

Closes #10445

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, ...)

@kadam257
Copy link
Copy Markdown
Author

Just noticed #10446 already fixes both pieces of this. Closing as duplicate.

@kadam257 kadam257 closed this May 10, 2026
@kadam257 kadam257 deleted the fix/guild-edit-safety-alerts-channel branch May 10, 2026 02:48
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()

1 participant