[Downloader] Support [botname] substitutions in cog install messages (#6443)

This commit is contained in:
Kreusada Ignar Yadrak 2024-09-11 04:32:18 +01:00 committed by GitHub
parent f3c89ad8bd
commit d304da7a16
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -608,7 +608,11 @@ 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.clean_prefix)) await ctx.send(
repo.install_msg.replace("[p]", ctx.clean_prefix).replace(
"[botname]", ctx.me.display_name
)
)
@repo.command(name="delete", aliases=["remove", "del"], require_var_positional=True) @repo.command(name="delete", aliases=["remove", "del"], require_var_positional=True)
async def _repo_del(self, ctx: commands.Context, *repos: Repo) -> None: async def _repo_del(self, ctx: commands.Context, *repos: Repo) -> None: