From 41e980c517abb39e25e86b6a161ab700618f4b14 Mon Sep 17 00:00:00 2001 From: bobloy Date: Wed, 20 Jan 2021 18:23:16 -0500 Subject: [PATCH] Fix usage in `[p]filter`'s commands, make commands consistent (#4599) * Make *words a required argument. * Also make delete consistant, and name not positional --- redbot/cogs/filter/filter.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/redbot/cogs/filter/filter.py b/redbot/cogs/filter/filter.py index daf1769df..53ef2fee0 100644 --- a/redbot/cogs/filter/filter.py +++ b/redbot/cogs/filter/filter.py @@ -183,7 +183,7 @@ class Filter(commands.Cog): except discord.Forbidden: await ctx.send(_("I can't send direct messages to you.")) - @_filter_channel.command("add") + @_filter_channel.command(name="add", require_var_positional=True) async def filter_channel_add(self, ctx: commands.Context, *words: str): """Add words to the filter. @@ -205,7 +205,7 @@ class Filter(commands.Cog): else: await ctx.send(_("Words already in the filter.")) - @_filter_channel.command("remove") + @_filter_channel.command(name="delete", aliases=["remove", "del"], require_var_positional=True) async def filter_channel_remove(self, ctx: commands.Context, *words: str): """Remove words from the filter. @@ -227,7 +227,7 @@ class Filter(commands.Cog): else: await ctx.send(_("Those words weren't in the filter.")) - @_filter.command(name="add") + @_filter.command(name="add", require_var_positional=True) async def filter_add(self, ctx: commands.Context, *words: str): """Add words to the filter. @@ -249,7 +249,7 @@ class Filter(commands.Cog): else: await ctx.send(_("Those words were already in the filter.")) - @_filter.command(name="delete", aliases=["remove", "del"]) + @_filter.command(name="delete", aliases=["remove", "del"], require_var_positional=True) async def filter_remove(self, ctx: commands.Context, *words: str): """Remove words from the filter.