From d6b7498a02fb93a4e5574c91c15ede70863163d6 Mon Sep 17 00:00:00 2001 From: pixtaded Date: Wed, 28 Aug 2024 17:40:21 +0300 Subject: [PATCH] =?UTF-8?q?Revert=20"=D0=9D=D0=BE=D1=80=D0=BC=D0=B0=D0=BB?= =?UTF-8?q?=D1=8C=D0=BD=D1=8B=D0=B5=20=D0=BA=D0=B0=D0=B2=D1=8B=D1=87=D0=BA?= =?UTF-8?q?=D0=B8"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 6916446b11823880f19068e36d714283bb851c0e. --- config.json | 7 ------- index.js | 10 +++++----- 2 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 config.json diff --git a/config.json b/config.json deleted file mode 100644 index f8dbfa1..0000000 --- a/config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "token": "MTI3NDQ2ODg0NDc1NjUzMzM3NA.GNrFeQ.8nIvjf_jUqtfMYjDlpzJQssxNVF87dpKCAK9hI", - "ALLOWED_IDS": ["1266775948548903026", "1151129960141037659", "1275008490959667234", "1234866477086019648", "1277611369578889277", "1242022836529266708", "1275098630059200586", "1277311957405405296", "1277936618749300760", "1275899048171409528"], - "admin": "593524756393754635", - "shapeGuild": "1277635303363973173", - "shapeChannel": "1277652579547086860" -} \ No newline at end of file diff --git a/index.js b/index.js index 52ba697..6522cc0 100644 --- a/index.js +++ b/index.js @@ -22,24 +22,24 @@ async function getMessageContent(message) { const attachment = message.attachments.first(); if (!attachment.url) { - console.error("URL вложения не найден."); + console.error('URL вложения не найден.'); return "Я нихуя не понял."; } - const response = await axios.get(attachment.url, { responseType: "arraybuffer" }); + const response = await axios.get(attachment.url, { responseType: 'arraybuffer' }); if (!response.data) { - console.error("Ошибка: response.data is undefined."); + console.error('Ошибка: response.data is undefined.'); return "Я нихуя не понял."; } - const buffer = Buffer.from(response.data, "binary"); + const buffer = Buffer.from(response.data, 'binary'); const file = new MessageAttachment(buffer, attachment.name); if (message.content) return { content: `${message.author.displayName}: ${message.content} `, files: [file] }; else return {files: [file]}; } catch (error) { - console.error("Ошибка при получении файла:", error.message); + console.error('Ошибка при получении файла:', error.message); return message.author.displayName + ": " + message.content + " "; } } else {