aboutsummaryrefslogtreecommitdiffstats
path: root/bot/utils/__init__.py
diff options
context:
space:
mode:
authorGravatar S. Co1 <[email protected]>2019-09-09 16:37:13 -0400
committerGravatar S. Co1 <[email protected]>2019-09-09 16:37:13 -0400
commit4b18d7e430d5cea16406c65349718f72919c01c3 (patch)
tree7fc4f6a0aea2d16e0409723d205c1ab45dcd920f /bot/utils/__init__.py
parentInitial linting pass (diff)
Lint remaining files
hacktoberstats cog handled in separate PR
Diffstat (limited to 'bot/utils/__init__.py')
-rw-r--r--bot/utils/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bot/utils/__init__.py b/bot/utils/__init__.py
index 3249a9cf..8732eb22 100644
--- a/bot/utils/__init__.py
+++ b/bot/utils/__init__.py
@@ -29,7 +29,7 @@ async def disambiguate(
choices = (f'{index}: {entry}' for index, entry in enumerate(entries, start=1))
- def check(message):
+ def check(message: discord.Message) -> bool:
return (message.content.isdigit()
and message.author == ctx.author
and message.channel == ctx.channel)
@@ -109,7 +109,7 @@ def replace_many(
pattern = "|".join(re.escape(word) for word in words_to_replace)
regex = re.compile(pattern, re.I if ignore_case else 0)
- def _repl(match):
+ def _repl(match: re.Match) -> str:
"""Returns replacement depending on `ignore_case` and `match_case`"""
word = match.group(0)
replacement = replacements[word.lower() if ignore_case else word]