From 04bb802cc583c784e0f01d899dbd510a4374cb3f Mon Sep 17 00:00:00 2001 From: "Jonny_Bro (Nikita)" Date: Sun, 8 Oct 2023 13:59:40 +0500 Subject: [PATCH] use my own shorturl domain --- commands/General/shorturl.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/General/shorturl.js b/commands/General/shorturl.js index 7ce342a1..d61ff90b 100644 --- a/commands/General/shorturl.js +++ b/commands/General/shorturl.js @@ -47,10 +47,10 @@ class Shorturl extends BaseCommand { */ async execute(client, interaction) { const url = interaction.options.getString("url"); - const res = await fetch(`https://is.gd/create.php?format=simple&url=${encodeURIComponent(url)}`).then(res => res.text()); + const res = await fetch(`http://jababot.ru/yourls/yourls-api.php?signature=fdf1397cfe&action=shorturl&url=${encodeURIComponent(url)}&format=json`).then(res => res.json()); interaction.reply({ - content: `<${res}>`, + content: `<${res.shorturl}>`, ephemeral: true, }); }