[Docs] Core Cog Guide #4597
No reviewers
Labels
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot!4597
Loading…
Reference in a new issue
No description provided.
Delete branch "cog_guide_core"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Description of the changes
Adds a cog guide for the Core cog and its commands.
A step towards the #1734 goal.
Viewable docs: https://red-discordbot--4597.org.readthedocs.build/en/4597/cog_guides/core.html
Finally ready for review.
I did not modify the docstrings for the
licenseinfocommand, but I'm interested in feedback on how that could be improved.This is a long one! Thanks for contributing.
@ -0,0 +1,3524 @@.. _core:Core does not need to be loaded, this part should be omitted from this guide
I think you forgot to edit this line when you copy pasted :P
I believe the point of this help setting is to let the user know when a command does not exist, ie
[p]help pinhwill respond "Commandpinhdoes not exist."This description is not accurate
This section was probably formatted strangely in the docstring, as it is formatted wrong here
This shouldn't be here
Incorrect
@ -0,0 +1116,4 @@sent in server text channels.Setting the delay to 0 disables this feature.The bot has to have MANAGE_MESSAGES permission for this to work.I don't believe this is true, if the bot is just deleting its own messages
@ -0,0 +1770,4 @@.. code-block:: none[p]localallowlist add <users_or_roles...>Here you use
<users_or_roles...>, but below has only<users...>@ -0,0 +1834,4 @@.. code-block:: none[p]localallowlist remove <users_or_roles...>Same issue as above
@ -0,0 +1882,4 @@.. code-block:: none[p]localblocklist add <users_or_roles...>Same issue as above
@ -0,0 +1946,4 @@.. code-block:: none[p]localblocklist remove <users_or_roles...>Same issue as above
The exact formatting of this is weird, in the very least the empty line after
**Arguments:**should probably be removed, however it might also be a good idea to boldExample:.(I'm just going to comment on this once, but this formatting is used pretty much in every docstring)
I'm open for suggestions on this. The main challenge is the negotiation between RST and how discord displays it. I chose bold because it looked better on discord's side. However, RST requires a blank link to start a list if the colon is not at the end of the line I believe.
I will put together some other options and offer them for discussion.
@ -0,0 +1,3524 @@.. _core:Added correct examples here.
Also adjusted the arguments to be in
<>to indicate required, since that's how each individual argument is presented in the usage.@ -0,0 +1,3524 @@.. _core:Accepted and an additional ignore needed to be unignore on 3321
@ -0,0 +1116,4 @@sent in server text channels.Setting the delay to 0 disables this feature.The bot has to have MANAGE_MESSAGES permission for this to work.This is based on the decorator
@commands.bot_has_permissions(manage_messages=True)for that commandI definitely see why it shouldn't be necessary to delete your own messages though. If the decorator could be removed, then it'd make sense to remove it from the docs.
@ -0,0 +1,3524 @@.. _core:Looks like I missed a lot of lines in this section actually. Ended up making more changes than you asked for in this section, including adding docs for the new
showaliasescommand.@ -0,0 +1,3524 @@.. _core:Rewording this to
Disables ticking when help is sent to DMs.to clarify it's talking about where the response from the bot ends up. (i.e. it ticks when I use[p]helpin a server but the results are sent to my DMs)@ -0,0 +1,3524 @@.. _core:Same as the above, rewording to
Whether to tick the help command when help is sent to DMs@ -0,0 +1,3524 @@.. _core:This was the existing description for the command. I will look into it further and get back to this one.
@ -0,0 +1770,4 @@.. code-block:: none[p]localallowlist add <users_or_roles...>Adjusted all to be
<users_or_roles...>@ -0,0 +1,3524 @@.. _core:Added the proper argument name and description.
This has been settled in this poll: https://forms.gle/wiY4kY82d4qZh9358
@ -0,0 +1,3524 @@.. _core:I believe it is accurate as written.
As an example:
With
verifyexists= False, my bot will not respond to[p]help cleanup duplicateson the Red support server since it does not have manage messages permissions.With
verifyexists= True, my bot will respond to[p]help cleanup duplicatesdespite not being able to use it.@ -0,0 +1,3524 @@.. _core:This is now being handled in #4892
This PR should update the
.github/labeler.ymlfile similarly to how it's done for existing cog guides:https://github.com/Cog-Creators/Red-DiscordBot/blob/V3/develop/.github/labeler.yml#L1-L5
Labeler update has been added.
There is still one unresolved review comment, and a conflicting file which needs to be fixed. Otherwise, this is looking ready to go!
@ -0,0 +1,3524 @@.. _core:This has still not been fixed. This is unrelated to the other issue, as that text is describing a different behavior which IS accurate (although potentially not intended).
@ -0,0 +1116,4 @@sent in server text channels.Setting the delay to 0 disables this feature.The bot has to have MANAGE_MESSAGES permission for this to work.It appears to be there to allow the bot to use the mass delete endpoint. So the permission is required.
@ -0,0 +1,3524 @@.. _core:This is now resolved, along with a better description of the command.
Merging from master called for additional docstring changes.
[p]leave[p]embedsetdocstring to work with Sphinx and be more readableRe-reviewing this, I missed some additional
embedsetcommands that were added in a recent update.Please don't merge until I've corrected.
Embedset changes have been added, again ready for review.
Docs can be viewed here: https://red-discordbot--4597.org.readthedocs.build/en/4597/cog_guides/core.html
Good to go!