aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/events/hacktoberfest/hacktober-issue-finder.py
diff options
context:
space:
mode:
authorGravatar wookie184 <[email protected]>2021-10-03 15:19:16 +0100
committerGravatar GitHub <[email protected]>2021-10-03 15:19:16 +0100
commit486b8f263f6717632e404a30f143a6b48c45e777 (patch)
treeaeaf324b4f7dcbb430cae14e7f7f0b17ec7babaf /bot/exts/events/hacktoberfest/hacktober-issue-finder.py
parentRemove trailing whitespace (diff)
parentMerge pull request #891 from python-discord/spooky-ignore-bots (diff)
Merge branch 'main' into main
Diffstat (limited to 'bot/exts/events/hacktoberfest/hacktober-issue-finder.py')
-rw-r--r--bot/exts/events/hacktoberfest/hacktober-issue-finder.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/exts/events/hacktoberfest/hacktober-issue-finder.py b/bot/exts/events/hacktoberfest/hacktober-issue-finder.py
index e3053851..088e7e43 100644
--- a/bot/exts/events/hacktoberfest/hacktober-issue-finder.py
+++ b/bot/exts/events/hacktoberfest/hacktober-issue-finder.py
@@ -52,10 +52,10 @@ class HacktoberIssues(commands.Cog):
async def get_issues(self, ctx: commands.Context, option: str) -> Optional[dict]:
"""Get a list of the python issues with the label 'hacktoberfest' from the Github api."""
if option == "beginner":
- if (ctx.message.created_at - self.cache_timer_beginner).seconds <= 60:
+ if (ctx.message.created_at.replace(tzinfo=None) - self.cache_timer_beginner).seconds <= 60:
log.debug("using cache")
return self.cache_beginner
- elif (ctx.message.created_at - self.cache_timer_normal).seconds <= 60:
+ elif (ctx.message.created_at.replace(tzinfo=None) - self.cache_timer_normal).seconds <= 60:
log.debug("using cache")
return self.cache_normal
@@ -88,10 +88,10 @@ class HacktoberIssues(commands.Cog):
if option == "beginner":
self.cache_beginner = data
- self.cache_timer_beginner = ctx.message.created_at
+ self.cache_timer_beginner = ctx.message.created_at.replace(tzinfo=None)
else:
self.cache_normal = data
- self.cache_timer_normal = ctx.message.created_at
+ self.cache_timer_normal = ctx.message.created_at.replace(tzinfo=None)
return data