mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 10:17:59 -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
@@ -417,8 +417,9 @@ class RedHelpFormatter:
|
||||
pages = [box(p) for p in pagify(to_page)]
|
||||
await self.send_pages(ctx, pages, embed=False)
|
||||
|
||||
@staticmethod
|
||||
async def help_filter_func(
|
||||
self, ctx, objects: Iterable[SupportsCanSee], bypass_hidden=False
|
||||
ctx, objects: Iterable[SupportsCanSee], bypass_hidden=False
|
||||
) -> AsyncIterator[SupportsCanSee]:
|
||||
"""
|
||||
This does most of actual filtering.
|
||||
@@ -450,7 +451,7 @@ class RedHelpFormatter:
|
||||
"""
|
||||
Sends an error, fuzzy help, or stays quiet based on settings
|
||||
"""
|
||||
coms = [c async for c in self.help_filter_func(ctx, ctx.bot.walk_commands())]
|
||||
coms = {c async for c in self.help_filter_func(ctx, ctx.bot.walk_commands())}
|
||||
fuzzy_commands = await fuzzy_command_search(ctx, help_for, commands=coms, min_score=75)
|
||||
use_embeds = await ctx.embed_requested()
|
||||
if fuzzy_commands:
|
||||
|
||||
Reference in New Issue
Block a user