diff options
| author | 2021-10-05 11:48:17 -0400 | |
|---|---|---|
| committer | 2021-10-05 11:48:17 -0400 | |
| commit | 878423ff5cf6699bc29d49a887d8e7ca50933a47 (patch) | |
| tree | 7efb0a49bf0a9ed3a95209f122b29c2178a46f54 /bot/exts/events/hacktoberfest/hacktober-issue-finder.py | |
| parent | chore: remove single-use constant for json path (diff) | |
| parent | chore: remove single-use constant for json path (diff) | |
Merge branch 'color-677' of https://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.py | 8 | 
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 | 
