s j e t e c

This commit is contained in:
Histmy 2022-12-12 14:08:55 +01:00
parent 928f46062d
commit d3d4df5bc8
3 changed files with 2 additions and 4 deletions

View File

@ -29,16 +29,14 @@ const vypocitatCas = (guild: string, conn: VoiceConnection) => {
d.setMinutes(min);
d.setSeconds(0);
const zvuk = hod == 19 && min == 30 ? "pulosmi.ogg" : `${nula(hod)}${nula(min)}.mp3`;
timeouty[conn.joinConfig.guildId] = setTimeout(() => rekniCas(guild, conn, zvuk), Number(d) - Number(c));
timeouty[conn.joinConfig.guildId] = setTimeout(() => rekniCas(guild, conn, `${nula(hod)}${nula(min)}`), Number(d) - Number(c));
};
const nula = (a: number) => a < 10 ? `0${a}` : a;
const rekniCas = (guild: string, conn: VoiceConnection, cas: string) => {
if (canAnounceTime(guild))
play(conn, [{ name: "zvuky/intro.mp3", volume: 0.8 }, { name: `zvuky/${cas}`, volume: 2 }, { name: "zvuky/grg.mp3", volume: 0.5 }])
play(conn, [{ name: "zvuky/intro.mp3", volume: 0.8 }, { name: `zvuky/${cas}.mp3`, volume: 2 }, { name: "zvuky/grg.mp3", volume: 0.5 }])
.then(() => {
vypocitatCas(guild, conn);
})

Binary file not shown.

Binary file not shown.