[Docs] Core Cog Guide #4597

Merged
bobloy merged 94 commits from cog_guide_core into V3/develop 2021-04-07 19:01:35 +02:00
bobloy commented 2020-11-12 20:46:36 +01:00 (Migrated from github.com)

Type

  • Bugfix
  • Enhancement
  • New feature

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

### Type - [ ] Bugfix - [ ] Enhancement - [x] New feature ### 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
bobloy commented 2021-02-23 23:33:34 +01:00 (Migrated from github.com)

Finally ready for review.

I did not modify the docstrings for the licenseinfo command, but I'm interested in feedback on how that could be improved.

Finally ready for review. I did not modify the docstrings for the `licenseinfo` command, but I'm interested in feedback on how that could be improved.
Flame442 (Migrated from github.com) requested changes 2021-03-11 01:32:19 +01:00
Flame442 (Migrated from github.com) left a comment

This is a long one! Thanks for contributing.

This is a long one! Thanks for contributing.
@ -0,0 +1,3524 @@
.. _core:
Flame442 (Migrated from github.com) commented 2021-03-11 00:06:57 +01:00
.. Warning:: These settings may not be accurate if the default formatter is not in use.
```suggestion .. Warning:: These settings may not be accurate if the default formatter is not in use. ```
Flame442 (Migrated from github.com) commented 2021-03-11 00:07:48 +01:00
The bot must be made into a ``Public bot`` in the developer dashboard for public invites to work.
```suggestion The bot must be made into a ``Public bot`` in the developer dashboard for public invites to work. ```
Flame442 (Migrated from github.com) commented 2021-03-11 00:08:31 +01:00
Users have access to a different command for this unless they can't interact with the bot at all.
```suggestion Users have access to a different command for this unless they can't interact with the bot at all. ```
Flame442 (Migrated from github.com) commented 2021-03-11 00:09:31 +01:00
This is only applied to the current server and not globally.
```suggestion This is only applied to the current server and not globally. ```
Flame442 (Migrated from github.com) commented 2021-03-11 00:10:47 +01:00
- ``[public]`` Whether to send the traceback to the current context. Leave blank to send to your DMs.
```suggestion - ``[public]`` Whether to send the traceback to the current context. Leave blank to send to your DMs. ```
Flame442 (Migrated from github.com) commented 2021-03-11 00:21:30 +01:00

Core does not need to be loaded, this part should be omitted from this guide

Core does not need to be loaded, this part should be omitted from this guide
Flame442 (Migrated from github.com) commented 2021-03-11 00:33:49 +01:00

I think you forgot to edit this line when you copy pasted :P

I think you forgot to edit this line when you copy pasted :P
Flame442 (Migrated from github.com) commented 2021-03-11 00:34:37 +01:00
When enabled, ``[p]help`` will only show one page at a time and will use reactions to navigate between pages.
```suggestion When enabled, ``[p]help`` will only show one page at a time and will use reactions to navigate between pages. ```
Flame442 (Migrated from github.com) commented 2021-03-11 00:47:48 +01:00
    - ``[p]helpset usetick False`` - Disables ticking when help is sent in DMs.
```suggestion - ``[p]helpset usetick False`` - Disables ticking when help is sent in DMs. ```
Flame442 (Migrated from github.com) commented 2021-03-11 00:48:06 +01:00
- ``[use_tick]`` Whether to tick the help command when help is sent in DMs. Leave blank to toggle.
```suggestion - ``[use_tick]`` Whether to tick the help command when help is sent in DMs. Leave blank to toggle. ```
Flame442 (Migrated from github.com) commented 2021-03-11 00:49:23 +01:00

I believe the point of this help setting is to let the user know when a command does not exist, ie [p]help pinh will respond "Command pinh does not exist."

I believe the point of this help setting is to let the user know when a command does *not* exist, ie `[p]help pinh` will respond "Command `pinh` does not exist."
Flame442 (Migrated from github.com) commented 2021-03-11 00:49:41 +01:00

This description is not accurate

This description is not accurate
Flame442 (Migrated from github.com) commented 2021-03-11 00:51:37 +01:00
See ``[p]set custominfo`` to customize.
```suggestion See ``[p]set custominfo`` to customize. ```
Flame442 (Migrated from github.com) commented 2021-03-11 00:52:28 +01:00

