diff options
| author | 2018-03-04 01:31:38 +0100 | |
|---|---|---|
| committer | 2018-03-04 01:31:38 +0100 | |
| commit | 5e3c8e259f3b7c79b29744486846ac0b96869b13 (patch) | |
| tree | 1f400adbda22f1c964c76703bfe9c7536faffa4b | |
| parent | Add docstrings for math commands (diff) | |
Discord.py doesn't support Union type annotations on commands, had to remove them.
| -rw-r--r-- | bot/cogs/tags.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/bot/cogs/tags.py b/bot/cogs/tags.py index 2fe5f72ef..5d6488712 100644 --- a/bot/cogs/tags.py +++ b/bot/cogs/tags.py @@ -1,5 +1,4 @@ import time -from typing import Optional from aiohttp import ClientSession @@ -22,7 +21,7 @@ class Tags: self.tag_cooldowns = {} self.headers = {"X-API-KEY": SITE_API_KEY} - async def get_tag_data(self, tag_name: Optional[str] = None) -> dict: + async def get_tag_data(self, tag_name=None) -> dict: """ Retrieve the tag_data from our API @@ -99,7 +98,7 @@ class Tags: return await ctx.invoke(self.bot.get_command("help"), "Tags") @command(name="tags.get()", aliases=["tags.get", "tags.show()", "tags.show", "get_tag"]) - async def get_command(self, ctx: Context, tag_name: Optional[str] = None): + async def get_command(self, ctx: Context, tag_name=None): """ Get a list of all tags or a specified tag. @@ -109,7 +108,7 @@ class Tags: If not provided, this function shows the caller a list of all tags. """ - def _command_on_cooldown(tag_name: str) -> bool: + def _command_on_cooldown(tag_name) -> bool: """ Check if the command is currently on cooldown. The cooldown duration is set in constants.py. |