double hot-fix sdžetec

This commit is contained in:
Histmy 2022-07-14 23:02:23 +02:00
parent f099153890
commit ff3e9f1d51
3 changed files with 6 additions and 5 deletions

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.39.0", "version": "3001.39.1",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.39.0", "version": "3001.39.1",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@discordjs/voice": "^0.10.0", "@discordjs/voice": "^0.10.0",

View File

@ -1,6 +1,6 @@
{ {
"name": "denim_3001", "name": "denim_3001",
"version": "3001.39.0", "version": "3001.39.1",
"description": "Toto je velmi kvalitní bot.", "description": "Toto je velmi kvalitní bot.",
"repository": { "repository": {
"url": "https://github.com/Histmy/Denim-Bot/" "url": "https://github.com/Histmy/Denim-Bot/"

View File

@ -149,7 +149,7 @@ client.on("messageCreate", async mes => {
const cmdName = aliasy[komand] ?? komand; const cmdName = aliasy[komand] ?? komand;
if (runEvent("message", [mes, cmdName])) return; if (runEvent("message", [mes, cmdName])) return;
const cmd = komandy[cmdName] ?? customKomandy[cmdName]; 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) { if (!cmd) {
const slova: string[] = []; const slova: string[] = [];
@ -162,7 +162,8 @@ client.on("messageCreate", async mes => {
const radek = new MessageActionRow(); const radek = new MessageActionRow();
nabidka.forEach((cmnd, i) => { 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] }); const zprava = await mes.channel.send({ content: "nemnel sy na misli:", components: [radek] });