[Help] formatting additions #3339
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!3339
Loading…
Reference in a new issue
No description provided.
Delete branch "help-additions"
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
This one was discussed back with #3063 but was delayed.
This includes most of those changes, barring the whitespace ones, which were the hold up.
Would it be bad to have this as async function instead? I.e. for accessing config, unless you would just want cog creators to cache it which probably isn't a bad idea either.
A very cool addition, saw you're adding i18n here, and noticed 2 places with missing
T_(), other than that and what I asked in previous comment, looks good.https://github.com/mikeshardmind/Red-DiscordBot/blob/help-additions/redbot/core/commands/help.py#L554
https://github.com/mikeshardmind/Red-DiscordBot/blob/help-additions/redbot/core/commands/help.py#L564
I'm probably gonna use such Command subclass once this feature goes in:
If
use_embeds=True,format_fuzzy_resultswill returndiscord.Embedso this doesn't work properly with L560 where you create a new embed usingmsgvar as embed description.Yep.... Will handle consolidating more of the logic another time...
@ -57,6 +58,49 @@ class CogCommandMixin:checks=getattr(decorated, "__requires_checks__", []),Letter casing is a little weird here.
@ -60,0 +66,4 @@- get the localized help- substitute ``[p]`` with ``ctx.clean_prefix``- substitute ``[botname]`` with ``ctx.me.display_name``Preference thing, but we could start using
from __future__ import annotationsfor this.It might also be good to mention here that this method can (is intended to) be subclassed.
@ -60,0 +66,4 @@- get the localized help- substitute ``[p]`` with ``ctx.clean_prefix``- substitute ``[botname]`` with ``ctx.me.display_name``It's mentioned in the docstring already.
@ -60,0 +66,4 @@- get the localized help- substitute ``[p]`` with ``ctx.clean_prefix``- substitute ``[botname]`` with ``ctx.me.display_name``I've been adding it to files I touch where it doesn't require re-evaluating existing forward references for validity. Planned, but this one can wait.
LGTM, thank you for this one, this will allow cog creators to do some great things.