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: Support for text in stage #1936

Merged
merged 8 commits into from Feb 28, 2023

Conversation

NeloBlivion
Copy link
Member

@NeloBlivion NeloBlivion commented Feb 22, 2023

Summary

Adds support for Text channels in Stage as per discord/discord-api-docs#5928
Closes #1934

  • Now inherits abc.Messageable
  • Updated some documentation here and there
  • Moved nsfw slot to VocalGuildChannel

This PR is more or less a mirror of #1231 for StageChannel, however the implementation is somewhat unsatisfying; I think It'd be more ideal for VoiceChannel and StageChannel to inherit from _TextChannel and then move the thread-related functions & attributes from _TextChannel to TextChannel and ForumChannel, but to keep in scope I went with the basic route of just mimicking the previous changes with StageChannel. If the suggested alternative is considered a better solution then I'll go ahead with that refactor instead.

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.

@NeloBlivion NeloBlivion requested a review from a team as a code owner February 22, 2023 18:06
@codecov
Copy link

codecov bot commented Feb 22, 2023

Codecov Report

Merging #1936 (60ff3f1) into master (ba129e6) will decrease coverage by 0.02%.
The diff coverage is 26.82%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1936      +/-   ##
==========================================
- Coverage   33.33%   33.32%   -0.02%     
==========================================
  Files          97       97              
  Lines       18867    18901      +34     
==========================================
+ Hits         6290     6298       +8     
- Misses      12577    12603      +26     
Flag Coverage Δ
macos-latest-3.10 33.30% <26.82%> (-0.02%) ⬇️
macos-latest-3.11 33.30% <26.82%> (-0.02%) ⬇️
macos-latest-3.8 33.31% <26.82%> (-0.02%) ⬇️
macos-latest-3.9 33.31% <26.82%> (-0.02%) ⬇️
ubuntu-latest-3.10 33.30% <26.82%> (-0.02%) ⬇️
ubuntu-latest-3.11 33.30% <26.82%> (-0.02%) ⬇️
ubuntu-latest-3.8 33.31% <26.82%> (-0.02%) ⬇️
ubuntu-latest-3.9 33.31% <26.82%> (-0.02%) ⬇️
windows-latest-3.10 33.30% <26.82%> (-0.02%) ⬇️
windows-latest-3.11 33.30% <26.82%> (-0.02%) ⬇️
windows-latest-3.8 33.31% <26.82%> (-0.02%) ⬇️
windows-latest-3.9 33.31% <26.82%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
discord/abc.py 22.33% <ø> (ø)
discord/message.py 24.95% <ø> (ø)
discord/state.py 14.70% <0.00%> (ø)
discord/channel.py 34.11% <27.50%> (-0.56%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ba129e6...60ff3f1. Read the comment docs.

@Lulalaby Lulalaby enabled auto-merge (squash) February 22, 2023 19:46
Lulalaby
Lulalaby previously approved these changes Feb 22, 2023
@Lulalaby Lulalaby added priority: high High Priority feature Implements a feature changelog needed labels Feb 22, 2023
@Lulalaby Lulalaby added this to the v2.5 milestone Feb 22, 2023
@BobDotCom
Copy link
Member

I think It'd be more ideal for VoiceChannel and StageChannel to inherit from _TextChannel and then move the thread-related functions & attributes from _TextChannel to TextChannel and ForumChannel

What if we created a new class for thread related stuff, so it looks something like this:

_TextChannel
├── VoiceChannel
├── StageChannel
└── _ThreadsCapable
    ├── TextChannel
    └── ForumChannel

Could you make an issue for this? I think it's a good idea, but I also agree that it's out of the scope of this PR.

@Lulalaby Lulalaby mentioned this pull request Feb 23, 2023
Copy link
Member

@BobDotCom BobDotCom left a comment

Choose a reason for hiding this comment

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

Please add a changelog entry

auto-merge was automatically disabled February 26, 2023 14:35

Head branch was pushed to by a user without write access

Lulalaby
Lulalaby previously approved these changes Feb 26, 2023
@JustaSqu1d JustaSqu1d added status: awaiting review Awaiting review from a maintainer and removed changelog needed labels Feb 26, 2023
ChickenDevs
ChickenDevs previously approved these changes Feb 28, 2023
Signed-off-by: UK <41271523+NeloBlivion@users.noreply.github.com>
auto-merge was automatically disabled February 28, 2023 12:44

Head branch was pushed to by a user without write access

@Lulalaby Lulalaby requested review from ChickenDevs and removed request for BobDotCom February 28, 2023 12:45
@Lulalaby Lulalaby enabled auto-merge (squash) February 28, 2023 12:46
@Lulalaby Lulalaby merged commit 88cc187 into Pycord-Development:master Feb 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Implements a feature priority: high High Priority status: awaiting review Awaiting review from a maintainer
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Support for stage channel chat
5 participants