diff --git a/redbot/core/utils/chat_formatting.py b/redbot/core/utils/chat_formatting.py index f4fff6435..e265d348c 100644 --- a/redbot/core/utils/chat_formatting.py +++ b/redbot/core/utils/chat_formatting.py @@ -1,5 +1,6 @@ import datetime import itertools +import textwrap from io import BytesIO from typing import Iterator, List, Optional, Sequence, SupportsInt, Union @@ -326,6 +327,23 @@ def underline(text: str, escape_formatting: bool = True) -> str: return "__{}__".format(text) +def quote(text: str) -> str: + """Quotes the given text. + + Parameters + ---------- + text : str + The text to be marked up. + + Returns + ------- + str + The marked up text. + + """ + return textwrap.indent(text, "> ", lambda l: True) + + def escape(text: str, *, mass_mentions: bool = False, formatting: bool = False) -> str: """Get text with all mass mentions or markdown escaped.