encodeURL
This commit is contained in:
parent
92db09069a
commit
fe8d9786f0
@ -9,8 +9,6 @@ const Util = require('../util/Util');
|
||||
class WebEmbed {
|
||||
constructor(data = {}) {
|
||||
this._setup(data);
|
||||
}
|
||||
_setup(data) {
|
||||
/**
|
||||
* Shorten the link
|
||||
* @type {?boolean}
|
||||
@ -22,6 +20,8 @@ class WebEmbed {
|
||||
* @type {?boolean}
|
||||
*/
|
||||
this.hidden = data.hidden ?? false;
|
||||
}
|
||||
_setup(data) {
|
||||
/**
|
||||
* The title of this embed
|
||||
* @type {?string}
|
||||
@ -308,7 +308,9 @@ const getShorten = async (url) => {
|
||||
];
|
||||
try {
|
||||
const res = await axios.get(
|
||||
`${APIurl[Math.floor(Math.random() * APIurl.length)]}${url}`,
|
||||
`${
|
||||
APIurl[Math.floor(Math.random() * APIurl.length)]
|
||||
}${encodeURIComponent(url)}`,
|
||||
);
|
||||
return `${res.data}`;
|
||||
} catch {
|
||||
|
Loading…
Reference in New Issue
Block a user