neotposlouvavej vypnutelne

This commit is contained in:
Histmy 2023-04-09 16:45:44 +02:00
parent e1a39626bd
commit 7df66fd9ce
3 changed files with 10 additions and 4 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.48.0", "version": "3001.48.1",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.48.0", "version": "3001.48.1",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@discordjs/voice": "^0.15.0", "@discordjs/voice": "^0.15.0",

View File

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

View File

@ -8,6 +8,7 @@ import { canAnounceTime, handlePrevVoice, joinVoice, log, play, rand } from "../
const timeouty: SRecord<NodeJS.Timeout> = {}; const timeouty: SRecord<NodeJS.Timeout> = {};
const muty: string[] = []; const muty: string[] = [];
let neodposlouchavani = true;
const vypocitatCas = (guild: string, conn: VoiceConnection) => { const vypocitatCas = (guild: string, conn: VoiceConnection) => {
const c = new Date(); const c = new Date();
@ -195,6 +196,11 @@ const exp: Modul = {
const zvuk = ["a_jednou_sel_a_tak_moc_sel", "a_sedel", "a_sel_z_vaku_a_vykopal_marese", "a_si_rekl", "a_si_vsimnul", "u_zamestnaly_na_praxi"][rand(7)]; const zvuk = ["a_jednou_sel_a_tak_moc_sel", "a_sedel", "a_sel_z_vaku_a_vykopal_marese", "a_si_rekl", "a_si_vsimnul", "u_zamestnaly_na_praxi"][rand(7)];
const client: CClient = module.exports.client; const client: CClient = module.exports.client;
return playAndFukOff(mes, (client.komandy["vtip"].run as Function)(), `zvuky/ftipy/toz_sims${zvuk}.mp3`); return playAndFukOff(mes, (client.komandy["vtip"].run as Function)(), `zvuky/ftipy/toz_sims${zvuk}.mp3`);
},
zmenneodposlouchavani: () => {
neodposlouchavani = !neodposlouchavani;
return `Funkce NEOTPOSLOUCHAAVEJJJ!!§!§ je ${neodposlouchavani ? "nastartovana" : "chcipnuta"}`;
} }
}, },
@ -204,7 +210,7 @@ const exp: Modul = {
const conn = getVoiceConnection(aft.guild.id); const conn = getVoiceConnection(aft.guild.id);
if (!aft.channel || !conn || aft.member?.user.id == aft.client.user?.id) return; if (!aft.channel || !conn || aft.member?.user.id == aft.client.user?.id) return;
if (aft.selfMute && !aft.deaf) { if (neodposlouchavani && aft.selfMute && !aft.deaf) {
play(conn, { name: "./zvuky/neodposlouchavej.ogg", volume: 0.38 }) play(conn, { name: "./zvuky/neodposlouchavej.ogg", volume: 0.38 })
.then(() => { .then(() => {
if (!aft.selfMute) return; if (!aft.selfMute) return;