Permalink
Browse files

Removing vulgarities -_-

  • Loading branch information...
lysol committed Jul 1, 2011
1 parent 72f0b1d commit 571a2b09c2a7c23cebca3899786b1a3934a36f83
Showing with 6 additions and 2 deletions.
  1. +6 −2 src/douglbutt/plugins/twitter.py
@@ -82,7 +82,11 @@ def do_untwit(self, message, reply_to):
def run_timeline(timeline):
- id = timeline[0]['id']
+ try:
+ id = timeline[0]['id']
+ except IndexError:
+ self.bot.connection.privmsg(reply_To, "Fail whale (Try again)")
+ return
result = self.twitter.ApiCall("statuses/destroy/%s" % id, "POST",
{})
if type(result) == urllib2.HTTPError or \
@@ -116,7 +120,7 @@ def run_timeline(timeline):
def do_twit(self, message, reply_to):
if len(message) > 140:
self.bot.connection.privmsg(reply_to,
- "Trim off %d characters, dickface" % (len(message) - 140))
+ "Tweet too long. Trim off %d characters." % (len(message) - 140))
return
self.bot.set_callback(self.twitter.UpdateStatus, lambda x: None,
args=[message])

0 comments on commit 571a2b0

Please sign in to comment.