-
-
Notifications
You must be signed in to change notification settings - Fork 470
docs: Improve docstrings and attribute documentation #2754
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Lumabots <144063653+Lumabots@users.noreply.github.com>
add missings docs Signed-off-by: Lumabots <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumabots <144063653+Lumabots@users.noreply.github.com>
checklist might not be accurate, i changed the code to add some missings parts but its mainly adding the missing docs + parameters inside the function definition |
discord/guild.py
Outdated
@@ -1542,6 +1673,7 @@ async def create_category( | |||
overwrites: dict[Role | Member, PermissionOverwrite] = MISSING, | |||
reason: str | None = None, | |||
position: int = MISSING, | |||
nsfw: bool = MISSING, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens really when a category is nsfw ? Is that inherited to the category's channels ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no idea, i guess yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Lumabots see above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
even if i dont think it change anything so i'll remove it
@@ -1724,6 +1724,11 @@ class VoiceChannel(discord.abc.Messageable, VocalGuildChannel): | |||
Extra features of the channel. | |||
|
|||
.. versionadded:: 2.0 | |||
|
|||
nsfw: :class:`bool` | |||
To mark the channel as NSFW or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To mark the channel as NSFW or not. | |
Whether the channel is marked as NSFW or not. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for the nsfw docs, i copy them from their class to keep them similar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah but here it's not for editing the channel it's an attribute
Also, I assume you tested each of the changes and they work. + Add the changelog |
nop i didnt test them yet, i will do that this afternoon, i also have to fix another issue before the "'ForumChannel' object has no attribute 'default_reaction_emoji'" |
Signed-off-by: Lumabots <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumabots <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumabots <144063653+Lumabots@users.noreply.github.com>
i tested it everything works, so this add the missing docstring and parameters for the channels and add the possibility to create a channel with a default reaction as None (edit was already done by paillait) |
Signed-off-by: Lumabots <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumabots <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumabots <144063653+Lumabots@users.noreply.github.com>
removal of all the nsfw mention which should not exist for category Signed-off-by: Lumabots <144063653+Lumabots@users.noreply.github.com>
Signed-off-by: Lumabots <144063653+Lumabots@users.noreply.github.com>
i removed all of the nsfw code related to category channel since even if its returned by discord its not posible to be other thing than false |
Summary
Information
examples, ...).
Checklist
type: ignore
comments were used, a comment is also left explaining why.