Merge branch 'master' of github.com:esmBot/esmBot

This commit is contained in:
Essem 2022-01-08 13:26:09 -06:00
commit d3c452f79a
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C

View file

@ -26,9 +26,11 @@ export async function clean(text) {
const { parsed } = config(); const { parsed } = config();
const imageServers = JSON.parse(fs.readFileSync("./servers.json", { encoding: "utf8" })).image; const imageServers = JSON.parse(fs.readFileSync("./servers.json", { encoding: "utf8" })).image;
for (const { server, auth } of imageServers) { if (imageServers && imageServers.length !== 0) {
text = text.replaceAll(server, optionalReplace(server)); for (const { server, auth } of imageServers) {
text = text.replaceAll(auth, optionalReplace(auth)); text = text.replaceAll(server, optionalReplace(server));
text = text.replaceAll(auth, optionalReplace(auth));
}
} }
for (const env of Object.keys(parsed)) { for (const env of Object.keys(parsed)) {