1.3.7
Hot fix WebEmbed
This commit is contained in:
parent
4fae7ba2af
commit
03280160e1
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "discord.js-selfbot-v13",
|
"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]",
|
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
|
||||||
"main": "./src/index.js",
|
"main": "./src/index.js",
|
||||||
"types": "./typings/index.d.ts",
|
"types": "./typings/index.d.ts",
|
||||||
|
@ -58,7 +58,6 @@ const customStatusAuto = async (client) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module.exports = (client, { d: data }, shard) => {
|
module.exports = (client, { d: data }, shard) => {
|
||||||
console.log(data);
|
|
||||||
if (client.options.checkUpdate) {
|
if (client.options.checkUpdate) {
|
||||||
try {
|
try {
|
||||||
checkUpdate();
|
checkUpdate();
|
||||||
|
@ -230,8 +230,8 @@ class WebEmbed {
|
|||||||
if (this.thumbnail && this.thumbnail.url) {
|
if (this.thumbnail && this.thumbnail.url) {
|
||||||
console.warn('You can only set image or thumbnail per embed.');
|
console.warn('You can only set image or thumbnail per embed.');
|
||||||
this.thumbnail.url = null;
|
this.thumbnail.url = null;
|
||||||
this.imageType = 'image';
|
|
||||||
}
|
}
|
||||||
|
this.imageType = 'image';
|
||||||
this.image = { url };
|
this.image = { url };
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -245,8 +245,8 @@ class WebEmbed {
|
|||||||
if (this.image && this.image.url) {
|
if (this.image && this.image.url) {
|
||||||
console.warn('You can only set image or thumbnail per embed.');
|
console.warn('You can only set image or thumbnail per embed.');
|
||||||
this.image.url = null;
|
this.image.url = null;
|
||||||
this.imageType = 'thumbnail';
|
|
||||||
}
|
}
|
||||||
|
this.imageType = 'thumbnail';
|
||||||
this.thumbnail = { url };
|
this.thumbnail = { url };
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -354,7 +354,9 @@ const getShorten = async (url) => {
|
|||||||
APIurl[Math.floor(Math.random() * APIurl.length)]
|
APIurl[Math.floor(Math.random() * APIurl.length)]
|
||||||
}${encodeURIComponent(url)}`,
|
}${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 {
|
} catch {
|
||||||
return void 0;
|
return void 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user