Replace [p] with clean prefix in install messages (#3592)

This commit is contained in:
jack1142 2020-02-28 21:17:45 +01:00 committed by GitHub
parent 9ea7262352
commit 4e4420af2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -526,7 +526,7 @@ class Downloader(commands.Cog):
else: else:
await ctx.send(_("Repo `{name}` successfully added.").format(name=name)) await ctx.send(_("Repo `{name}` successfully added.").format(name=name))
if repo.install_msg: if repo.install_msg:
await ctx.send(repo.install_msg.replace("[p]", ctx.prefix)) await ctx.send(repo.install_msg.replace("[p]", ctx.clean_prefix))
@repo.command(name="delete", aliases=["remove", "del"], usage="<repo_name>") @repo.command(name="delete", aliases=["remove", "del"], usage="<repo_name>")
async def _repo_del(self, ctx: commands.Context, repo: Repo) -> None: async def _repo_del(self, ctx: commands.Context, repo: Repo) -> None:
@ -754,7 +754,7 @@ class Downloader(commands.Cog):
await self.send_pagified(ctx, f"{message}{deprecation_notice}\n---") await self.send_pagified(ctx, f"{message}{deprecation_notice}\n---")
for cog in installed_cogs: for cog in installed_cogs:
if cog.install_msg: if cog.install_msg:
await ctx.send(cog.install_msg.replace("[p]", ctx.prefix)) await ctx.send(cog.install_msg.replace("[p]", ctx.clean_prefix))
@cog.command(name="uninstall", usage="<cogs>") @cog.command(name="uninstall", usage="<cogs>")
async def _cog_uninstall(self, ctx: commands.Context, *cogs: InstalledCog) -> None: async def _cog_uninstall(self, ctx: commands.Context, *cogs: InstalledCog) -> None: