Skip to content

Instantly share code, notes, and snippets.

@ewindisch
Created January 11, 2017 22:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ewindisch/f3d27fcd6183510beeb9476d8be57a05 to your computer and use it in GitHub Desktop.
Save ewindisch/f3d27fcd6183510beeb9476d8be57a05 to your computer and use it in GitHub Desktop.
# coding=utf8
from slackclient import SlackClient
import itertools
import time
import os
import json
slack_token = os.environ["SLACK_API_TOKEN"]
sc = SlackClient(slack_token)
def namecycle(name):
l = list(name)
for i in itertools.cycle(range(len(l))):
yield name[i+1:] + name[0:i+1]
while True:
for name in namecycle("cyclethisname"):
sc.api_call("users.profile.set", profile=json.dumps({
'user': "acdbrn",
'last_name': name
}))
time.sleep(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment