Skip to content

Commit

Permalink
Add subtext utility
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreusada committed Sep 1, 2024
1 parent a80ccb5 commit af0abb6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions redbot/core/utils/chat_formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"spoiler",
"pagify",
"strikethrough",
"subtext",
"underline",
"quote",
"escape",
Expand Down Expand Up @@ -87,6 +88,23 @@ def header(text: str, size: Literal["small", "medium", "large"]) -> str:
return "#" * multiplier + " " + text


def subtext(text: str) -> str:
"""Formats subtext from the given text.
Parameters
----------
text : str
The text to format as subtext.
Returns
-------
str
The new message.
"""
return "-# " + text


def error(text: str) -> str:
"""Get text prefixed with an error emoji.
Expand Down

0 comments on commit af0abb6

Please sign in to comment.