From 76ce315a83225abf4d29d19d709f0ee45d356623 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Sat, 23 Jul 2022 15:11:19 -0400 Subject: [PATCH] [commands] Fix type annotations to use Union instead of | --- discord/ext/commands/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/ext/commands/core.py b/discord/ext/commands/core.py index 4b118fe9a..43b8cf9ea 100644 --- a/discord/ext/commands/core.py +++ b/discord/ext/commands/core.py @@ -2358,8 +2358,8 @@ def cooldown( def dynamic_cooldown( - cooldown: Callable[[Context], Cooldown | None], - type: BucketType | Callable[[Context], Any], + cooldown: Callable[[Context], Optional[Cooldown]], + type: Union[BucketType, Callable[[Context], Any]], ) -> Callable[[T], T]: """A decorator that adds a dynamic cooldown to a :class:`.Command`