We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
我希望借助使用 koishi + koishi-plugin-adapter-onebot 来迭代已有的聊天机器人项目,因此我按照 koishi 的官方文档:https://github.com/koishijs/docs/blob/main/zh-CN/manual/starter/direct.md 进行配置。但是按照教程配置完成之后,发现 OneBotBot 类没有被有效的实例化,也没有调用 ctx.server 来创建 onebot 路由,导致最终请求 404。
OneBotBot
ctx.server
我的现有的代码如下:
import server from "@koishijs/plugin-server" import { Context } from "koishi" import OneBotAdapter from "koishi-plugin-adapter-onebot" import { qqBotConfig } from "../config" const ctx = new Context() ctx.plugin(server, { port: 3001, host: "0.0.0.0", }) // 提供后端服务 ctx.plugin(OneBotAdapter, { protocol: "http", selfId: qqBotConfig.botQQ, path: "/onebot", endpoint: "localhost:3000", }) export function getKoishiCtx() { return ctx }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
我希望借助使用 koishi + koishi-plugin-adapter-onebot 来迭代已有的聊天机器人项目,因此我按照 koishi 的官方文档:https://github.com/koishijs/docs/blob/main/zh-CN/manual/starter/direct.md 进行配置。但是按照教程配置完成之后,发现
OneBotBot
类没有被有效的实例化,也没有调用ctx.server
来创建 onebot 路由,导致最终请求 404。我的现有的代码如下:
The text was updated successfully, but these errors were encountered: