def METHOD_NAME(command: Command):
    """
    `!meme <names | (<MEME NAME> "<TOP TEXT>" "<BOTTOM TEXT>")>`
    Generates a meme of the given format with the provided top and
    bottom text. For a full list of formats, try `!meme names`.
    """
    channel = command.channel_id
    if not command.has_arg():
        raise UsageSyntaxException()
    name = command.arg.split()[0].lower()
    if name == "names":
        send_meme_names(command)
        return
    elif name not in MEME_NAMES.keys():
        bot.post_message(channel, "The meme name is invalid. "
                         "Try `!meme names` to get a list of all valid names")
        return
    args = get_meme_arguments(command.arg)
    if len(args) != 2:
        raise UsageSyntaxException()
    # Make an attachment linking to image
    top, bottom = args
    image_url = API_URL + f"{quote(name)}/{quote(top)}/{quote(bottom)}.jpg"
    attachments = [{"text": "", "image_url": image_url}]
    bot.post_message(channel, "", attachments=attachments)