diff --git a/src/app.ts b/src/app.ts index efec538..076db6d 100644 --- a/src/app.ts +++ b/src/app.ts @@ -24,6 +24,11 @@ client.on("error", err => { adminLog(client, "nejaka chyba na klijentovi", err); }); +client.on("shardError", err => { + log(err); + adminLog(client, "šárd ejrr??", err); +}); + client.komandy = {}; client.aliasy = {}; setClient(client); diff --git a/src/utils/utils.ts b/src/utils/utils.ts index ee2552c..1e6375c 100644 --- a/src/utils/utils.ts +++ b/src/utils/utils.ts @@ -1,4 +1,4 @@ -import { APIEmbed, ActionRowBuilder, ButtonBuilder, ButtonInteraction, ButtonStyle, CacheType, ChannelType, Client, Collection, ComponentType, MessageCreateOptions, TextBasedChannel, User } from "discord.js"; +import { APIEmbed, ActionRowBuilder, ButtonBuilder, ButtonInteraction, ButtonStyle, CacheType, ChannelType, Client, ComponentType, MessageCreateOptions, ReadonlyCollection, TextBasedChannel, User } from "discord.js"; import { existsSync } from "fs"; import { MysqlError, createPool } from "mysql"; @@ -111,7 +111,7 @@ type Nastaveni = { onCollect: (i: ButtonInteraction, id: number, radek: ActionRowBuilder) => void; timeout?: number; } & ({ - onEnd: (c: Collection>) => void; + onEnd: (c: ReadonlyCollection>) => void; } | { konecnaZprava: string; stejne?: boolean;