mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
Escape Discord's formatting in [p]servers command (#5744)
* Escape formatting in `[p]servers` command * style...
This commit is contained in:
parent
ee69f6e17f
commit
9d50a851eb
@ -1653,7 +1653,9 @@ class Core(commands.commands._RuleDropper, commands.Cog, CoreLogic):
|
|||||||
Note: This command is interactive.
|
Note: This command is interactive.
|
||||||
"""
|
"""
|
||||||
guilds = sorted(self.bot.guilds, key=lambda s: s.name.lower())
|
guilds = sorted(self.bot.guilds, key=lambda s: s.name.lower())
|
||||||
msg = "\n".join(f"{guild.name} (`{guild.id}`)\n" for guild in guilds)
|
msg = "\n".join(
|
||||||
|
f"{discord.utils.escape_markdown(guild.name)} (`{guild.id}`)\n" for guild in guilds
|
||||||
|
)
|
||||||
|
|
||||||
pages = list(pagify(msg, ["\n"], page_length=1000))
|
pages = list(pagify(msg, ["\n"], page_length=1000))
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user