This section was probably formatted strangely in the docstring, as it is formatted wrong here

This section was probably formatted strangely in the docstring, as it is formatted wrong here
Flame442 (Migrated from github.com) commented 2021-03-11 00:59:18 +01:00
Lists users and roles on the server blocklist.
```suggestion Lists users and roles on the server blocklist. ```
Flame442 (Migrated from github.com) commented 2021-03-11 01:00:03 +01:00
This will send an attachment with the End User Data statements of all loaded 3rd party cogs.
```suggestion This will send an attachment with the End User Data statements of all loaded 3rd party cogs. ```
Flame442 (Migrated from github.com) commented 2021-03-11 01:03:13 +01:00
- ``<cogs...>`` The cog packages to reload.
```suggestion - ``<cogs...>`` The cog packages to reload. ```
Flame442 (Migrated from github.com) commented 2021-03-11 01:10:29 +01:00
.. Note:: API tokens are sensitive, so this command should only be used in a private channel or in DM with the bot.
```suggestion .. Note:: API tokens are sensitive, so this command should only be used in a private channel or in DM with the bot. ```
Flame442 (Migrated from github.com) commented 2021-03-11 01:18:29 +01:00

This shouldn't be here

This shouldn't be here
Flame442 (Migrated from github.com) commented 2021-03-11 01:28:41 +01:00
    - ``[p]set status online`` - Clears the status.
```suggestion - ``[p]set status online`` - Clears the status. ```
Flame442 (Migrated from github.com) commented 2021-03-11 01:29:19 +01:00

Incorrect

Incorrect
Flame442 (Migrated from github.com) commented 2021-03-11 01:31:21 +01:00
    - ``[p]unignore channel 356236713347252226`` - Also accepts IDs. Use this method to unignore categories.
```suggestion - ``[p]unignore channel 356236713347252226`` - Also accepts IDs. Use this method to unignore categories. ```
Flame442 (Migrated from github.com) commented 2021-03-11 01:31:31 +01:00
- ``<channel>`` The channel to unignore. Can be a category channel.
```suggestion - ``<channel>`` The channel to unignore. Can be a category channel. ```
Flame442 (Migrated from github.com) commented 2021-03-11 01:31:46 +01:00
    - ``[p]unignore server`` - Stops ignoring the current server
```suggestion - ``[p]unignore server`` - Stops ignoring the current server ```
@ -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.
Flame442 (Migrated from github.com) commented 2021-03-11 00:27:43 +01:00

I don't believe this is true, if the bot is just deleting its own messages

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...>
Flame442 (Migrated from github.com) commented 2021-03-11 00:56:17 +01:00

Here you use <users_or_roles...>, but below has only <users...>

Here you use `<users_or_roles...>`, but below has only `<users...>`
@ -0,0 +1834,4 @@
.. code-block:: none
[p]localallowlist remove <users_or_roles...>
Flame442 (Migrated from github.com) commented 2021-03-11 00:58:32 +01:00

Same issue as above

Same issue as above
@ -0,0 +1882,4 @@
.. code-block:: none
[p]localblocklist add <users_or_roles...>
Flame442 (Migrated from github.com) commented 2021-03-11 00:58:54 +01:00

Same issue as above

Same issue as above
@ -0,0 +1946,4 @@
.. code-block:: none
[p]localblocklist remove <users_or_roles...>
Flame442 (Migrated from github.com) commented 2021-03-11 00:59:39 +01:00

Same issue as above

Same issue as above
Flame442 (Migrated from github.com) commented 2021-03-11 00:04:38 +01:00

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 bold Example:.

