make weather command return if an error occured
This commit is contained in:
		
							parent
							
								
									a411fb3af4
								
							
						
					
					
						commit
						e5aad749f5
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
					@ -13,7 +13,7 @@ exports.run = async (client, message, args, error) => {
 | 
				
			||||||
  message.channel.startTyping();
 | 
					  message.channel.startTyping();
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
  weather.find({search: args.join(" "), degreeType: 'C'}, function(err, result) {
 | 
					  weather.find({search: args.join(" "), degreeType: 'C'}, function(err, result) {
 | 
				
			||||||
		if(err) client.logger.log(`weather.js error: ${JSON.stringify(error)}`, "error")
 | 
							if(err) return client.logger.log(`weather.js error: ${JSON.stringify(error)}`, "error")
 | 
				
			||||||
    if(result.length < 2 || !result) {
 | 
					    if(result.length < 2 || !result) {
 | 
				
			||||||
      message.channel.stopTyping();
 | 
					      message.channel.stopTyping();
 | 
				
			||||||
      return message.channel.send("<:error:466995152976871434> City not found!");
 | 
					      return message.channel.send("<:error:466995152976871434> City not found!");
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue