diff options
Diffstat (limited to 'bot/monkey_patches.py')
-rw-r--r-- | bot/monkey_patches.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/monkey_patches.py b/bot/monkey_patches.py index 9c0a22bfb..4dbdb5eab 100644 --- a/bot/monkey_patches.py +++ b/bot/monkey_patches.py @@ -30,20 +30,20 @@ def patch_typing() -> None: Handle those issues by patching the trigger_typing method so it ignores 403's in general. """ - log.info("Patching send_typing, which should fix things breaking when discord disables typing events. Stay safe!") + log.debug("Patching send_typing, which should fix things breaking when discord disables typing events. Stay safe!") original = http.HTTPClient.send_typing last_403 = None async def honeybadger_type(self, channel_id: int) -> None: # noqa: ANN001 nonlocal last_403 - if last_403 and (datetime.now() - last_403) < timedelta(minutes=5): + if last_403 and (datetime.utcnow() - last_403) < timedelta(minutes=5): log.warning("Not sending typing event, we got a 403 less than 5 minutes ago.") return try: await original(self, channel_id) except Forbidden: - last_403 = datetime.now() + last_403 = datetime.utcnow() log.warning("Got a 403 from typing event!") pass |