zulip_bots: Add function to get path to a bot's doc.md file.
This is part of our efforts to have the documentation for a particular bot live in this repo but still be able to render it in the main repo (in a way similar to how we render the webhooks docs). This function allows us to specify the path to a bot's doc.md file in zerver.lib.integrations.BotIntegration.
This commit is contained in:
		
							parent
							
								
									5bb1cbf8d0
								
							
						
					
					
						commit
						e0cafd1fdb
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -40,6 +40,10 @@ def get_bots_directory_path(): | |||
|     current_dir = os.path.dirname(os.path.abspath(__file__)) | ||||
|     return os.path.join(current_dir, 'bots') | ||||
| 
 | ||||
| def get_bot_doc_path(name): | ||||
|     # type: (str) -> str | ||||
|     return os.path.join(get_bots_directory_path(), '{}/doc.md'.format(name)) | ||||
| 
 | ||||
| class RateLimit(object): | ||||
|     def __init__(self, message_limit, interval_limit): | ||||
|         # type: (int, int) -> None | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Eeshan Garg
						Eeshan Garg