mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
updates
This commit is contained in:
parent
ee354d3b45
commit
8682cfac95
4 changed files with 27 additions and 19 deletions
1
db.py
1
db.py
|
@ -996,6 +996,7 @@ class Halloween(Base):
|
|||
if self[3] is None:
|
||||
# osu! sss
|
||||
osu = session.query(Osu).join(Royal).filter_by(id=self.royal.id).one_or_none()
|
||||
if osu is not None:
|
||||
r = requests.get(f"https://osu.ppy.sh/api/get_scores"
|
||||
f"?k={config['Osu!']['ppy_api_key']}&b=2038&u={osu.osu_id}")
|
||||
j = r.json()
|
||||
|
|
|
@ -711,17 +711,6 @@ class RoyalDiscordBot(discord.Client):
|
|||
await self.add_video_from_url(radio_message)
|
||||
await channel.send(f"📻 Aggiunto un messaggio radio, disattiva con `!radiomessages off`.")
|
||||
logger.info(f"Radio message added to the queue.")
|
||||
# HALLOWEEN
|
||||
if not random.randrange(4):
|
||||
self.video_queue.insert(0, SecretVideo(file="despair.ogg", enqueuer=None))
|
||||
target = random.sample([m for m in self.main_guild.members if len(m.roles) > 1], 1)[0]
|
||||
logger.debug(f"Despair roll successful, sending to {target.name}.")
|
||||
if target.dm_channel is None:
|
||||
await target.create_dm()
|
||||
await target.dm_channel.send(random.sample(images, 1)[0])
|
||||
else:
|
||||
logger.debug("Despair roll failed.")
|
||||
# END
|
||||
# Parse the parameter as URL
|
||||
url = re.match(r"(?:https?://|ytsearch[0-9]*:).*", " ".join(params[1:]).strip("<>"))
|
||||
if url is not None:
|
||||
|
|
|
@ -24,6 +24,10 @@ sentry = Sentry(app, dsn=config["Sentry"]["token"])
|
|||
@app.before_request
|
||||
def pre_request():
|
||||
fl_g.event_started, fl_g.event_progress = db.Halloween.puzzle_status()
|
||||
fl_g.all_moons_done = True
|
||||
for moon in fl_g.event_progress:
|
||||
if not moon:
|
||||
fl_g.all_moons_done = False
|
||||
fl_g.time_left = datetime.datetime.fromtimestamp(1540999800) - datetime.datetime.now()
|
||||
fl_g.display_on_main_site = (fl_g.time_left < datetime.timedelta(days=7)) or __debug__
|
||||
fl_g.css = "spoopy.less" if (fl_g.event_started or __debug__) else "nryg.less"
|
||||
|
@ -70,8 +74,7 @@ def page_mansion():
|
|||
|
||||
@app.route("/whatpumpkin", methods=["POST"])
|
||||
def page_whatpumpkin():
|
||||
abort(400)
|
||||
return
|
||||
return redirect("https://t.me/Steffo")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -70,6 +70,21 @@
|
|||
i'll reveal that when all others are complete, just to be safe.
|
||||
</div>
|
||||
<div class="subquests">
|
||||
{% if g.all_moons_done %}
|
||||
<div class="quest">
|
||||
<div class="progress">
|
||||
<i class="far fa-moon todo"></i>
|
||||
</div>
|
||||
<h1>
|
||||
PERFORM THE RITUAL!
|
||||
</h1>
|
||||
<div class="description">
|
||||
if <a href="https://ryg.steffo.eu/game/halloween">you have enough moons</a>, prepare for a journey to the unknown.<br>
|
||||
when the time runs out, prepare for the ritual.<br>
|
||||
you'll receive the location through a safe channel, please do not spread it.
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% for quest in g.event_progress %}
|
||||
<div class="quest {% if quest %}quest-clear{% endif %}" id="{{ loop.index }}">
|
||||
<div class="progress">
|
||||
|
@ -91,7 +106,7 @@
|
|||
{% elif loop.index == 2 %}
|
||||
{# la zucca di balu e max #}
|
||||
<h2>
|
||||
carve the ritual pumpkin
|
||||
<u title="updated">♦</u> carve the ritual pumpkin
|
||||
</h2>
|
||||
<div class="description">
|
||||
prepare a pumpkin, and empty its inside.<br>
|
||||
|
|
Loading…
Reference in a new issue