t
This commit is contained in:
parent
170bb431f5
commit
bcfd056790
@ -18,7 +18,7 @@ module.exports = {
|
||||
announcement_channel: "876010629490683955",
|
||||
archive_category: "887838689533771776",
|
||||
data_dir: process.cwd() + "/data/",
|
||||
web_hostname: "ldb.owo69.me",
|
||||
base_uri: "https://ldb.owo69.me",
|
||||
world_clock: [
|
||||
{
|
||||
timezone: "America/Los_Angeles",
|
||||
|
@ -43,7 +43,7 @@ module.exports = class MagicChannel extends EventEmitter{
|
||||
}).then(channel => {
|
||||
this.channel = channel;
|
||||
fs.writeFileSync(p(this.user.id), channel.id);
|
||||
channel.send(`https://${config.web_hostname}/${this.user.id}`);
|
||||
channel.send(`${config.base_uri}/${this.user.id}`);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ async function doThing(message, user) {
|
||||
console.error("avatar download", error.message);
|
||||
}
|
||||
}
|
||||
avatarURL = `https://${config.web_hostname}/avatars/${afn}`
|
||||
avatarURL = `${config.base_uri}/avatars/${afn}`
|
||||
} else avatarURL = message.author.defaultAvatarURL;
|
||||
|
||||
let imageCandidate = message.attachments.find(a => [".png",".jpg",".jpeg",".webp",".gif"].some(e => a.url.toLowerCase().endsWith(e)));
|
||||
|
@ -73,7 +73,7 @@ async function embedPixiv(/*message*/ channel, /*array of*/ links, send /* chann
|
||||
function fallback() {
|
||||
// save the data already downloaded
|
||||
for (let image of images) if (image.data) fs.writeFileSync(config.data_dir + "pixiv-cache/" + image.url.split('?')[0].replace(/\//g, '\\'), image.data);
|
||||
let urls = images.map(image => image.url.replace("https://i.pximg.net/", `https://${config.web_hostname}/pixiv-proxy/`));
|
||||
let urls = images.map(image => image.url.replace("https://i.pximg.net/", `${config.base_uri}/pixiv-proxy/`));
|
||||
if (illust.xRestrict && !channel.nsfw) urls = urls.map(url => `||${url} ||`);
|
||||
urls = urls.join('\n');
|
||||
if (urls.length > 2000) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user