The effect

Multi-platform support

Qq, Discord, Kaiheila, Telegram

  • qq

  • discord

  • .

How to develop and use plug-ins

  • The official tutorial

    • advantages

      • Simple to use, easy to use

      • The official CLI integrates UMD hot loading

    • disadvantages

      • Developing universal plug-ins that everyone can use is a bit more cumbersome

      • For QQ, you need to manually go to CQ-HTTP Releases to download the RUNNING version of CQHTTP for each platform

      • If you use THE TS tool to develop plug-ins, you need to repeatedly configure the plug-in environment

  • Using koishi – plugin – developer

    • advantages

      • Integrated CQ-HTTP, no need to manually go to the official website to download, reduce the cost of use

      • After configuring the CQHTTP configuration, you can start it with one click together with the script

      • Secure. There will be no private information about your robot in the code repository

      • Using Monorepo to manage projects, multiple plug-ins are compiled and configured to reduce development costs

      • Cli: go-CqHTTP startup, integrated plug-in template creation, plug-in compilation

      • Using TS as the development language gives you more control over your project and is easier to maintain

      • Plug-in development is simpler with multiple development templates: normal development templates, development templates with restful apis, development templates with GUI

      • The plugin management plugin is integrated by default, making your robot plugin management easier

    • disadvantages

      • It’s not perfect. There are a lot of new features to work on

      • The use of TS as a development language is inevitable type gymnastics

      • Use Monorepo development, relatively high technical requirements (actually no trouble, quite simple

      • There may be a few bugs (new project after all)

How to use Koishi-plugin-developer (after all

It’s very simple to use

Take the development of QQ robot as an example

  • Go to QQ official website to register a trumpet first

  • Remember your account number and password

  • Use magic tools to go to the GayHub Clone Project

    (PS: Or you can use FastGit without magic

  • Unzip the file to the specified folder and choose your favorite ide to open it (here is a convenient choice to open vscode, of course I prefer ws

  • Run YARN GO-cqhttp :${your environment} (start your GO-cqHTTP server: for forwarding QQ bot requests)

    (PS: If yarn does not exist, install it. Because monorepo is based on YARN Workspace development

  • Follow the console instructions to complete related operations after running

    (PS: may need to scan code, mobile phone login scan code. It is recommended to choose scan code login directly, without entering qq BOT password, simple

  • Run YARN start:dev (Start the development server. The development server uses Nodemon for hot load. Enter RS hot load on the console

  • Historic conversation, send help to your robot

  • Searching for installed plug-ins

    • Search for local plug-inskpm.l.l

    • Install the Demo plug-in globallykpm.i -g demo

    • Send “Hello Bot” to the robot

Next article

  • Development, build and release of the Koishi – Plugin

Communication group

discord