Skip to content

Instantly share code, notes, and snippets.

@darkone23
Created March 31, 2014 22:30
Show Gist options
  • Save darkone23/9903869 to your computer and use it in GitHub Desktop.
Save darkone23/9903869 to your computer and use it in GitHub Desktop.
moar messagez plz
messages = [
"wow great job",
"en tu ano",
"huehuehuehue",
"so gud",
"SENDIN THAT TWEET 2 THA PYRAMID 2NITE",
"uh huh",
"how do you come up with this stuff",
"BOOM thought leader"
]
def get_message():
index = randint(1, len(messages)) - 1
return messages[index]
@hook.command('vw')
@hook.command
def virtualwhatever(inp):
'.virtualwhatever <tweet> -- become a thought leader'
twitter = Twitter(auth=OAuth(oauth_token, oauth_secret, CONSUMER_KEY, CONSUMER_SECRET))
twitter.statuses.update(status=inp)
tweet = twitter.statuses.user_timeline(screen_name='virtualwhatever')[0]
return "%s - https://twitter.com/virtualwhatever/status/%s" % (get_message(), tweet.get('id'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment