fuzzysearch recommendations for !help #697

Closed
opened 2017-04-06 14:01:58 +02:00 by Chovin · 5 comments
Chovin commented 2017-04-06 14:01:58 +02:00 (Migrated from github.com)

suggestion:

!help playing

non-fuzzy example:

No command called "playing" found. Did you mean..

1   [p]audioset thumb       Toggles displaying song thumbnail where applicable
2   [p]audiostat servers    Number of servers currently playing.
3   [p]queue                Queues a song to play next. Extended functionality in `[p]help`
4   [p]set game             Sets Red's playing status
5   [p]stop                 Stops a currently playing song or playlist. CLEARS QUEUE.

additionally, for my lazy self:

4 Sublime Text

Done.

(invoked [p]set game Sublime Text)

suggestion: !help playing non-fuzzy example: ``` No command called "playing" found. Did you mean.. 1 [p]audioset thumb Toggles displaying song thumbnail where applicable 2 [p]audiostat servers Number of servers currently playing. 3 [p]queue Queues a song to play next. Extended functionality in `[p]help` 4 [p]set game Sets Red's playing status 5 [p]stop Stops a currently playing song or playlist. CLEARS QUEUE. ``` additionally, for my lazy self: 4 Sublime Text ``` Done. ``` (invoked [p]set game Sublime Text)
Kowlin commented 2017-04-06 17:07:31 +02:00 (Migrated from github.com)

I would like this but yyee... then we will have the problem of our "we don't have help in Red" and I kinda like that.

I would like this but yyee... then we will have the problem of our "we don't have help in Red" and I kinda like that.
Chovin commented 2017-04-07 01:27:26 +02:00 (Migrated from github.com)

I agree..
Maybe as a separate cog...

I agree.. Maybe as a separate cog...
calebj commented 2017-04-12 07:36:36 +02:00 (Migrated from github.com)

If you want to do this for commands normally, you can use on_command_error and checking if it is commands.CommandNotFound, I think. The additional cog would need to pull in dependencies like fuzzywuzzy for comparison of keys and docstrings loaded from bot.commands and subcommands for command groups.

To replace [p]help, you can unload the command. I figured out the code to reload the regular command from discord.py, which can be put in this hypothetical cog's __unload method.

If you want to do this for commands normally, you can use `on_command_error` and checking if it is `commands.CommandNotFound`, I think. The additional cog would need to pull in dependencies like [fuzzywuzzy](https://github.com/seatgeek/fuzzywuzzy) for comparison of keys and docstrings loaded from `bot.commands` and subcommands for command groups. To replace `[p]help`, you can unload the command. I figured out the code to reload the regular command from discord.py, which can be put in this hypothetical cog's `__unload` method.
Kowlin commented 2017-04-12 07:41:28 +02:00 (Migrated from github.com)

Judging from the above example I think this is meant to be only run on the help command.

Judging from the above example I think this is meant to be only run on the ``help`` command.
Kowlin commented 2017-12-09 01:01:36 +01:00 (Migrated from github.com)

To be done in V3's new help formatter.

To be done in V3's new help formatter.
Sign in to join this conversation.
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#697
No description provided.