npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@shangxueink/koishi-plugin-qq-markdown-button

v1.1.0

Published

[<ruby>**QQ机器人按钮菜单**<rp>(</rp><rt>点我查看使用说明</rt><rp>)</rp></ruby>](https://www.npmjs.com/package/@shangxueink/koishi-plugin-qq-markdown-button) 使用json文件设置你的机器人菜单这样就不需要一堆配置项还很烧脑了。自用插件哦~

Downloads

189

Readme

@shangxueink/koishi-plugin-qq-markdown-button

npm


默认JSON按钮模板示例

此外,以下是一个默认的JSON按钮的指令按钮模板示例,可供参考:

{
  "rows": [
    {
      "buttons": [
        {
          "render_data": {
            "label": "再来一张😽",
            "style": 2
          },
          "action": {
            "type": 2,
            "permission": {
              "type": 2
            },
            "data": "/emojihub ",
            "enter": false
          }
        },
        {
          "render_data": {
            "label": "随机一张😼",
            "style": 2
          },
          "action": {
            "type": 2,
            "permission": {
              "type": 2
            },
            "data": "/随机表情包",
            "enter": true
          }
        },
        {
          "render_data": {
            "label": "返回列表😸",
            "style": 2
          },
          "action": {
            "type": 2,
            "permission": {
              "type": 2
            },
            "data": "/表情包列表",
            "enter": true
          }
        }
      ]
    }
  ]
}

此外,以下是一个默认的JSON按钮的本插件的json配置文件,可供参考:

{
    "msg_id": "${session.messageId}",
    "msg_type": 2,
    "content": "",
    "keyboard": {
        "id": "${config.json_setting.json_button_id}"
    }
}

默认Markdown模板示例

此外,以下是一个默认的Markdown模板示例,可供参考:

{{.text1}}
{{.text2}}
{{.img}}{{.url}}

配置模板参数示例

当然,上方的md模版,还有配置模版参数的示例参数值

参数 示例值

text1       这是第一段文字
text2       这是第二段文字
img         ![img]
url         (https://koishi.chat/logo.png)

此外,以下是一个相对应的本插件的json使用示例

{
    "msg_type": 2,
    "msg_id": "${session.messageId}",
    "markdown": {
        "custom_template_id": "${config.markdown_setting.markdown_id}",
        "params": [
            {
                "key": "text1",
                "values": [
                    "第一个文字参数"
                ]
            },
            {
                "key": "text2",
                "values": [
                    "第二个文字参数"
                ]
            },
            {
                "key": "img",
                "values": [
                    "![img#338px #250px]"
                ]
            },
            {
                "key": "url",
                "values": [
                    "(https://i0.hdslb.com/bfs/note/457c42064e08c44ffef1b047478671db3f06412f.jpg)"
                ]
            }
        ],
        "keyboard": {
            "content": {
                "rows": [
                    {
                        "buttons": [
                            {
                                "render_data": {
                                    "label": "第一个按钮",
                                    "style": 2
                                },
                                "action": {
                                    "type": 2,
                                    "permission": {
                                        "type": 2
                                    },
                                    "data": "/指令1",
                                    "enter": true
                                }
                            },
                            {
                                "render_data": {
                                    "label": "第二个按钮",
                                    "style": 2
                                },
                                "action": {
                                    "type": 2,
                                    "permission": {
                                        "type": 2
                                    },
                                    "data": "/指令2",
                                    "enter": true
                                }
                            }
                        ]
                    }
                ]
            }
        }
    }
}

默认原生markdown的json文件写法示例

此外,以下是一个默认的原生markdown的json文件模板示例,可供参考:

JSON 源码

{
    "msg_type": 2,
    "msg_id": "${session.messageId}",
    "markdown": {
        "content": "${markdown}"
    },
    "keyboard": {
        "content": {
            "rows": [
                {
                    "buttons": [
                        {
                            "render_data": {
                                "label": "再来一次",
                                "style": 2
                            },
                            "action": {
                                "type": 2,
                                "permission": {
                                    "type": 2
                                },
                                "data": "/表情包",
                                "enter": true
                            }
                        }
                    ]
                }
            ]
        }
    }
}

markdown 源码

# 你好啊 

这是一个markdown消息哦~

许可证

本项目采用 MIT 许可证。