Compare commits

..

4 Commits

Author SHA1 Message Date
453293e38a Sponsorship reapply suggested within 90 days 2023-04-19 10:32:57 +02:00
ea753beda1 This commit closes #37 2023-04-19 10:31:25 +02:00
7fd3cc061e Manually disabled event import 2023-04-19 10:28:57 +02:00
49944b90c9 Renamed some event's assets 2023-04-19 10:28:39 +02:00
6 changed files with 15 additions and 5 deletions

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

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

View File

@@ -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 *

View File

@@ -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)},
}
)

View File

@@ -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="""Раптом, стіна почала рухатися, відкриваючи вам прохід. Ви повільно зайшли всередину і побачили якусь дівчину із кролячими вухами. Помітивши вас, вона повернулась і, посміхаючись, промовила:
- Вибач, але твоє яйце знаходиться в іншій печері. Тут тільки я і мій друг - П'ятнична Ніч.

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"])