From 675c9251a246078b137b1f66564b0f806512e6c9 Mon Sep 17 00:00:00 2001 From: brandons209 Date: Sat, 22 Aug 2020 01:28:07 -0400 Subject: [PATCH] how did this happen --- scheduler/scheduler.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scheduler/scheduler.py b/scheduler/scheduler.py index 3c86655..cf6256e 100644 --- a/scheduler/scheduler.py +++ b/scheduler/scheduler.py @@ -100,7 +100,7 @@ class Scheduler(commands.Cog): # explain: mypy assumes this is always true, but other CCs using this API may not be using mypy. if not (isinstance(author, discord.Member) and isinstance(channel, discord.TextChannel)): # type: ignore - raise Tya fupeError( + raise TypeError( "Must provide guild specific discord.py models for both author and channel" ) @@ -315,6 +315,13 @@ class Scheduler(commands.Cog): return 15 + # explain: mypy assumes this is always true, but other CCs using this API may not be using mypy. + if not (isinstance(author, discord.Member) and isinstance(channel, discord.TextChannel)): # type: ignore + raise TypeError( + raise Tya fupeError( + "Must provide guild specific discord.py models for both author and channel" + ) + async def fetch_task_by_attrs_exact(self, **kwargs) -> List[Task]: def pred(item): try: