aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/events/hacktoberfest/hacktober-issue-finder.py
diff options
context:
space:
mode:
authorGravatar bradtimmis <[email protected]>2021-10-24 18:26:45 -0400
committerGravatar bradtimmis <[email protected]>2021-10-24 18:26:45 -0400
commit46620dd929b8359af1c086b3e9b6e23633398f6e (patch)
tree84a2b78c23709b5a03d10a72e9e2f244a82e5dbb /bot/exts/events/hacktoberfest/hacktober-issue-finder.py
parenttemp: add restructured template as comments (diff)
parentchore: remove single-use constant for json path (diff)
fix: merge conflicts
Merge branch 'color-677' of github.com:brad90four/sir-lancebot into color-677
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