aboutsummaryrefslogtreecommitdiff
path: root/discord/ext
diff options
context:
space:
mode:
authorJosh <[email protected]>2021-05-15 16:10:00 +1000
committerGitHub <[email protected]>2021-05-15 02:10:00 -0400
commit42a538edda79f92a26afe0ac902b45c1ea20154d (patch)
tree455c0127b9f05c0627c1dabffff538d8f31e9f94 /discord/ext
parent[commands] Update command.parent and command.parents docs (diff)
downloaddiscord.py-42a538edda79f92a26afe0ac902b45c1ea20154d.tar.xz
discord.py-42a538edda79f92a26afe0ac902b45c1ea20154d.zip
[tasks] Replace None check with MISSING check in task loop
Diffstat (limited to 'discord/ext')
-rw-r--r--discord/ext/tasks/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/discord/ext/tasks/__init__.py b/discord/ext/tasks/__init__.py
index dced93d4..9cd14a92 100644
--- a/discord/ext/tasks/__init__.py
+++ b/discord/ext/tasks/__init__.py
@@ -185,7 +185,7 @@ class Loop(Generic[LF]):
now = datetime.datetime.now(datetime.timezone.utc)
if now > self._next_iteration:
self._next_iteration = now
- if self._time is not None:
+ if self._time is not MISSING:
self._prepare_time_index(now)
self._current_loop += 1
@@ -673,7 +673,7 @@ class Loop(Generic[LF]):
self._sleep = self._seconds = self._minutes = self._hours = MISSING
if self.is_running():
- if self._time is not None:
+ if self._time is not MISSING:
# prepare the next time index starting from after the last iteration
self._prepare_time_index(now=self._last_iteration)