Пример #1
0
def cmd(send, msg, args):
    """Returns a fortune.
    Syntax: !fortune <list|[-a|-o] [module]>
    """
    if msg == 'list':
        fortunes = list_fortunes() + list_fortunes(True)
        send(" ".join(fortunes))
    else:
        output = get_fortune(msg, args['name'])
        for line in output.splitlines():
            send(line)
Пример #2
0
def cmd(send, msg, args):
    """Returns a fortune.
    Syntax: {command} <list|[-a|-o] [module]>
    """
    if msg == 'list':
        fortunes = list_fortunes() + list_fortunes(True)
        send(" ".join(fortunes))
    else:
        output = get_fortune(msg, args['name'])
        for line in output.splitlines():
            send(line)
Пример #3
0
def gen_fortune(send):
    for line in get_fortune('-o').splitlines():
        send(line)
Пример #4
0
def gen_fortune(send):
    for line in get_fortune('-o').splitlines():
        send(line)