View difference between Paste ID: kd7VnpSb and LLZ2QsnK
SHOW: | | - or go back to the newest paste.
1
#The way a bot will not disconnect/crash on a crash.
2
# By Aha2Y <3
3
##
4
import traceback
5
try:
6
<bot shit crap here>
7
except:
8
      fp = StringIO.StringIO()
9
      traceback.print_exc(file=fp)
10
      message = fp.getvalue()
11
      # Send Error to the IRC channel. (Of underscorex3 :P)
12
      irc.send('privmsg underscorex3 :error occured. %s\r\n' % (repr(message))