mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Fix usage in [p]filter's commands, make commands consistent (#4599)
* Make *words a required argument. * Also make delete consistant, and name not positional
This commit is contained in:
parent
0358055cce
commit
41e980c517
@ -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.
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user