dev #43
@ -64,6 +64,7 @@
|
|||||||
},
|
},
|
||||||
"sponsorships": {
|
"sponsorships": {
|
||||||
"time": 9,
|
"time": 9,
|
||||||
|
"grayout_days": 2,
|
||||||
"enabled": true
|
"enabled": true
|
||||||
},
|
},
|
||||||
"cache_avatars": {
|
"cache_avatars": {
|
||||||
|
@ -133,7 +133,7 @@ if configGet("enabled", "features", "sponsorships") is True:
|
|||||||
)
|
)
|
||||||
async def check_sponsors():
|
async def check_sponsors():
|
||||||
for entry in col_sponsorships.find(
|
for entry in col_sponsorships.find(
|
||||||
{"sponsorship.expires": {"$lt": datetime.now() + timedelta(days=2)}}
|
{"sponsorship.expires": {"$lt": datetime.now() + timedelta(days=3)}}
|
||||||
):
|
):
|
||||||
try:
|
try:
|
||||||
if entry["user"] not in jsonLoad(
|
if entry["user"] not in jsonLoad(
|
||||||
@ -159,7 +159,14 @@ if configGet("enabled", "features", "sponsorships") is True:
|
|||||||
)
|
)
|
||||||
continue
|
continue
|
||||||
for entry in col_sponsorships.find(
|
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:
|
try:
|
||||||
holo_user = HoloUser(entry["user"])
|
holo_user = HoloUser(entry["user"])
|
||||||
|
Reference in New Issue
Block a user