Created
January 11, 2017 22:00
-
-
Save ewindisch/f3d27fcd6183510beeb9476d8be57a05 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# 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