kvalitní patch na nekvalitní chybu
This commit is contained in:
parent
8fcc63d753
commit
be228e0048
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "denim_3001",
|
"name": "denim_3001",
|
||||||
"version": "3001.53.0",
|
"version": "3001.53.1",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "denim_3001",
|
"name": "denim_3001",
|
||||||
"version": "3001.53.0",
|
"version": "3001.53.1",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordjs/voice": "^0.16.0",
|
"@discordjs/voice": "^0.16.0",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "denim_3001",
|
"name": "denim_3001",
|
||||||
"version": "3001.53.0",
|
"version": "3001.53.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/"
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { APIEmbed, CommandInteractionOption, Message, TextBasedChannel } from "discord.js";
|
import { APIEmbed, CommandInteractionOption, Message, TextBasedChannel } from "discord.js";
|
||||||
import { CClient, Modul } from "../utils/types";
|
import { CClient, Modul } from "../utils/types";
|
||||||
import { createPool } from "mysql";
|
import { createPool } from "mysql";
|
||||||
import { strankovani } from "../utils/utils";
|
import { log, strankovani } from "../utils/utils";
|
||||||
|
|
||||||
// Připojení do databáze
|
// Připojení do databáze
|
||||||
const pool = createPool({
|
const pool = createPool({
|
||||||
@ -147,6 +147,7 @@ const exp: Modul = {
|
|||||||
try {
|
try {
|
||||||
await zpracovatZpravu(mes);
|
await zpracovatZpravu(mes);
|
||||||
} catch {
|
} catch {
|
||||||
|
log("general sync kompletni");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3,6 +3,7 @@ import { Message } from "discord.js";
|
|||||||
import { emouty } from "../utils/emotes";
|
import { emouty } from "../utils/emotes";
|
||||||
import { Modul } from "../utils/types";
|
import { Modul } from "../utils/types";
|
||||||
import { prefix } from "../utils/utils";
|
import { prefix } from "../utils/utils";
|
||||||
|
import { novejLeave } from "../utils/voice";
|
||||||
|
|
||||||
let spim = false;
|
let spim = false;
|
||||||
|
|
||||||
@ -21,7 +22,7 @@ const exp: Modul = {
|
|||||||
} else if (!spim) {
|
} else if (!spim) {
|
||||||
if (cont == `${prefix} vypni se`) {
|
if (cont == `${prefix} vypni se`) {
|
||||||
mes.react(emouty.purfieRIP);
|
mes.react(emouty.purfieRIP);
|
||||||
getVoiceConnections().forEach(con => con.destroy());
|
getVoiceConnections().forEach(con => novejLeave(con.joinConfig.guildId));
|
||||||
mes.client.user?.setStatus("invisible");
|
mes.client.user?.setStatus("invisible");
|
||||||
spim = true;
|
spim = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -113,7 +113,9 @@ export function novejLeave(guildId: string) {
|
|||||||
clearTimeout(timeouty.get(guildId));
|
clearTimeout(timeouty.get(guildId));
|
||||||
timeouty.delete(guildId);
|
timeouty.delete(guildId);
|
||||||
|
|
||||||
vojs.conn.destroy();
|
if (vojs.conn.state.status != VoiceConnectionStatus.Destroyed)
|
||||||
|
vojs.conn.destroy();
|
||||||
|
|
||||||
vojsy.delete(guildId);
|
vojsy.delete(guildId);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user