MiraiForum

    • Register
    • Login
    • Search
    • Popular
    • Recent
    • Unsolved
    • Tags
    • Groups
    • 友情链接

    小白求助,想通过mirai-python发送图片,但是总是遇到问题。

    开发交流
    1
    2
    59
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      majunyao last edited by

      我想把stable-diffusion接到QQ上。好不容易stable-diffusion可以生成图片了,但是发现我不会在QQ上发送图片。

      一开始,我看教程,看到这里
      50ffed64-ef59-4606-8d07-232b5d5476b4-image.png
      连接:https://natriumlab.github.io/tutorial/components.html#图片的发送方式

      但是报错告诉我,Image下没有fromFileSystem。
      bbf3ba26-1f43-4d9b-a005-759ed0c06ab9-image.png

      后来我发现有一个叫Image.from_local的函数。但是返回的是Coroutine[Any, Any, Image],也不是消息组件,我也不会把Image从中提取出来。

      我现在需要的是,一个基于mirai-python的加载本地图片的发送消息的代码(简短一点,能发就行)。或者怎么在上述的步骤继续做下去?

      mirai-python版本:0.2.6.1

      1 Reply Last reply Reply Quote 0
      • M
        majunyao last edited by

        问题已解决,不是用Image.from_local,用的是Image.from_unsafe_path

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Powered by Mamoe Technologies & NodeBB | 友情链接 | 服务监控 | Contact