aboutsummaryrefslogtreecommitdiffstats
path: root/bot/utils
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 /bot/utils
parentMake .bm handle embed-suppression syntax for message links <link> (diff)
Add more docstrings and flake8 cleanup
Diffstat (limited to 'bot/utils')
-rw-r--r--bot/utils/converters.py7
1 files changed, 4 insertions, 3 deletions
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]