dev #43

Merged
profitroll merged 49 commits from dev into master 2023-05-02 14:12:58 +03:00
2 changed files with 10 additions and 2 deletions
Showing only changes of commit ea753beda1 - Show all commits

View File

@ -64,6 +64,7 @@
},
"sponsorships": {
"time": 9,
"grayout_days": 2,
"enabled": true
},
"cache_avatars": {

View File

@ -133,7 +133,7 @@ if configGet("enabled", "features", "sponsorships") is True:
)
async def check_sponsors():
for entry in col_sponsorships.find(
{"sponsorship.expires": {"$lt": datetime.now() + timedelta(days=2)}}
{"sponsorship.expires": {"$lt": datetime.now() + timedelta(days=3)}}
):
try:
if entry["user"] not in jsonLoad(
@ -159,7 +159,14 @@ if configGet("enabled", "features", "sponsorships") is True:
)
continue
for entry in col_sponsorships.find(
{"sponsorship.expires": {"$lt": datetime.now() - timedelta(days=1)}}
{
"sponsorship.expires": {
"$lt": datetime.now()
- timedelta(
days=configGet("grayout_days", "scheduler", "sponsorships")
)
}
}
):
try:
holo_user = HoloUser(entry["user"])