(I'm just going to comment on this once, but this formatting is used pretty much in every docstring)

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 bold `Example:`. (I'm just going to comment on this once, but this formatting is used pretty much in every docstring)
bobloy (Migrated from github.com) reviewed 2021-03-11 14:46:57 +01:00
bobloy (Migrated from github.com) commented 2021-03-11 14:46:57 +01:00

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.

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.
bobloy (Migrated from github.com) reviewed 2021-03-11 16:46:00 +01:00
@ -0,0 +1,3524 @@
.. _core:
bobloy (Migrated from github.com) commented 2021-03-11 16:45:59 +01:00

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.

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.
bobloy (Migrated from github.com) reviewed 2021-03-11 16:46:33 +01:00
@ -0,0 +1,3524 @@
.. _core:
bobloy (Migrated from github.com) commented 2021-03-11 16:46:33 +01:00

Accepted and an additional ignore needed to be unignore on 3321

Accepted and an additional ignore needed to be unignore on 3321
bobloy (Migrated from github.com) reviewed 2021-03-15 13:40:32 +01:00
@ -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.
bobloy (Migrated from github.com) commented 2021-03-15 13:40:32 +01:00

This is based on the decorator @commands.bot_has_permissions(manage_messages=True) for that command
I 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.

This is based on the decorator `@commands.bot_has_permissions(manage_messages=True)` for that command I 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.
bobloy (Migrated from github.com) reviewed 2021-03-15 13:45:08 +01:00
@ -0,0 +1,3524 @@
.. _core:
bobloy (Migrated from github.com) commented 2021-03-15 13:45:08 +01:00

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 showaliases command.

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 `showaliases` command.
bobloy (Migrated from github.com) reviewed 2021-03-15 13:59:13 +01:00
@ -0,0 +1,3524 @@
.. _core:
bobloy (Migrated from github.com) commented 2021-03-15 13:59:13 +01:00

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]help in a server but the results are sent to my DMs)

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]help` in a server but the results are sent to my DMs)
bobloy (Migrated from github.com) reviewed 2021-03-15 13:59:55 +01:00
@ -0,0 +1,3524 @@
.. _core:
bobloy (Migrated from github.com) commented 2021-03-15 13:59:54 +01:00

Same as the above, rewording to Whether to tick the help command when help is sent to DMs

Same as the above, rewording to `Whether to tick the help command when help is sent to DMs`
bobloy (Migrated from github.com) reviewed 2021-03-15 15:38:45 +01:00
@ -0,0 +1,3524 @@
.. _core:
bobloy (Migrated from github.com) commented 2021-03-15 15:38:45 +01:00

This was the existing description for the command. I will look into it further and get back to this one.

This was the existing description for the command. I will look into it further and get back to this one.
bobloy (Migrated from github.com) reviewed 2021-03-15 16:07:54 +01:00
@ -0,0 +1770,4 @@
.. code-block:: none
[p]localallowlist add <users_or_roles...>
bobloy (Migrated from github.com) commented 2021-03-15 16:07:54 +01:00

Adjusted all to be <users_or_roles...>

Adjusted all to be `<users_or_roles...>`
bobloy (Migrated from github.com) reviewed 2021-03-15 16:12:01 +01:00
@ -0,0 +1,3524 @@
.. _core:
bobloy (Migrated from github.com) commented 2021-03-15 16:12:01 +01:00

Added the proper argument name and description.

Added the proper argument name and description.
bobloy (Migrated from github.com) reviewed 2021-03-15 18:21:54 +01:00
bobloy (Migrated from github.com) commented 2021-03-15 18:21:53 +01:00

This has been settled in this poll: https://forms.gle/wiY4kY82d4qZh9358

This has been settled in this poll: https://forms.gle/wiY4kY82d4qZh9358
bobloy (Migrated from github.com) reviewed 2021-03-15 19:09:54 +01:00
@ -0,0 +1,3524 @@
.. _core:
bobloy (Migrated from github.com) commented 2021-03-15 19:09:54 +01:00

I believe it is accurate as written.

As an example:
With verifyexists = False, my bot will not respond to [p]help cleanup duplicates on the Red support server since it does not have manage messages permissions.
With verifyexists = True, my bot will respond to [p]help cleanup duplicates despite not being able to use it.

I believe it is accurate as written. As an example: With `verifyexists` = False, my bot will not respond to `[p]help cleanup duplicates` on the Red support server since it does not have manage messages permissions. With `verifyexists` = True, my bot will respond to `[p]help cleanup duplicates` despite not being able to use it.
bobloy (Migrated from github.com) reviewed 2021-03-16 15:55:29 +01:00
@ -0,0 +1,3524 @@
.. _core:
bobloy (Migrated from github.com) commented 2021-03-16 15:55:28 +01:00

This is now being handled in #4892

This is now being handled in #4892
Jackenmen (Migrated from github.com) reviewed 2021-03-21 01:32:01 +01:00
Jackenmen (Migrated from github.com) left a comment

This PR should update the .github/labeler.yml file 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

"Category: Bot Core":
  # Source
  - redbot/*
  - redbot/core/__init__.py
  - redbot/core/_sharedlibdeprecation.py
  - redbot/core/bot.py
  - redbot/core/checks.py
  - redbot/core/cli.py
  - redbot/core/cog_manager.py
  - redbot/core/core_commands.py
  - redbot/core/data_manager.py
  - redbot/core/errors.py
  - redbot/core/events.py
  - redbot/core/global_checks.py
  - redbot/core/settings_caches.py
  # Docs
  - docs/framework_apikeys.rst
  - docs/framework_bot.rst
  - docs/framework_cogmanager.rst
  - docs/framework_datamanager.rst
  - docs/framework_events.rst
  - docs/cog_guides/cog_manager_ui.rst
  - docs/cog_guides/core.rst
This PR should update the `.github/labeler.yml` file 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 ```yaml "Category: Bot Core": # Source - redbot/* - redbot/core/__init__.py - redbot/core/_sharedlibdeprecation.py - redbot/core/bot.py - redbot/core/checks.py - redbot/core/cli.py - redbot/core/cog_manager.py - redbot/core/core_commands.py - redbot/core/data_manager.py - redbot/core/errors.py - redbot/core/events.py - redbot/core/global_checks.py - redbot/core/settings_caches.py # Docs - docs/framework_apikeys.rst - docs/framework_bot.rst - docs/framework_cogmanager.rst - docs/framework_datamanager.rst - docs/framework_events.rst - docs/cog_guides/cog_manager_ui.rst - docs/cog_guides/core.rst ```
bobloy commented 2021-03-24 21:09:19 +01:00 (Migrated from github.com)

