mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 03:08:55 -05:00
[CustomCom] Insert space before newline separating CC previews (#2350)
Resolves #2295. Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
parent
2bd05a5a04
commit
aa854cf1f9
@ -351,7 +351,6 @@ class CustomCommands(commands.Cog):
|
||||
result = responses
|
||||
else:
|
||||
continue
|
||||
# Replace newlines with spaces
|
||||
# Cut preview to 52 characters max
|
||||
if len(result) > 52:
|
||||
result = result[:49] + "..."
|
||||
@ -362,7 +361,8 @@ class CustomCommands(commands.Cog):
|
||||
results.append((f"{ctx.clean_prefix}{command}", result))
|
||||
|
||||
if await ctx.embed_requested():
|
||||
content = "\n".join(map("**{0[0]}** {0[1]}".format, results))
|
||||
# We need a space before the newline incase the CC preview ends in link (GH-2295)
|
||||
content = " \n".join(map("**{0[0]}** {0[1]}".format, results))
|
||||
pages = list(pagify(content, page_length=1024))
|
||||
embed_pages = []
|
||||
for idx, page in enumerate(pages, start=1):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user