Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ Add MediaChannel and fix ForumChannel flags #2641

Merged
merged 16 commits into from
Jan 28, 2025

Conversation

Paillat-dev
Copy link
Contributor

@Paillat-dev Paillat-dev commented Nov 8, 2024

Summary

Fix #2637
Fix #2640

Information

  • This PR fixes two issues.
  • 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.

@Paillat-dev Paillat-dev requested a review from a team as a code owner November 8, 2024 21:37
@pullapprove4 pullapprove4 bot requested a review from VincentRPS November 8, 2024 21:37
@pullapprove4 pullapprove4 bot requested a review from Dorukyum November 8, 2024 21:37
@Paillat-dev Paillat-dev changed the title MediaChannel feat: ✨ Add MediaChannel and fix ForumChannel flags Nov 8, 2024
@Lulalaby Lulalaby requested review from Lulalaby and removed request for Dorukyum and VincentRPS November 8, 2024 21:56
Copy link
Member

@Lulalaby Lulalaby left a comment

Choose a reason for hiding this comment

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

I'm not entirely sure but afaik I the channel class you also have a model for the base type which has type: literal channel type blah. Is that perhaps missing?

@Paillat-dev
Copy link
Contributor Author

I'm not entirely sure but afaik I the channel class you also have a model for the base type which has type: literal channel type blah. Is that perhaps missing?

type is present as a property in some channel classes but not all, for example it is not in TextChannel (which I found weird tbh) but is in others. I added it to ForumChannel and MediaChannel, even tough it works without because it is already implemented in _TextChannel as follows:

    @property
    def type(self) -> ChannelType:
        """The channel's Discord type."""
        return try_enum(ChannelType, self._type)

@Dorukyum
Copy link
Member

Dorukyum commented Nov 9, 2024

It's redundant if the classes inherit from _TextChannel.

@Paillat-dev
Copy link
Contributor Author

Undid it then

Lulalaby
Lulalaby previously approved these changes Nov 11, 2024
discord/abc.py Outdated Show resolved Hide resolved
discord/channel.py Show resolved Hide resolved
discord/channel.py Outdated Show resolved Hide resolved
discord/channel.py Outdated Show resolved Hide resolved
discord/channel.py Outdated Show resolved Hide resolved
@Paillat-dev
Copy link
Contributor Author

Can someone pls retry the readthedocs action ?

@Lulalaby
Copy link
Member

Lulalaby commented Jan 9, 2025

no :p

discord/abc.py Outdated Show resolved Hide resolved
discord/channel.py Outdated Show resolved Hide resolved
discord/channel.py Outdated Show resolved Hide resolved
discord/channel.py Outdated Show resolved Hide resolved
plun1331
plun1331 previously approved these changes Jan 28, 2025
Copy link
Member

@plun1331 plun1331 left a comment

Choose a reason for hiding this comment

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

'scuse me, i approved this

Copy link
Member

@Lulalaby Lulalaby left a comment

Choose a reason for hiding this comment

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

Well you gotta wait for pre-commit to be done @plun1331

@Lulalaby Lulalaby merged commit 8c3a621 into Pycord-Development:master Jan 28, 2025
25 checks passed
@Paillat-dev Paillat-dev deleted the feat-media-channels branch January 28, 2025 16:01
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.

Add missing channel types to channel.py Support GUILD_MEDIA channel type
5 participants