Example #1
0
def randomImage(args):
    m = re.search(r"from /([0-9a-z]{1,3})/", " ".join(args["args"]))
    if m:
        board =  args["args"][1]
        image = getRandomImage(board)
    else:
        image = getRandomImage("")
    return image
Example #2
0
def lewdposting(args):  # almost entirely automated lewdposting
    user = getuser(args["raw"])
    if user == "sty6":
        xx = "/u/"
    else:
        xx = "/c/"
    image = getRandomImage(xx)
    return image