Git Product home page Git Product logo

Comments (6)

whtsky avatar whtsky commented on July 26, 2024

「图片信息」是指 ArticlesReply 么?

你可以自己构建一个 ArticlesReply 然后返回:

from werobot.reply import ArticlesReply, Article
def handler(message):
    reply = ArticlesReply(message=message)
    article = Article(
        title="title",
        description="description",
        img="图片地址",
        url="点开之后的网址"
    )
    reply.add_article(article)
    return reply

或者如果你觉得这样麻烦的话,也可以直接返回一个 长度为4的列表的列表, WeRoBot 可以自动转化成 ArticlesReply

def articles(message):
    return [
        [
            "title",
            "description",
            "img",
            "url"
        ]
    ]

from werobot.

accaolei avatar accaolei commented on July 26, 2024

我还想问一下这个框架可以推送信息吗?

from werobot.

bviews avatar bviews commented on July 26, 2024

不能主动推送。

已使用 Sparrow (http://www.sparrowmailapp.com/?sig)

已使用 Sparrow (http://www.sparrowmailapp.com/?sig)

在 2013年8月22日星期四,上午9:05,cary 写道:

我还想问一下这个框架可以推送信息吗?


Reply to this email directly or view it on GitHub (#22 (comment)).

from werobot.

accaolei avatar accaolei commented on July 26, 2024

感谢bviews,whtsky
这个框架很方便,很好用,同时我也想找一个能推送的,不知道有没有解决方案?

from werobot.

whtsky avatar whtsky commented on July 26, 2024

Reorx 在 0.3.x 的时候 fork 了一个版本,加上了 werobot.client : https://github.com/reorx/WeRoBot/blob/arbitrary/werobot/client.py

可以参考这个自己动手写一下


官方没有内置主要是因为……高中党太忙了,好多想要的功能还没有实现(比如方便的测试框架, 自定义菜单的自动创建)(好吧其实还是我懒),而维护这个模拟登陆的东西又要耗费大量时间精力,所以……

from werobot.

accaolei avatar accaolei commented on July 26, 2024

wshtsky很厉害啦,代码的质量很高。我改进一下客户端,后期如果好用的话就贡献过来。
感谢bviews和whtsky的帮助

from werobot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.