mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
[V3 Fuzzy search] fix several issues with this feature (#1788)
* [V3 Fuzzy search] fix several issues with this feature * Make it check if parent commands are hidden * Check if compiler available in setup.py * Let's just compile a dummy C file to check compiler availability * Add a missing import + remove unneeded code
This commit is contained in:
@@ -653,6 +653,39 @@ class Core(CoreLogic):
|
||||
)
|
||||
)
|
||||
|
||||
@_set.command()
|
||||
@checks.guildowner()
|
||||
@commands.guild_only()
|
||||
async def serverfuzzy(self, ctx):
|
||||
"""
|
||||
Toggle whether to enable fuzzy command search for the server.
|
||||
|
||||
Default is for fuzzy command search to be disabled.
|
||||
"""
|
||||
current_setting = await ctx.bot.db.guild(ctx.guild).fuzzy()
|
||||
await ctx.bot.db.guild(ctx.guild).fuzzy.set(not current_setting)
|
||||
await ctx.send(
|
||||
_("Fuzzy command search has been {} for this server.").format(
|
||||
_("disabled") if current_setting else _("enabled")
|
||||
)
|
||||
)
|
||||
|
||||
@_set.command()
|
||||
@checks.is_owner()
|
||||
async def fuzzy(self, ctx):
|
||||
"""
|
||||
Toggle whether to enable fuzzy command search in DMs.
|
||||
|
||||
Default is for fuzzy command search to be disabled.
|
||||
"""
|
||||
current_setting = await ctx.bot.db.fuzzy()
|
||||
await ctx.bot.db.fuzzy.set(not current_setting)
|
||||
await ctx.send(
|
||||
_("Fuzzy command search has been {} in DMs.").format(
|
||||
_("disabled") if current_setting else _("enabled")
|
||||
)
|
||||
)
|
||||
|
||||
@_set.command(aliases=["color"])
|
||||
@checks.is_owner()
|
||||
async def colour(self, ctx, *, colour: discord.Colour = None):
|
||||
|
||||
Reference in New Issue
Block a user