GithubHelp home page GithubHelp logo

koishijs / docs Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 63.0 25.33 MB

Documentation for Koishi

Home Page: https://koishi.chat

License: Creative Commons Attribution Share Alike 4.0 International

Vue 76.01% TypeScript 11.39% SCSS 12.60%

docs's People

Contributors

akokk0 avatar anillc avatar bili-22 avatar cn-traveler avatar cyanchanges avatar dreamofice avatar h4m5ter avatar huanlinoto avatar idranme avatar ilharp avatar koishi-bot avatar lgc2333 avatar linlin00000000 avatar lipraty avatar maikotan avatar manipego avatar medicago087 avatar memset0 avatar microcber avatar mirrorcy avatar programripper avatar seidko avatar shigma avatar silvermooooon avatar slime00 avatar ttsdzb avatar undefined-moe avatar wfjsw avatar windbullet avatar yeying-xingchen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docs's Issues

Add section for unpublishing a plugin

Consider adding a new section to explain why and how to unpublish a plugin in publish.md.

Also move the phrase in the pathesis at the line below to there.

- 最新版本不能被 [弃用](https://docs.npmjs.com/deprecating-and-undeprecating-packages-or-package-versions) (一种常见的情况是:你已经发布了某个插件,又希望更换一个名字重新发布,此时你可以通过弃用的方式让旧的名字不显示在插件市场中)

希望增加一些关于插件Config的详细信息和best practice

文档中介绍了插件应当export一个Config interface,然后用schemastery对config进行验证,但是没有提到每个插件的config具体如何对应到koishi.yml的某个值,同时希望增加一下常见的嵌套插件的情况下的config的best practice

Telegram文档改进

Describe the problem related to the feature request

Telegram文档改进

Describe the solution you'd like

  1. 使用 /setprivacy 开启 Privacy Mode(不然机器人只能收到特定消息)
    ...
    如果启动机器人后发现收不到不带 / 的消息,这很可能是由于 Privacy Mode 未开启。如果开启后仍然收不到消息,请尝试将机器人从群组中移除后重新加入。

这段是不是有些问题?开启Privacy Mode是仅能接受带斜杠的消息吧,应该是Privacy Mode设置为DISABLED

Describe alternatives you've considered

No response

Additional context

No response

顶栏增加论坛和QQ群的按钮

可选的图标:

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -1 104 106" data-site="upload.wikimedia">
  <path fill="#231f20" d="M51.87 0C23.71 0 0 22.83 0 51v52.81l51.86-.05c28.16 0 51-23.71 51-51.87S80 0 51.87 0Z"/>
  <path fill="#fff9ae" d="M52.37 19.74a31.62 31.62 0 0 0-27.79 46.67l-5.72 18.4 20.54-4.64a31.61 31.61 0 1 0 13-60.43Z"/>
  <path fill="#00aeef" d="M77.45 32.12a31.6 31.6 0 0 1-38.05 48l-20.54 4.7 20.91-2.47a31.6 31.6 0 0 0 37.68-50.23Z"/>
  <path fill="#00a94f" d="M71.63 26.29A31.6 31.6 0 0 1 38.8 78l-19.94 6.82 20.54-4.65a31.6 31.6 0 0 0 32.23-53.88Z"/>
  <path fill="#f15d22" d="M26.47 67.11a31.61 31.61 0 0 1 51-35 31.61 31.61 0 0 0-52.89 34.3l-5.72 18.4Z"/>
  <path fill="#e31b23" d="M24.58 66.41a31.61 31.61 0 0 1 47.05-40.12 31.61 31.61 0 0 0-49 39.63l-3.76 18.9Z"/>
<deepl-alert xmlns=""/><deepl-alert xmlns=""/><deepl-alert xmlns=""/><style xmlns="http://www.w3.org/1999/xhtml" id="ld0y9r61.7c">rt.katakana-terminator-rt::before { content: attr(data-rt); }</style></svg>
<svg id="koishi" width="1024" height="1024" viewBox="0 0 512 512"
  xmlns="http://www.w3.org/2000/svg">
  <circle cx="256" cy="256" r="256" fill="#53489C"/>
  <path d="M448.15,218.52a278,278,0,0,1-17.71,61.42,40.16,40.16,0,0,0,25-4,40,40,0,0,1-33.07,21.45,280.06,280.06,0,0,1-39.12,58.33,8,8,0,0,0-1.06,8.9L401,401l-36.37-18.77a8,8,0,0,0-8.9,1.06,280.06,280.06,0,0,1-58.33,39.12A40,40,0,0,1,276,455.48a40.16,40.16,0,0,0,4-25,278,278,0,0,1-61.42,17.71A25,25,0,0,1,193.87,471a25,25,0,0,0,8.69-20.66,281.77,281.77,0,0,1-56,.5C301.54,432,432,301.54,450.84,146.55a281.77,281.77,0,0,1-.5,56A25,25,0,0,0,471,193.87,25,25,0,0,1,448.15,218.52Z" fill="#FFFFFF"/>
</svg>

目前的文档对于对于对于初学开发的人有些不友好

讲一讲我发现/遇到的问题吧。

https://koishi.chat/manual/advanced/workspace.html

开发模式 重新运行你的项目,你会立即在网页控制台的配置界面中看到 example 插件。只需点击启用,你就可以实现与机器人的对话了:

创建example插件的时候,以开发模式重新运行项目,并不会立即在网页控制台的配置界面中看到 example 插件。需要在koishi.yml添加example:{},或者在插件配置的右上角点添加插件才能看到 example 插件。

另外我有一些小的pr想提,没有找到大致的操作流程。
我目前的流程如下:

  1. 执行yarn create koishi,都使用默认选项。
  2. 进入koishi-app目录,创建plugins目录。
  3. 执行git clone https://github.com/koishijs/koishi-plugin-music plugins/music
  4. 执行yarn
  5. 执行yarn dev
  6. 添加插件添加music插件
  7. 点三角按钮启动music插件,需要点两次才能成功启动,然后控制台报[W] app duplicate plugin detected: music
  8. 在沙盒里发送music hi,控制台报错
2022-12-09 13:19:33 [W] session music hi
                        TypeError: Cannot read properties of undefined (reading '_data')
                            at Internal._executeMatcher (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\@koishijs\core\src\internal.ts:206:42)
                            at Session.<anonymous> (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\@koishijs\core\src\internal.ts:150:14)
                            at Lifecycle.emit (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\events.ts:100:16)
                            at Context.<anonymous> (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\context.ts:73:27)
                            at Internal._process (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\@koishijs\core\src\internal.ts:282:14)
                            at next (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\@koishijs\core\src\internal.ts:342:22)
       ...
  1. ctrl c,再执行yarn dev,报错
2022-12-09 13:20:21 [I] app apply plugin music:aninfx
2022-12-09 13:20:22 [W] app TypeError: Cannot read properties of undefined (reading 'define')
                            at Object.apply (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\@koishijs\plugin-help\src\index.ts:65:12)
                            at MainScope.MainScope.apply (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:251:36)
                            at MainScope.start (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:281:12)
                            at MainScope.restart (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:67:10)
                            at MainScope.setup (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:246:10)
                            at MainScope (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:209:22)
                            at Map.plugin (C:\Users\allegray\koishi-bot\test\kois...
2022-12-09 13:20:22 [W] app TypeError: Cannot read properties of undefined (reading 'define')
                            at Object.apply (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\@koishijs\plugin-sandbox\src\index.ts:119:12)
                            at MainScope.MainScope.apply (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:251:36)
                            at MainScope.start (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:281:12)
                            at MainScope.restart (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:67:10)
                            at MainScope.setup (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:246:10)
                            at MainScope (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:209:22)
                            at Map.plugin (C:\Users\allegray\koishi-bot\test\...
2022-12-09 13:20:22 [W] app TypeError: Cannot read properties of undefined (reading 'extend')
                            at MetaProvider (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\@koishijs\plugin-status\src\meta.ts:34:15)
                            at MainScope.MainScope.apply (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:255:24)
                            at MainScope.start (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:281:12)
                            at MainScope.restart (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:67:10)
                            at MainScope.setup (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:246:10)
                            at MainScope (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:209:22)
                            at Map.plugin (C:\Users\allegray\koishi-bot\test\koi...
2022-12-09 13:20:22 [W] app TypeError: Cannot read properties of undefined (reading 'tables')
                            at SQLiteDriver (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\@minatojs\driver-sqlite\src\index.ts:94:43)
                            at Object.apply (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\@koishijs\core\src\database.ts:197:20)
                            at MainScope.apply (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:251:36)
                            at ForkScope.start (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:177:32)
                            at ForkScope (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:171:10)
                            at MainScope.fork (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:223:12)
                            at Map.plugin (C:\Users\allegray\koishi-bot\test\koishi...
2022-12-09 13:20:22 [W] app TypeError: Cannot read properties of undefined (reading 'command')
                            at Context.<anonymous> (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\context.ts:73:21)
                            at Object.apply (c:\Users\allegray\koishi-bot\test\koishi-app\plugins\music\src\index.ts:59:7)
                            at MainScope.MainScope.apply (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:251:36)
                            at MainScope.start (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:281:12)
                            at MainScope.restart (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:67:10)
                            at MainScope.setup (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:246:10)
                            at MainScope (C:\Users\allegray\koishi-bot\test\koishi-app\node...
2022-12-09 13:20:22 [E] app TypeError: Cannot read properties of undefined (reading 'define')
                            at Object.apply (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\@koishijs\cli\src\worker\daemon.ts:61:12)
                            at MainScope.MainScope.apply (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:251:36)
                            at MainScope.start (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:281:12)
                            at MainScope.restart (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:67:10)
                            at MainScope.setup (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:246:10)
                            at MainScope (C:\Users\allegray\koishi-bot\test\koishi-app\node_modules\cordis\src\scope.ts:209:22)
                            at Map.plugin (C:\Users\allegray\koishi-bot\test\kois...
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

换成bvid插件也是一样的错。
但是换成novelai插件的话就一切正常,换成novelai插件我第3步改成了执行git clone https://github.com/koishijs/novelai-bot plugins/novelai

目前关于「二次开发」部分存在流程问题

  1. Windows 上无法使用 exec 执行 git(待修复)
  2. Koishi 等项目在 clone 和 yarn 后仍需要 build 才能让类型正确(需要在流程上说明)
  3. Yakumo build 不会写入 bin 相关文件(待确认)

Feature: 优化官网首页最后一节的布局

Describe the problem related to the feature request

image

现在的布局勉强能放下,但空间有点紧张

Describe the solution you'd like

把「平台」部分移动到右侧;手机上尝试实现能够左右滑动

Describe alternatives you've considered

把「平台」作为单独的一页,右侧摆放类似 Satori 主页的按钮布局

Additional context

No response

Feature: English Translation

Describe the problem related to the feature request

You have created a wonderful project, but unfortunately is it relatively hard to use and learn for non-Chinese users.

Describe the solution you'd like

Please consider adding at least partial translations of the main parts of the documentation.

Describe alternatives you've considered

No response

Additional context

No response

Documentation Roadmap

目前本仓库对应 https://docs.koishi.chat

Stage 1

  • 实现新主页
  • 修复现有特性
    • code group
    • chat message
    • badge

完成上述事项后将替换为 https://koishi.chat

Stage 2

  • 修复现有的全部 dead links
  • 实现新的插件索引页
  • 配置 Algolia

完成上述事项后将全面取代现有的链接。

希望完善数据库的文档

如题,部分 API 如 execute() 等 API 都不在文档内,一些已经存在在文档内 API 的类型和用法都不完全,希望可以将数据库 API 文档完善一下。

Enhancement: Use Icons Instead of Using Plain Text for Describing Type of Plugins

我们提供了四种插件标识,它们本身也是过滤条件。包括:
- `is:verified`:官方认证 (对钩)
- `is:insecure`:不安全 (叹号)
- `is:preview`:开发中 (扳手)
- `created:>date`:近期新增 (树苗)

Here, various types of plugins are listed with their display styles and icons in the plugin marketplace. However, text-based representation may not be very intuitive. I believe it can be replaced with the same set of icons used in the plugin marketplace.

这里列出了插件市场中各种类型的插件及其显示样式和图标。然而,基于文本的表示可能不是很直观。我相信它可以替换为插件市场中使用的同一组图标。

注明插件对 server 服务的依赖

4.16 起 server 已经不是内置服务了,因此有必要对相关文档进行调整:

  1. 将 server 移除出内置服务的 API 部分,转移到官方插件部分
  2. 依赖 server 的插件应当注明此依赖关系

添加基础使用说明

看了文档之后,我还是没明白这个东西应该怎么用,只知道了可以直接下载一个程序然后运行,在研究一会后发现运行之后好像会开一个40666的端口

有计划在这里(指文档)添加基本的使用说明吗?类似这样的语句:

  • 程序在启动后会启动一个Web服务,可以直接访问它
  • 程序在桌面环境启动后会用浏览器打开管理面板

文档搜索功能没有根据文档语言对搜索结果分类

搜索"declare module 'koishi'"的结果

目前搜索出来的结果是 不同语言的文档混杂在一起的(第一个是de-DE、第二个是ja-JP、第三个是ru-RU......),建议:

  • 根据用户当前所在的文档站点的语言(如中文),只显示中文的结果
  • 或者搜索结果前面加Tab样式的选择器,由用户自己选择要搜索的文档的语言(例如英文)

Bug:配置构型页面异常(?)

故障现象

演练厂:配置构型页面的中核心概念基础类型高级类型中各个页面的描述部分在刷新后会无法显示,在直接用链接访问的情况下也无法显示,但此时其他的页面内容显示正常

在前往其他页面刷新后(如演练厂:配置构型 > 演练场 > 配置构型)再前往核心概念基础类型高级类型中的页面,描述部分会出现,此时如果再刷新,描述部分会无法显示

故障图片

image

故障范围

https://koishi.chat/zh-CN/schema/meta/required.html (及核心概念下的所有页面)
https://koishi.chat/zh-CN/schema/basic/number.html (及基础类型下的所有页面)
https://koishi.chat/zh-CN/schema/advanced/intersect.html (及高级类型下的所有页面)

获取 Dict 的 key

export default Schema.object({
  dict: Schema.dict(Boolean),
  value2: Schema.union([])
})

我想让 dict 的所有 key,作为 value2 的选项。

文档丢失

  • Logger
  • plugin dialogue
  • plugin eval
  • plugin commands
  • database memory

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.