Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
Koishi Nestjs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3rdeye
Koishi Nestjs
Commits
20671505
Commit
20671505
authored
Feb 09, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
readme
parent
7c5cd4aa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
README.md
README.md
+8
-0
No files found.
README.md
View file @
20671505
...
@@ -96,6 +96,8 @@ koishi-nestjs 的配置项和 [Koishi 配置项](https://koishi.js.org/api/core/
...
@@ -96,6 +96,8 @@ koishi-nestjs 的配置项和 [Koishi 配置项](https://koishi.js.org/api/core/
-
`useWs`
:
`boolean`
默认
`false`
。是否启用 WebSocket 网关。
**异步配置该项应写入异步配置项中。**
-
`useWs`
:
`boolean`
默认
`false`
。是否启用 WebSocket 网关。
**异步配置该项应写入异步配置项中。**
-
`actionErrorMessage`
:
`string`
指令中发生未知错误时,机器人返回的信息。默认
`Internal Server Error`
。
#### 不支持的配置项
#### 不支持的配置项
由于 koishi-nestjs 复用了 Nest.js 实例的 HttpServer 对象,因此下列关于 HttpServer 监听的选项将不受支持:
由于 koishi-nestjs 复用了 Nest.js 实例的 HttpServer 对象,因此下列关于 HttpServer 监听的选项将不受支持:
...
@@ -265,6 +267,12 @@ function getContextProvideToken(scopeType?: ContextScopeTypes, values: string[]
...
@@ -265,6 +267,12 @@ function getContextProvideToken(scopeType?: ContextScopeTypes, values: string[]
装饰器定义与 koishi-thirdeye 中一致,请参阅
[
相关文档
](
https://koishi.js.org/guide/misc/decorators.html#注册事件
)
。
装饰器定义与 koishi-thirdeye 中一致,请参阅
[
相关文档
](
https://koishi.js.org/guide/misc/decorators.html#注册事件
)
。
### 错误处理
在 koishi-nestjs 的指令处理中,若抛出 Nest.js 中的
`HttpException`
或
`WsException`
的异常时,系统将会以其中的返回信息作为机器人发送给用户的错误信息。
若遇到未知的错误,机器人则会返回给用户预设的错误信息。这一错误信息可以使用
`actionErrorMessage`
设置。
## 使用服务
## 使用服务
您也可以在 Nest.js 的提供者类中,注入 Koishi 的服务对象。
您也可以在 Nest.js 的提供者类中,注入 Koishi 的服务对象。
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment