Ordinace nová řada + trochu vylepšení

This commit is contained in:
Histmy 2025-06-23 14:05:20 +02:00
parent 74dfe18a83
commit 3173a42b92
Signed by: Histmy
GPG Key ID: AC2E43C463D8F329
3 changed files with 19 additions and 10 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "denim_3001",
"version": "3001.62.2",
"version": "3001.62.3",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "denim_3001",
"version": "3001.62.2",
"version": "3001.62.3",
"license": "ISC",
"dependencies": {
"@discordjs/voice": "^0.18.0",

View File

@ -1,6 +1,6 @@
{
"name": "denim_3001",
"version": "3001.62.2",
"version": "3001.62.3",
"description": "Toto je velmi kvalitní bot.",
"repository": {
"url": "https://github.com/Histmy/Denim-Bot/"

View File

@ -2,6 +2,7 @@ import { GuildScheduledEventEntityType, GuildScheduledEventPrivacyLevel, TextCha
import { CClient, Modul } from "../utils/types";
import { log } from "../utils/utils";
import { RawData, WebSocket } from "ws";
import { emouty } from "../utils/emotes";
let client: CClient;
@ -78,11 +79,11 @@ async function executeOrdinaceFlow() {
await sleep(500);
// Otevření 24. řady
// Otevření 25. řady
await udelejOneplayRquest("carousel.display", createOneplayBody({
carouselId: "show:1;tab:65;parent:64;carousel:65",
criteria: {
filterCriterias: "season:6947",
filterCriterias: "season:15427",
sortOption: "DESC"
}
}, `{"blockId":"show:1;tab:65;parent:64;block:65"}`));
@ -167,12 +168,12 @@ async function naplanovat() {
const datum = new Date();
const den = datum.getDay();
if (!(den == 1 && datum.getHours() < 12))
if (!(den == 1 && datum.getHours() < 13))
datum.setDate(datum.getDate() + ((den == 0 ? 1 : 8) - den));
datum.setHours(13);
datum.setMinutes(0);
datum.setSeconds(0);
datum.setSeconds(1);
setTimeout(urobit, Number(datum) - Number(new Date()));
}
@ -183,7 +184,7 @@ async function urobit() {
if (!guilda) return log(new Error("dobytcarna nenalezena"));
const kdyToBude = new Date();
kdyToBude.setHours(20);
kdyToBude.setHours(21);
kdyToBude.setSeconds(0);
let nazev = "";
@ -214,14 +215,22 @@ async function urobit() {
const exp: Modul = {
more_komandy: {
dalsiordinacka: () => `dalsi ordnacka <t:${Math.ceil((Date.now() - 414000000) / 604800000) * 604800 + 414000}:R>`
dalsiordinacka: () => `dalsi ordnacka <t:${Math.ceil((Date.now() - 414000000) / 604800000) * 604800 + 414000}:R>`,
vynutitordinaceoznameni: {
cd: 6 * 24 * 60 * 60 * 1000, // 6 dní
run: async mes => {
await urobit();
mes.react(emouty.d3k);
}
}
},
on_ready: () => {
client = module.exports.client;
if (token) {
//naplanovat();
naplanovat();
//logg("nazev ordinace je:", await ziskatNazev());
}
}