aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar bast <[email protected]>2020-09-25 14:25:29 -0700
committerGravatar bast <[email protected]>2020-09-25 14:25:29 -0700
commit5707d6fce9eccf9aba1bede459b7cf8daa04e33e (patch)
tree20c45d1ea91cb941b6ad871de470b2a10799f5ed
parentMake .bm handle embed-suppression syntax for message links <link> (diff)
Add more docstrings and flake8 cleanup
-rw-r--r--bot/exts/evergreen/bookmark.py1
-rw-r--r--bot/utils/converters.py7
2 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/evergreen/bookmark.py b/bot/exts/evergreen/bookmark.py
index 0adf1e68..bb86e18d 100644
--- a/bot/exts/evergreen/bookmark.py
+++ b/bot/exts/evergreen/bookmark.py
@@ -5,7 +5,6 @@ import discord
from discord.ext import commands
from bot.constants import Colours, ERROR_REPLIES, Emojis, Icons
-
from bot.utils.converters import BetterMessageConverter
log = logging.getLogger(__name__)
diff --git a/bot/utils/converters.py b/bot/utils/converters.py
index 74a0b5b7..f36fa03a 100644
--- a/bot/utils/converters.py
+++ b/bot/utils/converters.py
@@ -1,11 +1,12 @@
import discord
-
from discord.ext.commands.converter import MessageConverter
class BetterMessageConverter(MessageConverter):
- """A converter that handles embed-suppressed links like <http://example.com>"""
- async def convert(self, ctx, argument: str) -> discord.Message:
+ """A converter that handles embed-suppressed links like <http://example.com>."""
+
+ async def convert(self, ctx: discord.ext.commands.Context, argument: str) -> discord.Message:
+ """Wrap the commands.MessageConverter to handle <> delimited message links."""
# It's possible to wrap a message in [<>] as well, and it's supported because its easy
if argument.startswith("[") and argument.endswith("]"):
argument = argument[1:-1]