bot: Test ssl check
All checks were successful
Build Docker / Build Docker (push) Successful in 16s

This commit is contained in:
Nathan Woodburn 2023-10-01 22:47:23 +11:00
parent 34a2b70653
commit 47743be647
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

11
bot.py
View File

@ -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):