biliau2card

package
v1.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2020 License: MIT Imports: 6 Imported by: 0

README

BiliAu2Card

基于CQHTTPAPI,提取聊天中的au号,然后返回音频卡片。
注意:卡片分享功能需要酷Q Pro, Air版将以文字形式发送。

用法

conf.example.json重命名为cong.json

$mv ./conf.example.json ./cong.json
配置文件范本
{
    "CoolQ": [
        {
            "Api": {
                "HttpAPIAddr": "",
                "HttpAPIToken": "",
            }
        }
    ],
    "BiliAu2Card": [    
        {
            "ListeningPath": "/api/cqmsg",
            "ListeningPort": 65122
        }
    ]
}
参数说明:

HttpAPIAddr: 此处填写你的CQHTTPAPI的http请求地址
HttpAPIToken: 此处填写你的CQHTTPAPI的http请求Token

BiliAu2Card: 将此处填写到CQHTTPAPI的上报地址中

ListeningPath: BiliAu2Card监听PATH
ListeningPort: BiliAu2Card监听端口

修改完成后运行即可。

将来将要加入的功能

1: Add HMAC-SHA1 signature verification.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Au2Card

func Au2Card(MsgInfo *botstruct.MsgInfo, BotConfig *botstruct.BotConfig)

Au2Card : Handle meassage and send music card.

func GetAu

func GetAu(msg string) (au string)

GetAu : Get audio number by regexp.

func GetAuInfo

func GetAuInfo(au string) (Auinfo *botstruct.Auinfo)

GetAuInfo : Get Bilibili Audio info

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL