From f8c0ab6bb9e3e1f2bb9779dd869563ffbf05c10d Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 1 Apr 2022 22:42:50 +0700 Subject: [PATCH] Revert "Merge pull request #17 from lazuee/patch-2" This reverts commit 30150cc0e5fbe09d9fb37f02c96b4d3695011c35, reversing changes made to fbce711a9535f0be0d8f7b96689c8171b08f1cb9. --- src/structures/WebEmbed.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/structures/WebEmbed.js b/src/structures/WebEmbed.js index f497303..5f079be 100644 --- a/src/structures/WebEmbed.js +++ b/src/structures/WebEmbed.js @@ -291,9 +291,9 @@ class WebEmbed { if (this.shorten) { const url = await getShorten(fullURL); if (!url) console.log('Cannot shorten URL in WebEmbed'); - return (url || fullURL); + return this.hidden ? `${hiddenCharter} ${url || fullURL}` : (url || fullURL); } else { - return fullURL; + return this.hidden ? `${hiddenCharter} ${fullURL}` : fullURL; } } } @@ -301,8 +301,8 @@ class WebEmbed { // Credit: https://www.npmjs.com/package/node-url-shortener + google :)) const getShorten = async (url) => { const APIurl = [ - //'https://is.gd/create.php?format=simple&url=', - 'https://tinyurl.com/api-create.php?url=', //this looks fine to me + 'https://is.gd/create.php?format=simple&url=', + 'https://tinyurl.com/api-create.php?url=', // 'https://cdpt.in/shorten?url=', Redirects 5s :( ]; try { @@ -316,4 +316,4 @@ const getShorten = async (url) => { } module.exports = WebEmbed; -module.exports.hiddenEmbed = hiddenCharter; +module.exports.hiddenEmbed = hiddenCharter; \ No newline at end of file