New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

koibot

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koibot

KoiBot - 一个基于 node-napcat-ts 的 QQ 机器人

latest
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

KoiBot - 一个基于 node-napcat-ts 的 QQ 机器人

使用方法:

  • 下载并配置 napcat, 并配置 NapCat 端为 websocket 服务端

    NapCat: NapCatQQ现代化的基于 NTQQ 的 Bot 协议端实现

  • [napcat]/config/onebot11_*.json 文件内容如下

{
  "network": {
    "httpServers": [],
    "httpClients": [],
    "websocketServers": [
      {
        "name": "main",
        "enable": true,
        "host": "0.0.0.0",
        "port": 3001,
        "messagePostFormat": "array",
        "reportSelfMessage": false,
        "token": "",
        "enableForcePushEvent": true,
        "debug": false,
        "heartInterval": 30000
      }
    ],
    "websocketClients": []
  },
  "musicSignUrl": "",
  "enableLocalFile2Url": false
}
  • 下载该项目
npm install koibot
# or
cnpm install koibot
  • 安装依赖
npm install
# or
cnpm install 
  • 填写 config.yaml 文件
napcat:
  baseUrl: 'ws://localhost:3001'
  accessToken: ''
  throwPromise: false  # 是否需要在触发 socket.error 时抛出错误,默认关闭
  reconnection:
    enable: true
    attempts: 10
    delay: 5000  # 单位可能是毫秒(ms)
  debug: false

self:
  master: []  # 主人
  • 创建 app.ts 文件, 填写内容如下
// [koibot]/app.ts
import {Bot} from "./src/index.ts";
new Bot().start()
  • koibot 启动!
npm start 
or
npx jiti app.js

Keywords

koibot

FAQs

Package last updated on 29 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts