Skip to content

Instantly share code, notes, and snippets.

@lavabyrd
Created October 19, 2016 20:32
Show Gist options
  • Save lavabyrd/54d4b3deee6fe851ac7a6b6580d71331 to your computer and use it in GitHub Desktop.
Save lavabyrd/54d4b3deee6fe851ac7a6b6580d71331 to your computer and use it in GitHub Desktop.
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