Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion bot/exts/info/help.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import itertools
import re
from collections import namedtuple
from contextlib import suppress
from typing import List, Union
Expand Down Expand Up @@ -179,7 +180,10 @@ async def command_formatting(self, command: Command) -> Embed:
except CommandError:
command_details += NOT_ALLOWED_TO_RUN_MESSAGE

command_details += f"*{command.help or 'No details provided.'}*\n"
# Remove line breaks from docstrings, if not used to separate paragraphs.
# Allow overriding this behaviour via putting \u2003 at the start of a line.
formatted_doc = re.sub("(?<!\n)\n(?![\n\u2003])", " ", command.help)
command_details += f"*{formatted_doc or 'No details provided.'}*\n"
embed.description = command_details

return embed
Expand Down