contrib bots: Better error handling response in thesaurus.
This commit is contained in:
		
							parent
							
								
									050162592a
								
							
						
					
					
						commit
						1b31a16d13
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -34,9 +34,11 @@ def get_thesaurus_result(original_content): | |||
|         return help_message | ||||
|     elif original_content.startswith('synonym'): | ||||
|         result = get_clean_response(search_keyword, method = Dictionary.synonym) | ||||
|         return result | ||||
|     elif original_content.startswith('antonym'): | ||||
|         result = get_clean_response(search_keyword, method = Dictionary.antonym) | ||||
| 
 | ||||
|     if result is None: | ||||
|         result = "Sorry, no result found! Please check the word." | ||||
|     return result | ||||
| 
 | ||||
| class ThesaurusHandler(object): | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Abhijeet Kaur
						Abhijeet Kaur