mirror of
https://github.com/JonnyBro/JaBa.git
synced 2024-11-22 05:04:58 +05:00
use my own shorturl domain
This commit is contained in:
parent
83414e817a
commit
04bb802cc5
1 changed files with 2 additions and 2 deletions
|
@ -47,10 +47,10 @@ class Shorturl extends BaseCommand {
|
||||||
*/
|
*/
|
||||||
async execute(client, interaction) {
|
async execute(client, interaction) {
|
||||||
const url = interaction.options.getString("url");
|
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({
|
interaction.reply({
|
||||||
content: `<${res}>`,
|
content: `<${res.shorturl}>`,
|
||||||
ephemeral: true,
|
ephemeral: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue