decentní fix ksd
This commit is contained in:
parent
85576d5f5d
commit
83e344487f
@ -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 => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user