Skip to content

fix: name and size are not required on FileComponent#3115

Merged
NeloBlivion merged 8 commits into
Pycord-Development:masterfrom
Evanroby:file-component
Feb 23, 2026
Merged

fix: name and size are not required on FileComponent#3115
NeloBlivion merged 8 commits into
Pycord-Development:masterfrom
Evanroby:file-component

Conversation

@Evanroby

Copy link
Copy Markdown
Contributor

Summary

name and size are populated by the API and aren’t always present in the payload, so their type hints are updated to reflect the actual behavior.
Related documentation update PR: discord/discord-api-docs#8153

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.

@Evanroby
Evanroby requested a review from a team as a code owner February 19, 2026 23:15
@pycord-app

pycord-app Bot commented Feb 19, 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/3115/head:pr-3115
git checkout pr-3115

This pull request can be installed with:

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

@pullapprove4
pullapprove4 Bot requested a review from Dorukyum February 19, 2026 23:15
@plun1331 plun1331 changed the title NotRequired on FileComponent. fix: name and size are not required on FileComponent Feb 19, 2026
@plun1331 plun1331 added API reflection Discord API isn't correctly reflected priority: low Low Priority labels Feb 19, 2026
plun1331
plun1331 previously approved these changes Feb 19, 2026

@plun1331 plun1331 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.

changelog should not be needed, minor backend change

@Soheab

Soheab commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

This also needs to be reflected in the API (/components.py) and user model (/ui/file.py), as both are not marked as optional currently.

auto-merge was automatically disabled February 19, 2026 23:54

Head branch was pushed to by a user without write access

@plun1331

plun1331 commented Feb 20, 2026

Copy link
Copy Markdown
Member

This isn't a file upload, this is a file display message component

@Evanroby

Copy link
Copy Markdown
Contributor Author

This isn't a file upload, this is a file display message component

Sorry, I'll work back on it soon, I didn't sleep for long my bad.

@Evanroby

Copy link
Copy Markdown
Contributor Author

PR is good to be reviewed, account is back!

@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; thank for the PR

Could you add a CHANGELOG.md entry under "Changed" ? Feel free to take a look at other entries to see what they look like.

@Paillat-dev Paillat-dev added the hold: changelog This pull request is missing a changelog entry label Feb 22, 2026
@Evanroby
Evanroby requested review from a team as code owners February 22, 2026 15:16
@Evanroby

Copy link
Copy Markdown
Contributor Author

Is this as changelog good for you, or anything to change?

@Paillat-dev
Paillat-dev requested a review from plun1331 February 22, 2026 15:18
Comment thread CHANGELOG.md Outdated
@Paillat-dev
Paillat-dev self-requested a review February 22, 2026 15:21
@Paillat-dev Paillat-dev changed the title fix: name and size are not required on FileComponent fix: name and size are not required on FileComponent Feb 22, 2026
Paillat-dev
Paillat-dev previously approved these changes Feb 22, 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 !

@Paillat-dev Paillat-dev removed the hold: changelog This pull request is missing a changelog entry label Feb 22, 2026
Comment thread CHANGELOG.md Outdated
Co-authored-by: JustaSqu1d <[email protected]>
Signed-off-by: Soheab <[email protected]>
@Soheab
Soheab requested a review from Paillat-dev February 22, 2026 19:26
@NeloBlivion
NeloBlivion merged commit 15d4bca into Pycord-Development:master Feb 23, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API reflection Discord API isn't correctly reflected priority: low Low Priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants