bot: Add expiry
All checks were successful
Build Docker / Build Docker (push) Successful in 19s

This commit is contained in:
Nathan Woodburn 2023-10-01 13:13:55 +11:00
parent 32c6f0fb09
commit af3f2c49d2
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

3
bot.py
View File

@ -223,6 +223,9 @@ async def ssl(ctx, domain: str):
if domain in domains: if domain in domains:
domain_check = True domain_check = True
expiry_date = cert_obj.not_valid_after
message = message + "\n## Certificate Expiry:\n" + str(expiry_date) + "\n"
else: else:
message = message + "\n## Website Certificate:\n:x: No certificate found\n" message = message + "\n## Website Certificate:\n:x: No certificate found\n"