From 15bb5bf014ebaa95c85fc2555dc67c7936702bb0 Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Wed, 4 Dec 2024 11:55:24 +0500 Subject: [PATCH] new shortener (again) --- commands/General/shorturl.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/commands/General/shorturl.js b/commands/General/shorturl.js index 22a10755..fb889b88 100644 --- a/commands/General/shorturl.js +++ b/commands/General/shorturl.js @@ -51,19 +51,17 @@ class Shorturl extends BaseCommand { await interaction.deferReply({ ephemeral: interaction.options.getBoolean("ephemeral") || false }); const url = interaction.options.getString("url"); - const res = await fetch("https://i.jonnybro.ru/api/shorten", { + const res = fetch("https://s.jonnybro.ru/api/link/create", { method: "POST", headers: { + "Authorization": `Bearer ${client.config.apiKeys.sink}`, "Content-Type": "application/json", - Authorization: client.config.apiKeys.zipline, }, body: JSON.stringify({ url: url }), }).then(res => res.json()); - console.log(res); - interaction.editReply({ - content: `<${res.url}>`, + content: ``, }); } }