diff --git a/bot.py b/bot.py index 81e1656..814ad85 100644 --- a/bot.py +++ b/bot.py @@ -359,8 +359,17 @@ def checkForSSLExpiry(): user = client.get_user(int(userid)) if user: user.send(f"SSL certificate for {domain} expires soon") - except: + else: + # Test by sending a message + user = client.get_user(int(userid)) + if user: + user.send(f"SSL certificate for {domain} is valid") + except Exception as e: + print(e, flush=True) continue + print("SSL check complete", flush=True) + + @tree.command(name="ssldomains", description="List domains with SSL certificates") async def ssldomains(ctx):