Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python
- """
- Twitter module for Phenny by Andi Miller
- """
- import twitter
- messagelist=[]
- def tweet (phenny, input):
- name = input.nick
- message=input.replace(".tweet ","")
- body=message.replace("<@","<")
- message=name+": "+body
- if len(message)>140:
- message=message[0:137]+"..."
- api = twitter.Api(username="aisbot", password="apple97", input_encoding="")
- if input.nick=="Op-bot":
- phenny.reply("Your message has not been submitted.")
- print "narc stopped"
- else:
- status = api.PostUpdate(message)
- phenny.reply("Your message has been submitted.")
- print "message sent to twitter",message
- tweet.rule = r'^.tweet '
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement