decentní fix ksd

This commit is contained in:
Histmy 2023-02-03 20:38:17 +01:00
parent 85576d5f5d
commit 83e344487f

View File

@ -236,7 +236,7 @@ async function runKomand(mes: Message, cmd: Komand, cmdName: string, arg: string
} }
client.on("messageCreate", async mes => { client.on("messageCreate", async mes => {
if (process.env.ignoreMess) return; if (process.env.ignoreMess || mes.author.id == client.user!.id) return;
const [mesPrefix, komandSDiakritikou, ...args] = mes.content.split(" "); const [mesPrefix, komandSDiakritikou, ...args] = mes.content.split(" ");
if (oddiakritikovat(mesPrefix.toLowerCase()) != prefix) return void runEvent("messageCreate", [mes]); if (oddiakritikovat(mesPrefix.toLowerCase()) != prefix) return void runEvent("messageCreate", [mes]);
@ -281,6 +281,9 @@ client.on("messageCreate", async mes => {
const cmd = client.komandy[cmdName]; const cmd = client.komandy[cmdName];
radek.components.forEach(btn => btn.setDisabled()); radek.components.forEach(btn => btn.setDisabled());
i.update({ content: `ok vole ${emouty.d3k}`, components: [radek] }); i.update({ content: `ok vole ${emouty.d3k}`, components: [radek] });
if (mes.channel.type == ChannelType.DM && cmd?.DMUnsafe) return void mes.channel.send("tuten komand bohuzel v sz nefunkuje");
runKomand(mes, cmd, cmdName, celArgs); runKomand(mes, cmd, cmdName, celArgs);
}); });
collector.on("end", c => { collector.on("end", c => {