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
d95e6324
Commit
d95e6324
authored
Jan 05, 2022
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CommandUsage
parent
6953df0b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
README.md
README.md
+5
-1
src/utility/koishi.decorators.ts
src/utility/koishi.decorators.ts
+1
-1
No files found.
README.md
View file @
d95e6324
...
...
@@ -311,7 +311,7 @@ Koishi-Nest 使用一组装饰器进行描述指令的行为。这些装饰器
*
`@CommandDescription(text: string)`
指令描述。等价于
`ctx.command(def, desc)`
中的描述。
*
`@CommandUsage(text:
string
)`
指令介绍。等价于
`cmd.usage(text)`
。
*
`@CommandUsage(text:
Command.Usage
)`
指令介绍。等价于
`cmd.usage(text)`
。
*
`@CommandExample(text: string)`
指令示例。等价于
`cmd.example(text)`
。
...
...
@@ -555,6 +555,10 @@ export class AppModule {}
## 更新历史
### 4.2.1
*
调整了
`@CommandUsage`
的类型。
### 4.2.0
*
适配新版 Koishi 。
...
...
src/utility/koishi.decorators.ts
View file @
d95e6324
...
...
@@ -220,7 +220,7 @@ export const CommandShortcut = (
config
:
Command
.
Shortcut
=
{},
)
=>
CommandDef
((
cmd
)
=>
cmd
.
shortcut
(
name
,
config
));
export
const
CommandUsage
=
(
text
:
string
)
=>
export
const
CommandUsage
=
(
text
:
Command
.
Usage
)
=>
CommandDef
((
cmd
)
=>
cmd
.
usage
(
text
));
export
const
CommandExample
=
(
text
:
string
)
=>
...
...
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