Created
October 19, 2016 20:32
-
-
Save lavabyrd/54d4b3deee6fe851ac7a6b6580d71331 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import unicode_literals | |
from client import slack_client as sc | |
outputs=[] | |
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"]: | |
x = user["name"] + user["id"] | |
outputs.append[("D14N66ZGV", x)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment