bot.exec: some escape code fixes to minimize overflowing
though a lot of it is on discord's end with their implementation of ansi codeblocks, since that is very much a non-stock feature of hljs
This commit is contained in:
		
							parent
							
								
									055d034f02
								
							
						
					
					
						commit
						51ead27368
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -131,7 +131,9 @@ exec.callback = async function (msg, line) {
 | 
			
		|||
  });
 | 
			
		||||
 | 
			
		||||
  proc.on("close", async (code) => {
 | 
			
		||||
    out += `\x1b[1m====\n${code != 0 ? "\x1b[31m" : ""}Exited with ${code}`;
 | 
			
		||||
    out += `\n\x1b[0m\x1b[1m====\x1b[0m\n\x1b[1m${
 | 
			
		||||
      code != 0 ? "\x1b[31m" : ""
 | 
			
		||||
    }Exited with ${code}\x1b[0m`;
 | 
			
		||||
    if (out.length > 1980) {
 | 
			
		||||
      const haste = await hastebin(out);
 | 
			
		||||
      msg.channel.createMessage({
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue