From 03280160e1934ada6a6a31df20c35811983e406a Mon Sep 17 00:00:00 2001 From: March 7th <71698422+aiko-chan-ai@users.noreply.github.com> Date: Fri, 15 Apr 2022 00:01:41 +0700 Subject: [PATCH] 1.3.7 Hot fix WebEmbed --- package.json | 2 +- src/client/websocket/handlers/READY.js | 1 - src/structures/WebEmbed.js | 10 ++++++---- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 35b946b..8823a6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "discord.js-selfbot-v13", - "version": "1.3.6", + "version": "1.3.7", "description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]", "main": "./src/index.js", "types": "./typings/index.d.ts", diff --git a/src/client/websocket/handlers/READY.js b/src/client/websocket/handlers/READY.js index 6d766a6..ba2a9d1 100644 --- a/src/client/websocket/handlers/READY.js +++ b/src/client/websocket/handlers/READY.js @@ -58,7 +58,6 @@ const customStatusAuto = async (client) => { } module.exports = (client, { d: data }, shard) => { - console.log(data); if (client.options.checkUpdate) { try { checkUpdate(); diff --git a/src/structures/WebEmbed.js b/src/structures/WebEmbed.js index 588ee86..4bbaa65 100644 --- a/src/structures/WebEmbed.js +++ b/src/structures/WebEmbed.js @@ -230,8 +230,8 @@ class WebEmbed { if (this.thumbnail && this.thumbnail.url) { console.warn('You can only set image or thumbnail per embed.'); this.thumbnail.url = null; - this.imageType = 'image'; } + this.imageType = 'image'; this.image = { url }; return this; } @@ -245,8 +245,8 @@ class WebEmbed { if (this.image && this.image.url) { console.warn('You can only set image or thumbnail per embed.'); this.image.url = null; - this.imageType = 'thumbnail'; } + this.imageType = 'thumbnail'; this.thumbnail = { url }; return this; } @@ -345,7 +345,7 @@ const getShorten = async (url) => { // 'https://is.gd/create.php?format=simple&url=', :( 'https://tinyurl.com/api-create.php?url=', 'https://sagiri-fansub.tk/api/v1/short?url=', // my api, pls don't ddos :( - 'https://lazuee.ga/api/v1/shorten?url=' + 'https://lazuee.ga/api/v1/shorten?url=' // 'https://cdpt.in/shorten?url=', Redirects 5s :( ]; try { @@ -354,7 +354,9 @@ const getShorten = async (url) => { APIurl[Math.floor(Math.random() * APIurl.length)] }${encodeURIComponent(url)}`, ); - return `${res.data}`; + if (typeof res.data == 'string') return res.data; + else if (typeof res.data == 'object') return res.data.shorten; + else throw null; } catch { return void 0; }