Skip to content

feat: add new/missing flags and update UnfurledMediaItem and Embed - #3438

Open
plun1331 wants to merge 39 commits into
masterfrom
feat/content-scanning
Open

plun1331 wants to merge 39 commits into
masterfrom
feat/content-scanning

Conversation

@plun1331

@plun1331 plun1331 commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Adds content scanning flags (and other missing flags classes)
  • Properly documents UnfurledMediaItem, and adds missing attributes
  • Adds missing attributes to EmbedMedia

no ai slop to see here

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.
  • I have read the Contributing Guidelines.
  • AI Usage has been disclosed.
    • If AI has been used, I understand fully what the code does

ToothyDev and others added 5 commits November 10, 2026 19:30
…tax (#3407)

* Update old None-types to use correct syntax

This will make None clickable in the docs and lead to the python docs

* Documentation changes

* Code changes

* Fix up extra space

* Apply change requests and fix docs

* Apply change requests

Co-authored-by: Michael <8661717+sgtlaggy@users.noreply.github.com>

* Update new leftover Optionals use

* Update old :data:None to use obj:None style

Napoleon seems to internally use this style as well, so I'm choosing it over the existing :data: type

---------

Co-authored-by: Michael <8661717+sgtlaggy@users.noreply.github.com>
@plun1331 plun1331 self-assigned this Nov 10, 2026
@plun1331
plun1331 requested review from a team November 10, 2026 19:24
@plun1331 plun1331 added the bug Something isn't working label Nov 10, 2026
@plun1331
plun1331 requested review from a team November 10, 2026 19:24
@plun1331 plun1331 added the feature Implements a feature label Nov 10, 2026
@plun1331
plun1331 requested a review from Lulalaby November 10, 2026 19:24
@plun1331 plun1331 added the API reflection Discord API isn't correctly reflected label Nov 10, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Pycord Nov 10, 2026
@pycord-app

pycord-app Bot commented Nov 10, 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/3438/head:pr-3438
git checkout pr-3438

This pull request can be installed with:

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

@plun1331
plun1331 requested a review from a team as a code owner November 10, 2026 19:28
@plun1331
plun1331 marked this pull request as ready for review November 11, 2026 20:30
@plun1331

plun1331 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member Author

added warnings similar to whats in discord docs
should we keep these? or maybe make them just text and not a warning box

image

@Paillat-dev

Copy link
Copy Markdown
Member

Good idea yeah

@plun1331 plun1331 changed the title feat: add content scanning flags and rework UnfurledMediaItem feat: add new/missing flags and update UnfurledMediaItem and Embed Nov 11, 2026

@ToothyDev ToothyDev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

uv.lock shouldn't be here :)

@plun1331

Copy link
Copy Markdown
Member Author

uv.lock shouldn't be here :)

i was wondering why it stopped showing up in my changelist

Signed-off-by: plun1331 <plun1331@gmail.com>

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

Since this adds lots of docs, would appreciate @JustaSqu1d 's review when they have time

Comment thread discord/embeds.py
else:
self._thumbnail = {
"url": str(url),
"description": str(description),

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.

This will be litterally "None" when set to None, same issue in other similar str() usages

Comment thread discord/components.py
Comment on lines +1014 to +1016
r.attachment_id = (
int(data["attachment_id"]) if "attachment_id" in data else None
)

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.

I think there's a util for this

This branch has not been deployed

No deployments
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 bug Something isn't working feature Implements a feature

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants