diff --git a/package-lock.json b/package-lock.json index 3743c74..507374b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "denim_3001", - "version": "3001.39.0", + "version": "3001.39.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "denim_3001", - "version": "3001.39.0", + "version": "3001.39.1", "license": "ISC", "dependencies": { "@discordjs/voice": "^0.10.0", diff --git a/package.json b/package.json index a611047..686bf18 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "denim_3001", - "version": "3001.39.0", + "version": "3001.39.1", "description": "Toto je velmi kvalitní bot.", "repository": { "url": "https://github.com/Histmy/Denim-Bot/" diff --git a/src/app.ts b/src/app.ts index 1e5c43b..33c40af 100644 --- a/src/app.ts +++ b/src/app.ts @@ -149,7 +149,7 @@ client.on("messageCreate", async mes => { const cmdName = aliasy[komand] ?? komand; if (runEvent("message", [mes, cmdName])) return; const cmd = komandy[cmdName] ?? customKomandy[cmdName]; - if (cmd.DMUnsafe && mes.channel.type == "DM") return void mes.channel.send("tuten komand bohuzel v sz nefunkuje"); + if (cmd?.DMUnsafe && mes.channel.type == "DM") return void mes.channel.send("tuten komand bohuzel v sz nefunkuje"); if (!cmd) { const slova: string[] = []; @@ -162,7 +162,8 @@ client.on("messageCreate", async mes => { const radek = new MessageActionRow(); nabidka.forEach((cmnd, i) => { - radek.addComponents(new MessageButton({ customId: `${i}`, label: cmnd, style: "PRIMARY" })); + const nazev = cmnd.length > 80 ? `${cmnd.slice(0, 77)}...` : cmnd; + radek.addComponents(new MessageButton({ customId: `${i}`, label: nazev, style: "PRIMARY" })); }); const zprava = await mes.channel.send({ content: "nemnel sy na misli:", components: [radek] });