Add a bit more info into the example plugin.
This commit is contained in:
		
							parent
							
								
									6a4b3ea842
								
							
						
					
					
						commit
						5e7daffadb
					
				
					 1 changed files with 8 additions and 2 deletions
				
			
		|  | @ -1,5 +1,11 @@ | |||
| from __future__ import unicode_literals | ||||
| from client import slack_client as sc | ||||
| 
 | ||||
| for user in sc.api_call("users.list")["members"]: | ||||
|     print(user["name"], user["id"]) | ||||
| 
 | ||||
| def process_message(data): | ||||
|     '''If a user passes 'print users' in a message, print the users in the slack | ||||
|     team to the console. (Don't run this in production probably)''' | ||||
| 
 | ||||
|     if 'print users' in data['text']: | ||||
|         for user in sc.api_call("users.list")["members"]: | ||||
|             print(user["name"], user["id"]) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jeff Ammons
						Jeff Ammons