Skip to content
This repository
Browse code

Removing vulgarities -_-

  • Loading branch information...
commit 571a2b09c2a7c23cebca3899786b1a3934a36f83 1 parent 72f0b1d
Derek Arnold authored

Showing 1 changed file with 6 additions and 2 deletions. Show diff stats Hide diff stats

  1. +6 2 src/douglbutt/plugins/twitter.py
8 src/douglbutt/plugins/twitter.py
@@ -82,7 +82,11 @@ def do_untwit(self, message, reply_to):
82 82
83 83 def run_timeline(timeline):
84 84
85   - id = timeline[0]['id']
  85 + try:
  86 + id = timeline[0]['id']
  87 + except IndexError:
  88 + self.bot.connection.privmsg(reply_To, "Fail whale (Try again)")
  89 + return
86 90 result = self.twitter.ApiCall("statuses/destroy/%s" % id, "POST",
87 91 {})
88 92 if type(result) == urllib2.HTTPError or \
@@ -116,7 +120,7 @@ def run_timeline(timeline):
116 120 def do_twit(self, message, reply_to):
117 121 if len(message) > 140:
118 122 self.bot.connection.privmsg(reply_to,
119   - "Trim off %d characters, dickface" % (len(message) - 140))
  123 + "Tweet too long. Trim off %d characters." % (len(message) - 140))
120 124 return
121 125 self.bot.set_callback(self.twitter.UpdateStatus, lambda x: None,
122 126 args=[message])

0 comments on commit 571a2b0

Please sign in to comment.
Something went wrong with that request. Please try again.