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(channel): add default forum layout #942

Merged
merged 8 commits into from
Feb 16, 2023

Conversation

Soheab
Copy link
Contributor

@Soheab Soheab commented Dec 8, 2022

Summary

#936

Checklist

  • If code changes were made then they have been tested.
    • I have updated the documentation to reflect the changes.
    • I have run task pyright and fixed the relevant issues.
  • 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, ...)

@EmreTech EmreTech changed the title feat: Add support for forum default forum layout feat(forum channels): default forum layout Dec 9, 2022
@EmreTech EmreTech added p: low Priority: low - not important to be worked on s: awaiting review Status: the issue or PR is awaiting reviews t: api coverage Type: api coverage - this adds code to cover the discord API labels Dec 9, 2022
nextcord/types/channel.py Outdated Show resolved Hide resolved
nextcord/channel.py Outdated Show resolved Hide resolved
@EmreTech EmreTech added p: medium Priority: medium - should be worked on in the near future and removed p: low Priority: low - not important to be worked on labels Dec 9, 2022
@EmreTech EmreTech linked an issue Dec 9, 2022 that may be closed by this pull request
@ooliver1 ooliver1 changed the title feat(forum channels): default forum layout feat(channel): add default forum layout Dec 11, 2022
docs/api.rst Outdated Show resolved Hide resolved
@ooliver1 ooliver1 added the s: waiting for discord status: the issue requires changes to the documentation or behaviour before it can be completed. label Dec 11, 2022
@ooliver1
Copy link
Member

Could this be updated to the naming and nullability shown in discord/discord-api-docs#5745 - no idea why they just superseeded it.

@ooliver1 ooliver1 added s: requested changes Status: the PR has some pending requested changes 2.4 The issue/PR should go for the 2.4 release and removed s: awaiting review Status: the issue or PR is awaiting reviews s: waiting for discord status: the issue requires changes to the documentation or behaviour before it can be completed. labels Dec 14, 2022
@ooliver1 ooliver1 added this to the 2.4 milestone Dec 14, 2022
Co-Authored-By: Emre Terzioglu <50607143+EmreTech@users.noreply.github.com>
Co-Authored-By: Oliver Wilkes <oliverwilkes2006@icloud.com>
@Soheab Soheab requested review from ooliver1 and EmreTech and removed request for ooliver1 January 22, 2023 17:17
nextcord/channel.py Outdated Show resolved Hide resolved
Co-Authored-By: Oliver Wilkes <oliverwilkes2006@icloud.com>
nextcord/channel.py Outdated Show resolved Hide resolved
nextcord/enums.py Show resolved Hide resolved
nextcord/channel.py Show resolved Hide resolved
Soheab and others added 3 commits February 12, 2023 16:30
Co-Authored-By: Oliver Wilkes <oliverwilkes2006@icloud.com>
Co-Authored-By: Oliver Wilkes <oliverwilkes2006@icloud.com>
Co-Authored-By: Oliver Wilkes <oliverwilkes2006@icloud.com>
Copy link
Member

@ooliver1 ooliver1 left a comment

Choose a reason for hiding this comment

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

Tested

@bot.slash_command()
async def test(inter: Interaction):
    # Why would Discord not allow you to set on creation?
    assert inter.guild is not None
    forum_channel = await inter.guild.create_forum_channel("test", topic="test2")

    assert forum_channel.default_forum_layout is ForumLayoutType.not_set
    forum_channel = await forum_channel.edit(default_forum_layout=ForumLayoutType.gallery)
    assert (
        forum_channel.default_forum_layout is ForumLayoutType.gallery
    ), forum_channel.default_forum_layout

    await forum_channel.delete()

    await inter.response.send_message("Done")

@EmreTech EmreTech merged commit 68cc92a into nextcord:master Feb 16, 2023
@EmreTech EmreTech removed the s: requested changes Status: the PR has some pending requested changes label Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.4 The issue/PR should go for the 2.4 release p: medium Priority: medium - should be worked on in the near future t: api coverage Type: api coverage - this adds code to cover the discord API
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add default_forum_layout to ForumChannel
4 participants