diff options
author | 2021-09-03 16:28:04 +0100 | |
---|---|---|
committer | 2021-09-03 16:28:04 +0100 | |
commit | cd7060835b5b0d150c6e91d75bc3227ee43db0ba (patch) | |
tree | 4264ddbb25e86184255574cfd0e8fa9bb11d7bcb /bot/exts/evergreen/cheatsheet.py | |
parent | Handle status not found with 404 picture (diff) | |
parent | Merge pull request #839 from python-discord/android-codeblock-fix (diff) |
Merge branch 'main' into teapot-support
Diffstat (limited to 'bot/exts/evergreen/cheatsheet.py')
-rw-r--r-- | bot/exts/evergreen/cheatsheet.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/evergreen/cheatsheet.py b/bot/exts/evergreen/cheatsheet.py index ae7793c9..33d29f67 100644 --- a/bot/exts/evergreen/cheatsheet.py +++ b/bot/exts/evergreen/cheatsheet.py @@ -1,6 +1,6 @@ import random import re -import typing as t +from typing import Union from urllib.parse import quote_plus from discord import Embed @@ -52,7 +52,7 @@ class CheatSheet(commands.Cog): ) return embed - def result_fmt(self, url: str, body_text: str) -> t.Tuple[bool, t.Union[str, Embed]]: + def result_fmt(self, url: str, body_text: str) -> tuple[bool, Union[str, Embed]]: """Format Result.""" if body_text.startswith("# 404 NOT FOUND"): embed = self.fmt_error_embed() @@ -64,13 +64,13 @@ class CheatSheet(commands.Cog): description = ( f"**Result Of cht.sh**\n" f"```python\n{body_text[:body_space]}\n" - f"... (truncated - too many lines)```\n" + f"... (truncated - too many lines)\n```\n" f"Full results: {url} " ) else: description = ( f"**Result Of cht.sh**\n" - f"```python\n{body_text}```\n" + f"```python\n{body_text}\n```\n" f"{url}" ) return False, description |