[V3 Help] Menus in help #2255
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 milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot!2255
Loading…
Reference in a new issue
No description provided.
Delete branch "V3/help_menus"
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 modifies the help_formatter to use the
utils.menussystem to display help on servers.It does not use it for pm, as you cannot manage reactions in pm.
It uses the built in configuration for maximum page size to split cog commands into multiple pages.
It uses the built in
helpset pagecharlimitto set a guideline on how many cogs are displayed per page.This obsoletes
max_pages_in_guildand so it is removed.This may need some adjustment to skip menus when there is only one page.
Additionally,
pm_helpis not the same thing has usinghelpin a pm and may need tweaking as well.This is ready for review.
https://github.com/Cog-Creators/Red-DiscordBot/pull/2255/commits/1a3750f2b0fea31bd1414f78b33c4ce917e34948 moved
pm_checkto be a function that could be used in the help command.https://github.com/Cog-Creators/Red-DiscordBot/pull/2255/commits/40b7ea85a842e9a9e75657353e790381a6053d50 fixed using a menu with only one page. Additionally, it will check the
use_embedssetting based on the destination context instead of the channel context. This resolves the bot sending code_blocks when embeds are requested but the bot lacks permission to post in the channel.This is a really neat feature that a lot of people have requested over time. One thing I noticed while testing is that even with a small character page size set (like 300-400 characters per help page), I would get 2 smaller cogs and 1 large cog on the first page (Admin, Alias, Audio) which led to a really large page vs. what I expected to see because Audio has so many commands comparatively. I felt like maybe a good suggestion for pages would be to break it up per cog, but then you would have at least one case where a help page would be rather small, like one or two commands, because that's all the cog has - and ganging up more cogs on that page seems like the better option. Is there an easy way to implement per-cog paging without inconveniencing people that wouldn't like the super small help pages?
Issue, By removing the max_pages_in_guild, the bot will always try to post the help into the server and there is no current way to make it be forced to DM's like there is now with max_pages, so an option to force to DM's will need to be added.
After doing some digging, I found that
pm_helpis a parameter that is passed when creating the bot instance. This parameter currently handles forcing all help dialogue to PM's.My guess is this is a relic of help coming from discord.py, and could safely be replaced with a config value instead.
#2281 Is my proposed fix to this problem.
I've done some digging on this. The current setup groups by cog unless the subcommands are >1000 characters, then it splits it into multiple pages using built-in
pagify. Afterwards, it groups the cogs until it is greater than the setpage_char_limitin helpset. This leads to inconsistent page sizes.As for a solution, I think #2281 will reign in the weirdness by adjusting the secondary grouping to aim for less than
page_char_limitgrouping. Per cog grouping could go a number of ways though.Uniform pages could be better accomplished by dropping the alphabetical precedent of ordering help.
Per cog grouping with no regard for page size could be another option.
I'm currently toying around with it and will update here when I have something I like.
@aikaterna I've got a fix now for the grouping issues you brought up.
group_fieldsfunction(Continued)lines are respected for their actual lengthOne more commit to address the comment by @Iangit1
Created a command to adjust the default
bot.pm_helpusing[p]helpset dm@bobloy Any progress on this? Can I help in any way?
This PR is ready for review. You can help by testing it and reporting whether you see any issues or not.
As a reminder, all pull requests that are not fixes are ignored for the time being while we're in this RC period
Adjusted the timeout for reactions being removed to 60 seconds from the default of 30 seconds.
The purpose is to avoid timing out while reading long help pages. I could see it going up to 120 seconds even, but let me know what you think.
A couple things: helpset pagecharlimit may need to be reduced to a range. Anything under approx 8 characters seems to crash the bot, or at least lock it up so that it doesn't respond. Seems to start looking appropriate at around 100 characters minimum, but even then only one command seems to be shown at once. Also, there is no upper limit and while I wasn't able to get the bot to error out or produce an overly large embed, that should be limited to slightly under the embed character limit for that field.
Also, while many people are excited about menu help and I appreciate the help in DM's option that was added recently, you might want to add an option to this to have the old default long-page style help in guild. There were a couple people I spoke to about this PR that seemed to be disappointed it was only a menu option in-guild without any of the old help (multiple messages).
As a request for the helpset toggle. Could you make it so it's server specific. So I could have it send the help in some servers to send this new help menu, and some servers have it to send to DM's.
I'd like this to be an option. I'd rather not remove the old formatter behavior (it's nice to just have a full help menu in places), but provide this as an alternative output for it.
Closing due to large upstream changes in the help formatter.
I'd love to see this working, but it needs large retooling to be compatible with discord.py changes being added in #2587
Pull request closed