a hned updejt purfieKUK
This commit is contained in:
parent
0671d9dfa7
commit
7f789bc0e7
@ -8,6 +8,32 @@ import { appendFileSync, existsSync } from "fs";
|
|||||||
const pripojeni: SRecord<PlayerSubscription> = {};
|
const pripojeni: SRecord<PlayerSubscription> = {};
|
||||||
const timeAnouncability: SRecord<boolean> = {};
|
const timeAnouncability: SRecord<boolean> = {};
|
||||||
|
|
||||||
|
const zajimavyUzivatele: SRecord<string> = {
|
||||||
|
"1002340891178053652": "0",
|
||||||
|
"362267256329338882": "1",
|
||||||
|
"321300980249526272": "2",
|
||||||
|
"403199237170528256": "3",
|
||||||
|
"404374791253000194": "4",
|
||||||
|
"435109967222013952": "5",
|
||||||
|
"478227285158264832": "6",
|
||||||
|
"272393325808582656": "7",
|
||||||
|
"222004187494481921": "8",
|
||||||
|
"858340006783615006": "9",
|
||||||
|
"688169800710750211": "a",
|
||||||
|
"474828395654414336": "b",
|
||||||
|
"221561136028450816": "c",
|
||||||
|
"287318873286377472": "d",
|
||||||
|
"519942360520720394": "e",
|
||||||
|
"861116768747782163": "f",
|
||||||
|
"414116351863685121": "g",
|
||||||
|
"307954132638105601": "h",
|
||||||
|
"440080748251185152": "i",
|
||||||
|
"355053867265818635": "j",
|
||||||
|
"471010846668226561": "k",
|
||||||
|
"442754524697067520": "l",
|
||||||
|
"489076647727857685": "m"
|
||||||
|
};
|
||||||
|
|
||||||
if (!existsSync("config.json")) throw new Error("config.json neexistuje");
|
if (!existsSync("config.json")) throw new Error("config.json neexistuje");
|
||||||
process.env = { ...process.env, ...require("../../config.json") };
|
process.env = { ...process.env, ...require("../../config.json") };
|
||||||
|
|
||||||
@ -95,20 +121,42 @@ export async function joinVoice(channel: VoiceChannel | StageChannel | string, g
|
|||||||
});
|
});
|
||||||
|
|
||||||
//#region Dočasná statistika mluvení ve vojsu
|
//#region Dočasná statistika mluvení ve vojsu
|
||||||
appendFileSync("zaznamy.dlog", `nazdardebile${Date.now().toString(36)}\n`);
|
if (guildId == "555779161067749446") {
|
||||||
|
let base: number;
|
||||||
|
let interval: NodeJS.Timer;
|
||||||
|
function restart() {
|
||||||
|
base = Date.now() - 36;
|
||||||
|
appendFileSync("zaznamy.dlog", `nazdardebile${base.toString(36)}\n`);
|
||||||
|
interval = setInterval(() => {
|
||||||
|
base = Date.now() - 36;
|
||||||
|
appendFileSync("zaznamy.dlog", `hb${base.toString(36)}\n`);
|
||||||
|
}, 1000 * 60 * 25);
|
||||||
|
}
|
||||||
|
restart();
|
||||||
|
|
||||||
conn.receiver.speaking.on("start", id => {
|
conn.receiver.speaking.on("start", id => {
|
||||||
appendFileSync("zaznamy.dlog", `${parseInt(id).toString(36)} ${Date.now().toString(36)}\n`);
|
const ajdy = zajimavyUzivatele[id] ?? id;
|
||||||
});
|
const cas = (Date.now() - base).toString(36);
|
||||||
|
appendFileSync("zaznamy.dlog", `${ajdy} ${cas}\n`);
|
||||||
|
});
|
||||||
|
|
||||||
conn.receiver.speaking.on("end", id => {
|
conn.receiver.speaking.on("end", id => {
|
||||||
appendFileSync("zaznamy.dlog", `${Date.now().toString(36)} ${parseInt(id).toString(36)}\n`);
|
const ajdy = zajimavyUzivatele[id] ?? id;
|
||||||
});
|
const cas = (Date.now() - base).toString(36);
|
||||||
|
appendFileSync("zaznamy.dlog", `${cas} ${ajdy}\n`);
|
||||||
|
});
|
||||||
|
|
||||||
conn.on("stateChange", (_, now) => {
|
conn.on("stateChange", (prev, now) => {
|
||||||
if (now.status !== VoiceConnectionStatus.Disconnected && now.status !== VoiceConnectionStatus.Destroyed) return;
|
if (now.status === VoiceConnectionStatus.Ready && prev.status !== VoiceConnectionStatus.Ready) {
|
||||||
appendFileSync("zaznamy.dlog", `odtahnuljsem${Date.now().toString(36)}\n`);
|
clearInterval(interval);
|
||||||
});
|
return restart();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (now.status === VoiceConnectionStatus.Disconnected || now.status === VoiceConnectionStatus.Destroyed) {
|
||||||
|
appendFileSync("zaznamy.dlog", `odtahnuljsem${Date.now().toString(36)}\n`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
||||||
if (!prev) {
|
if (!prev) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user