some null checks to prevent errors
This commit is contained in:
		
							parent
							
								
									9199002e12
								
							
						
					
					
						commit
						c2675fefa3
					
				
					 2 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
					@ -204,7 +204,7 @@ client.on("messageUpdate", async function (msg, old) {
 | 
				
			||||||
      comcord.state.currentChannel ||
 | 
					      comcord.state.currentChannel ||
 | 
				
			||||||
    msg.channel?.recipient != null
 | 
					    msg.channel?.recipient != null
 | 
				
			||||||
  ) {
 | 
					  ) {
 | 
				
			||||||
    if (msg.content == old.content) return;
 | 
					    if (old && msg.content == old.content) return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (comcord.state.inPrompt) {
 | 
					    if (comcord.state.inPrompt) {
 | 
				
			||||||
      comcord.state.messageQueue.push(msg);
 | 
					      comcord.state.messageQueue.push(msg);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -327,7 +327,7 @@ function processMessage(msg, options = {}) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if (msg.time) {
 | 
					  if (msg.time) {
 | 
				
			||||||
    console.log(msg.content);
 | 
					    console.log(msg.content);
 | 
				
			||||||
  } else if (msg.content.indexOf("\n") > -1) {
 | 
					  } else if (msg.content && msg.content.indexOf("\n") > -1) {
 | 
				
			||||||
    if (msg.content.match(REGEX_CODEBLOCK)) {
 | 
					    if (msg.content.match(REGEX_CODEBLOCK)) {
 | 
				
			||||||
      formatMessage({
 | 
					      formatMessage({
 | 
				
			||||||
        name: msg.author.username,
 | 
					        name: msg.author.username,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue