Code Monkey home page Code Monkey logo

Comments (6)

pandolia avatar pandolia commented on July 26, 2024

具体什么样的信息?我试一下看看

from qqbot.

qqdaiyu55 avatar qqdaiyu55 commented on July 26, 2024

Example:

<?xml version="1.0" encoding="utf-8"?>
<msg templateID="12345" action="web" brief="TEST" serviceID="1" url="http://koukuko.com">
    <item layout="1">
        <title>layout="1"</title>
        <summary>title,summary,picture各占一行均可重复使用,按照Element顺序显示</summary>
        <picture cover="http://placekitten.com/250/100"/>
    </item>
</msg>

Preview:
Image

from qqbot.

pandolia avatar pandolia commented on July 26, 2024

写了个脚本测试了一下:

s = '''\
<?xml version="1.0" encoding="utf-8"?>
<msg templateID="12345" action="web" brief="TEST" serviceID="1" url="http://koukuko.com">
    <item layout="1">
        <title>layout="1"</title>
        <summary>title,summary,picture各占一行均可重复使用,按照Element顺序显示</summary>
        <picture cover="http://placekitten.com/250/100"/>
    </item>
</msg>\
'''

from qqbot import QQBot
bot = QQBot()
bot.Login()
bot.Send('buddy', 'Jack', s)

这时 Jack 收到的是一段文本。效果是下面这样的:

qq 20170223215257

from qqbot.

pandolia avatar pandolia commented on July 26, 2024

貌似发不了, xml 应该还需要进一步处理之后再发送,这样才能在对方的 qq 客户端上被显示为卡片。就是不知道这种卡片消息的具体格式是怎么样的,肯定不是这段 xml 原文那么简单。

from qqbot.

qqdaiyu55 avatar qqdaiyu55 commented on July 26, 2024

是的,单纯文本方式发送不出来的,要经过协议层的处理,格式可以参考QQ的XML消息格式整理

from qqbot.

pandolia avatar pandolia commented on July 26, 2024

那个链接我看了一下,讲的还是xml的结构,没有讲消息的底层格式。
可能 smartqq 协议只能发文本消息。

from qqbot.

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.