diff --git a/bot.py b/bot.py index 41dc492..641f15d 100644 --- a/bot.py +++ b/bot.py @@ -364,22 +364,14 @@ async def checkForSSLExpiry(): await user.send(f"SSL certificate for {domain} expires soon") print(f"SSL certificate for {domain} expires soon", flush=True) else: - print(f"User {userid} not found", flush=True) - else: - # Test by sending a message - user = await client.fetch_user(int(userid)) - if user: - await user.send(f"SSL certificate for {domain} is valid") - print(f"SSL certificate for {domain} is valid", flush=True) - else: - print(f"User {userid} not found", flush=True) + await log(f"User {userid} not found") else: print(f"No certificate found for {domain}", flush=True) await user.send(f"No certificate found for {domain}") continue except Exception as e: print(e, flush=True) - log(e) + await log(e) continue print("SSL check complete", flush=True)