Skip to content

Commit

Permalink
fix grant syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Sora233 committed Oct 19, 2022
1 parent 8c2f59e commit 3c11e39
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion UPDATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## DDBOT最近更新日志

- 2022-10-19 v1.0.9.1
- 2022-10-19 v1.0.9.2
- 修复grant命令
- 2022-10-02 v1.0.9
- 通用:
Expand Down
4 changes: 2 additions & 2 deletions lsp/groupCommand.go
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,8 @@ func (lgc *LspGroupCommand) GrantCommand() {
defer func() { log.Infof("%v command end", lgc.CommandName()) }()

var grantCmd struct {
Command string `optional:"" short:"c" xor:"1" help:"命令名"`
Role string `optional:"" short:"r" xor:"1" default:"" enum:"Admin,GroupAdmin," help:"Admin / GroupAdmin"`
Command string `required:"" short:"c" xor:"1" help:"命令名"`
Role string `required:"" short:"r" xor:"1" enum:"Admin,GroupAdmin" help:"Admin / GroupAdmin"`
Delete bool `short:"d" help:"删除模式,执行删除权限操作"`
Target int64 `arg:"" help:"目标qq号"`
}
Expand Down
4 changes: 2 additions & 2 deletions lsp/privateCommand.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,8 @@ func (c *LspPrivateCommand) GrantCommand() {

var grantCmd struct {
Group int64 `optional:"" short:"g" help:"要操作的QQ群号码"`
Command string `optional:"" short:"c" xor:"1" help:"命令名"`
Role string `optional:"" short:"r" xor:"1" default:"" enum:"Admin,GroupAdmin," help:"Admin / GroupAdmin"`
Command string `required:"" short:"c" xor:"1" help:"命令名"`
Role string `required:"" short:"r" xor:"1" enum:"Admin,GroupAdmin" help:"Admin / GroupAdmin"`
Delete bool `short:"d" help:"删除模式,执行删除权限操作"`
Target int64 `arg:"" help:"目标qq号"`
}
Expand Down

0 comments on commit 3c11e39

Please sign in to comment.