Merge branch 'master' of github.com:esmBot/esmBot
This commit is contained in:
		
						commit
						d3c452f79a
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		| 
						 | 
					@ -26,10 +26,12 @@ 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;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  if (imageServers && imageServers.length !== 0) {
 | 
				
			||||||
    for (const { server, auth } of imageServers) {
 | 
					    for (const { server, auth } of imageServers) {
 | 
				
			||||||
      text = text.replaceAll(server, optionalReplace(server));
 | 
					      text = text.replaceAll(server, optionalReplace(server));
 | 
				
			||||||
      text = text.replaceAll(auth, optionalReplace(auth));
 | 
					      text = text.replaceAll(auth, optionalReplace(auth));
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  for (const env of Object.keys(parsed)) {
 | 
					  for (const env of Object.keys(parsed)) {
 | 
				
			||||||
    text = text.replaceAll(parsed[env], optionalReplace(parsed[env]));
 | 
					    text = text.replaceAll(parsed[env], optionalReplace(parsed[env]));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue