mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-21 18:27:59 -05:00
fix: use clean prefix in code blocks (#3591)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import asyncio
|
||||
import re
|
||||
from abc import ABC
|
||||
from collections import defaultdict
|
||||
from typing import List, Tuple
|
||||
@@ -104,11 +105,12 @@ class Mod(
|
||||
await self.settings.version.set("1.0.0") # set version of last update
|
||||
if await self.settings.version() < "1.1.0":
|
||||
prefixes = await self.bot.get_valid_prefixes()
|
||||
prefix = re.sub(rf"<@!?{self.bot.user.id}>", f"@{self.bot.user.name}", prefixes[0])
|
||||
msg = _(
|
||||
"Ignored guilds and channels have been moved. "
|
||||
"Please use `{prefix}moveignoredchannels` if "
|
||||
"you were previously using these functions."
|
||||
).format(prefix=prefixes[0])
|
||||
).format(prefix=prefix)
|
||||
self.bot.loop.create_task(self.bot.send_to_owners(msg))
|
||||
await self.settings.version.set(__version__)
|
||||
|
||||
|
||||
@@ -200,15 +200,15 @@ class ModSettings(MixinMeta):
|
||||
if not cur_setting:
|
||||
await self.settings.guild(guild).reinvite_on_unban.set(True)
|
||||
await ctx.send(
|
||||
_("Users unbanned with {command} will be reinvited.").format(
|
||||
command=f"{ctx.prefix}unban"
|
||||
_("Users unbanned with `{command}` will be reinvited.").format(
|
||||
command=f"{ctx.clean_prefix}unban"
|
||||
)
|
||||
)
|
||||
else:
|
||||
await self.settings.guild(guild).reinvite_on_unban.set(False)
|
||||
await ctx.send(
|
||||
_("Users unbanned with {command} will not be reinvited.").format(
|
||||
command=f"{ctx.prefix}unban"
|
||||
_("Users unbanned with `{command}` will not be reinvited.").format(
|
||||
command=f"{ctx.clean_prefix}unban"
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user