Skip to content

通过 python 程序调用

MeetWq edited this page Aug 11, 2024 · 2 revisions

可以通过 python 程序调用表情制作的函数,如:

import asyncio

from meme_generator import get_meme


def main():
    meme = get_meme("petpet")
    result = meme(images=["avatar.jpg"], texts=[], args={"circle": True})

    with open("result.gif", "wb") as f:
        f.write(result.getvalue())


if __name__ == "__main__":
    main()

更完整的使用方式可以参考 nonebot-plugin-memes