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