[ create a new paste ] login | about

Link: http://codepad.org/ZmikYs1I    [ raw code | fork ]

Plain Text, pasted on Aug 30:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
from util.hook import *
from util import web


@hook(cmds=['bash', 'cnb'], rate=10)
def bash(code, input):
    """Get random Chuck Norris facts. I bet he's better than you."""
    try:
        if input.group(2) and input.group(2).isdigit():
            data = web.json('http://api.icndb.com/jokes/' + input.group(2))
        else:
            data = web.json('http://api.icndb.com/jokes/random')
    except:
        return code.say('Chuck seems to be in the way. I\'m not fucking with him.')
    code.say('test')


Create a new paste based on this one


Comments: