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: