fix
This commit is contained in:
		
							
								
								
									
										17
									
								
								config.js
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								config.js
									
									
									
									
									
								
							| @@ -32,16 +32,19 @@ module.exports = function(url, cmds){ | |||||||
| 			            url: this.url, | 			            url: this.url, | ||||||
| 			            form:message, | 			            form:message, | ||||||
| 			    	}; | 			    	}; | ||||||
| 					return request.get(options, function (err, response, body) { | 					return new Promise((resolve,reject)=>{ | ||||||
| 		                if (err)  |  						return request.get(options, function (err, response, body) { | ||||||
| 		                	return bot.error(err); | 			                if (err)  | ||||||
|  | 			                	return reject(500); | ||||||
|  |  | ||||||
| 		                if (response.statusCode != 200 ) | 			                if (response.statusCode != 200 ) | ||||||
| 							return bot.error(response.statusCode); | 								return reject(500);//response.statusCode); | ||||||
| 							 | 							 | ||||||
| 						return event.reply(body.reply); | 							event.reply(body.reply).catch(err=>bot.error(500)); | ||||||
|  | 							return resolve(200); | ||||||
| 				    		   		 | 				    		   		 | ||||||
| 				    }); | 					    }); | ||||||
|  |  					}); | ||||||
| 				} | 				} | ||||||
| 			}, | 			}, | ||||||
| 		], | 		], | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user