mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 09:52:30 -05:00
Fix duplicate commands in fuzzy help (#2798)
* Fix duplicate commands in fuzzy help Signed-off-by: Toby Harradine <tobyharradine@gmail.com> * Use help command's filter for all fuzzy Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
committed by
Michael H
parent
461f56bca1
commit
f3bbfdc64d
@@ -13,6 +13,7 @@ import pkg_resources
|
||||
from colorama import Fore, Style, init
|
||||
from pkg_resources import DistributionNotFound
|
||||
|
||||
from redbot.core.commands import RedHelpFormatter
|
||||
from .. import __version__ as red_version, version_info as red_version_info, VersionInfo
|
||||
from . import commands
|
||||
from .config import get_latest_confs
|
||||
@@ -201,7 +202,12 @@ def init_events(bot, cli_flags):
|
||||
bot._last_exception = exception_log
|
||||
await ctx.send(inline(message))
|
||||
elif isinstance(error, commands.CommandNotFound):
|
||||
fuzzy_commands = await fuzzy_command_search(ctx)
|
||||
fuzzy_commands = await fuzzy_command_search(
|
||||
ctx,
|
||||
commands={
|
||||
c async for c in RedHelpFormatter.help_filter_func(ctx, bot.walk_commands())
|
||||
},
|
||||
)
|
||||
if not fuzzy_commands:
|
||||
pass
|
||||
elif await ctx.embed_requested():
|
||||
|
||||
Reference in New Issue
Block a user