Labeler update has been added.

Labeler update has been added.
Flame442 (Migrated from github.com) requested changes 2021-04-05 22:35:35 +02:00
Flame442 (Migrated from github.com) left a comment

There is still one unresolved review comment, and a conflicting file which needs to be fixed. Otherwise, this is looking ready to go!

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:
Flame442 (Migrated from github.com) commented 2021-04-05 22:34:27 +02:00

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).

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.
Flame442 (Migrated from github.com) commented 2021-04-05 22:29:54 +02:00

It appears to be there to allow the bot to use the mass delete endpoint. So the permission is required.

It appears to be there to allow the bot to use the mass delete endpoint. So the permission is required.
bobloy (Migrated from github.com) reviewed 2021-04-06 16:22:56 +02:00
@ -0,0 +1,3524 @@
.. _core:
bobloy (Migrated from github.com) commented 2021-04-06 16:22:56 +02:00

This is now resolved, along with a better description of the command.

This is now resolved, along with a better description of the command.
bobloy commented 2021-04-06 16:24:08 +02:00 (Migrated from github.com)

Merging from master called for additional docstring changes.

  • Added examples and arguments for [p]leave
  • Updated [p]embedset docstring to work with Sphinx and be more readable
Merging from master called for additional docstring changes. - Added examples and arguments for `[p]leave` - Updated `[p]embedset` docstring to work with Sphinx and be more readable
Flame442 (Migrated from github.com) reviewed 2021-04-07 05:44:17 +02:00
Flame442 (Migrated from github.com) left a comment
No description provided.
Seems to be all set to go now! Thanks again for the contribution!
bobloy commented 2021-04-07 14:35:01 +02:00 (Migrated from github.com)

Re-reviewing this, I missed some additional embedset commands that were added in a recent update.
Please don't merge until I've corrected.

Re-reviewing this, I missed some additional `embedset` commands that were added in a recent update. Please don't merge until I've corrected.
bobloy commented 2021-04-07 18:49:51 +02:00 (Migrated from github.com)

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

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
Flame442 (Migrated from github.com) approved these changes 2021-04-07 19:01:27 +02:00
Flame442 (Migrated from github.com) left a comment

Good to go!

Good to go!
Sign in to join this conversation.
No reviewers
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 milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot!4597
No description provided.