Skip to content

fix(role): ensure secondary and tertiary attributes are not None#3268

Open
vmphase wants to merge 18 commits into
Pycord-Development:masterfrom
vmphase:fix/is_holographic-checks
Open

fix(role): ensure secondary and tertiary attributes are not None#3268
vmphase wants to merge 18 commits into
Pycord-Development:masterfrom
vmphase:fix/is_holographic-checks

Conversation

@vmphase

@vmphase vmphase commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fixes RoleColours.is_holographic raising AttributeError when secondary or tertiary is None;
  • Moves holographic colour values to class-level constants to avoid magic numbers.

Information

  • 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, typehinting,
    examples, ...).

Checklist

  • I have searched the open pull requests for duplicates.
  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
  • If type: ignore comments were used, a comment is also left explaining why.
  • I have updated the changelog to include these changes.
  • AI Usage has been disclosed.
    • If AI has been used, I understand fully what the code does

@vmphase vmphase requested review from a team and ToothyDev June 11, 2026 08:49
@github-project-automation github-project-automation Bot moved this to Todo in Pycord Jun 11, 2026
@vmphase vmphase requested a review from a team as a code owner June 11, 2026 08:49
@pycord-app

pycord-app Bot commented Jun 11, 2026

Copy link
Copy Markdown

Thanks for opening this pull request!
Please make sure you have read the Contributing Guidelines and Code of Conduct.

This pull request can be checked-out with:

git fetch origin pull/3268/head:pr-3268
git checkout pr-3268

This pull request can be installed with:

pip install git+https://github.com/Pycord-Development/pycord@refs/pull/3268/head

@vmphase vmphase requested a review from a team as a code owner June 11, 2026 08:50
@vmphase vmphase requested review from a team, JustaSqu1d and VincentRPS June 11, 2026 08:50
Comment thread discord/role.py Outdated
Paillat-dev
Paillat-dev previously approved these changes Jun 11, 2026
Comment thread CHANGELOG.md Outdated
Co-authored-by: Paillat <paillat@pycord.dev>
Signed-off-by: Michael <vmphasee@gmail.com>
@vmphase vmphase changed the title fix(role): ensure secondary and tertiary attributes are not missing fix(role): ensure secondary and tertiary attributes are not None Jun 11, 2026
Comment thread discord/role.py Outdated
Comment thread discord/role.py
@vmphase vmphase force-pushed the fix/is_holographic-checks branch from d23f495 to 972616f Compare June 11, 2026 09:25
Comment thread CHANGELOG.md Outdated
Paillat-dev
Paillat-dev previously approved these changes Jun 11, 2026

@Paillat-dev Paillat-dev left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, thanks for the pr ! Pending squid

@Paillat-dev Paillat-dev added the bug Something isn't working label Jun 11, 2026
@Paillat-dev Paillat-dev enabled auto-merge (squash) June 11, 2026 16:16
@Paillat-dev Paillat-dev added this to the 2.8.1 milestone Jun 11, 2026
Signed-off-by: Michael <vmphasee@gmail.com>
auto-merge was automatically disabled June 11, 2026 16:22

Head branch was pushed to by a user without write access

@Paillat-dev Paillat-dev enabled auto-merge (squash) June 12, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants