User bans, emoji and other bug fixes, age limiter, etc #26
@ -93,7 +93,7 @@ if configGet("enabled", "features", "sponsorships") is True:
|
|||||||
except Exception as exp:
|
except Exception as exp:
|
||||||
logWrite(f"Could not find user {entry['user']} notify about sponsorship expiry due to '{exp}'")
|
logWrite(f"Could not find user {entry['user']} notify about sponsorship expiry due to '{exp}'")
|
||||||
continue
|
continue
|
||||||
for entry in col_sponsorships.find({"sponsorship.expires": {"$lt": datetime.now()}}):
|
for entry in col_sponsorships.find({"sponsorship.expires": {"$lt": datetime.now()-timedelta(days=1)}}):
|
||||||
try:
|
try:
|
||||||
holo_user = HoloUser(entry["user"])
|
holo_user = HoloUser(entry["user"])
|
||||||
col_sponsorships.find_one_and_delete({"user": holo_user.id})
|
col_sponsorships.find_one_and_delete({"user": holo_user.id})
|
||||||
|
Reference in New Issue
Block a user