How to use the cowpy.cow.get_cow function in cowpy

To help you get started, we’ve selected a few cowpy examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Dark-Princ3 / X-tra-Telegram / userbot / plugins / memes.py View on Github external
async def univsaye(cowmsg):
    """ For .cowsay module, userbot wrapper for cow which says things. """
    if not cowmsg.text[0].isalpha() and cowmsg.text[0] not in ("/", "#", "@", "!"):
        arg = cowmsg.pattern_match.group(1).lower()
        text = cowmsg.pattern_match.group(2)

        if arg == "cow":
            arg = "default"
        if arg not in cow.COWACTERS:
            return
        cheese = cow.get_cow(arg)
        cheese = cheese()

        await cowmsg.edit(f"`{cheese.milk(text).replace('`', '´')}`")
github datascopeanalytics / cowsayin / cow.py View on Github external
def say(text, name='default'):
    """Return some cowsayed text."""
    cowacter = cow.get_cow(name)()
    return cowacter.milk(text)