Compare commits
4 Commits
948837e45f
...
453293e38a
Author | SHA1 | Date | |
---|---|---|---|
453293e38a | |||
ea753beda1 | |||
7fd3cc061e | |||
49944b90c9 |
Before Width: | Height: | Size: 60 KiB After Width: | Height: | Size: 60 KiB |
@@ -64,6 +64,7 @@
|
||||
},
|
||||
"sponsorships": {
|
||||
"time": 9,
|
||||
"grayout_days": 2,
|
||||
"enabled": true
|
||||
},
|
||||
"cache_avatars": {
|
||||
|
@@ -29,7 +29,9 @@ from modules.commands.start import *
|
||||
from modules.commands.warn import *
|
||||
from modules.commands.warnings import *
|
||||
|
||||
from modules.event import *
|
||||
# This one is only imported during events
|
||||
# and should be completely rewritten for each one.
|
||||
# from modules.event import *
|
||||
|
||||
from modules.callbacks.ban import *
|
||||
from modules.callbacks.nothing import *
|
||||
|
@@ -51,7 +51,7 @@ async def cmd_sponsorship(app: Client, msg: Message):
|
||||
existent = col_sponsorships.find_one(
|
||||
{
|
||||
"user": msg.from_user.id,
|
||||
"sponsorship.expires": {"$gt": datetime.now() - timedelta(days=1)},
|
||||
"sponsorship.expires": {"$gt": datetime.now() - timedelta(days=90)},
|
||||
}
|
||||
)
|
||||
|
||||
|
@@ -396,7 +396,7 @@ async def cmd_event_bonus(app: Client, msg: Message):
|
||||
return
|
||||
|
||||
await msg.reply_photo(
|
||||
path.join("assets", "event", "stage_bonus.jpg"),
|
||||
path.join("assets", "event_easter_2023", "stage_bonus.jpg"),
|
||||
caption="""Раптом, стіна почала рухатися, відкриваючи вам прохід. Ви повільно зайшли всередину і побачили якусь дівчину із кролячими вухами. Помітивши вас, вона повернулась і, посміхаючись, промовила:
|
||||
|
||||
- Вибач, але твоє яйце знаходиться в іншій печері. Тут тільки я і мій друг - П'ятнична Ніч.
|
||||
|
@@ -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"])
|
||||
|
Reference in New Issue
Block a user