diff --git a/bot.py b/bot.py index a693df4..233e71c 100644 --- a/bot.py +++ b/bot.py @@ -334,6 +334,7 @@ async def checkForSSLExpiry(): for record in response: records.append(str(record)) if not records: + print(f"No A record found for {domain}", flush=True) continue # Get the first A record ip = records[0] @@ -366,6 +367,10 @@ async def checkForSSLExpiry(): 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"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)