mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Add respectable aliases for consistency (#2731)
* Add respectable aliases for consistency * General command name for alias.py * Forgot one for alias * General command for filter * General command for warnings * Whoops Resolves #1749
This commit is contained in:
parent
cd745d35c2
commit
2e271d695b
@ -375,7 +375,7 @@ class Alias(commands.Cog):
|
|||||||
await ctx.send(_("There is no alias with the name `{name}`").format(name=alias_name))
|
await ctx.send(_("There is no alias with the name `{name}`").format(name=alias_name))
|
||||||
|
|
||||||
@checks.mod_or_permissions(manage_guild=True)
|
@checks.mod_or_permissions(manage_guild=True)
|
||||||
@alias.command(name="del")
|
@alias.command(name="delete", aliases=["del", "remove"])
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
async def _del_alias(self, ctx: commands.Context, alias_name: str):
|
async def _del_alias(self, ctx: commands.Context, alias_name: str):
|
||||||
"""Delete an existing alias on this server."""
|
"""Delete an existing alias on this server."""
|
||||||
@ -394,7 +394,7 @@ class Alias(commands.Cog):
|
|||||||
await ctx.send(_("Alias with name `{name}` was not found.").format(name=alias_name))
|
await ctx.send(_("Alias with name `{name}` was not found.").format(name=alias_name))
|
||||||
|
|
||||||
@checks.is_owner()
|
@checks.is_owner()
|
||||||
@global_.command(name="del")
|
@global_.command(name="delete", aliases=["del", "remove"])
|
||||||
async def _del_global_alias(self, ctx: commands.Context, alias_name: str):
|
async def _del_global_alias(self, ctx: commands.Context, alias_name: str):
|
||||||
"""Delete an existing global alias."""
|
"""Delete an existing global alias."""
|
||||||
aliases = await self.unloaded_global_aliases()
|
aliases = await self.unloaded_global_aliases()
|
||||||
|
|||||||
@ -296,7 +296,7 @@ class CustomCommands(commands.Cog):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@customcom.command(name="delete")
|
@customcom.command(name="delete", aliases=["del", "remove"])
|
||||||
@checks.mod_or_permissions(administrator=True)
|
@checks.mod_or_permissions(administrator=True)
|
||||||
async def cc_delete(self, ctx, command: str.lower):
|
async def cc_delete(self, ctx, command: str.lower):
|
||||||
"""Delete a custom command.
|
"""Delete a custom command.
|
||||||
|
|||||||
@ -246,7 +246,7 @@ class Downloader(commands.Cog):
|
|||||||
if repo.install_msg is not None:
|
if repo.install_msg is not None:
|
||||||
await ctx.send(repo.install_msg.replace("[p]", ctx.prefix))
|
await ctx.send(repo.install_msg.replace("[p]", ctx.prefix))
|
||||||
|
|
||||||
@repo.command(name="delete", aliases=["remove"], usage="<repo_name>")
|
@repo.command(name="delete", aliases=["remove", "del"], usage="<repo_name>")
|
||||||
async def _repo_del(self, ctx, repo: Repo):
|
async def _repo_del(self, ctx, repo: Repo):
|
||||||
"""Remove a repo and its files."""
|
"""Remove a repo and its files."""
|
||||||
await self._repo_manager.delete_repo(repo.name)
|
await self._repo_manager.delete_repo(repo.name)
|
||||||
|
|||||||
@ -236,7 +236,7 @@ class Filter(commands.Cog):
|
|||||||
else:
|
else:
|
||||||
await ctx.send(_("Those words were already in the filter."))
|
await ctx.send(_("Those words were already in the filter."))
|
||||||
|
|
||||||
@_filter.command(name="remove")
|
@_filter.command(name="delete", aliases=["remove", "del"])
|
||||||
async def filter_remove(self, ctx: commands.Context, *, words: str):
|
async def filter_remove(self, ctx: commands.Context, *, words: str):
|
||||||
"""Remove words from the filter.
|
"""Remove words from the filter.
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,7 @@ class Warnings(commands.Cog):
|
|||||||
registered_actions.sort(key=lambda a: a["points"], reverse=True)
|
registered_actions.sort(key=lambda a: a["points"], reverse=True)
|
||||||
await ctx.send(_("Action {name} has been added.").format(name=name))
|
await ctx.send(_("Action {name} has been added.").format(name=name))
|
||||||
|
|
||||||
@warnaction.command(name="del")
|
@warnaction.command(name="delete", aliases=["del", "remove"])
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
async def action_del(self, ctx: commands.Context, action_name: str):
|
async def action_del(self, ctx: commands.Context, action_name: str):
|
||||||
"""Delete the action with the specified name."""
|
"""Delete the action with the specified name."""
|
||||||
@ -175,7 +175,7 @@ class Warnings(commands.Cog):
|
|||||||
|
|
||||||
await ctx.send(_("The new reason has been registered."))
|
await ctx.send(_("The new reason has been registered."))
|
||||||
|
|
||||||
@warnreason.command(name="del", aliases=["remove"])
|
@warnreason.command(name="delete", aliases=["remove", "del"])
|
||||||
@commands.guild_only()
|
@commands.guild_only()
|
||||||
async def reason_del(self, ctx: commands.Context, reason_name: str):
|
async def reason_del(self, ctx: commands.Context, reason_name: str):
|
||||||
"""Delete a warning reason."""
|
"""Delete a warning reason."""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user