bot: Check for user existance
All checks were successful
Build Docker / Build Docker (push) Successful in 16s
All checks were successful
Build Docker / Build Docker (push) Successful in 16s
This commit is contained in:
parent
937606efaa
commit
c67a914970
4
bot.py
4
bot.py
@ -363,12 +363,16 @@ async def checkForSSLExpiry():
|
||||
if user:
|
||||
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 = client.get_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)
|
||||
else:
|
||||
print(f"No certificate found for {domain}", flush=True)
|
||||
await user.send(f"No certificate found for {domain}")
|
||||
|
Loading…
Reference in New Issue
Block a user