Skip to content

Commit

Permalink
✨ parameter -qq
Browse files Browse the repository at this point in the history
  • Loading branch information
fumiama committed Nov 20, 2023
1 parent 0910dc6 commit 2130ac1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
## 命令行参数
> `[]`代表是可选参数
```bash
nanobot [-Tadhst] ID1 ID2 ...

nanobot [参数] ID1 ID2 ...
参数:
-D enable debug-level log output
-T int
api timeout (s) (default 60)
Expand All @@ -26,6 +26,8 @@ nanobot [-Tadhst] ID1 ID2 ...
-h print this help
-public
only listen to public intent
-qq
also listen QQ intent
-s string
qq secret
-sandbox
Expand Down
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ func main() {
loadconfig := flag.String("c", "", "load from config")
sandbox := flag.Bool("sandbox", false, "run in sandbox api")
onlypublic := flag.Bool("public", false, "only listen to public intent")
addqqintent := flag.Bool("qq", false, "also listen QQ intent")
shardindex := flag.Uint("shardindex", 0, "shard index")
shardcount := flag.Uint("shardcount", 0, "shard count")
savecfg := flag.String("save", "", "save bot config to filename (eg. config.yaml)")
Expand All @@ -74,6 +75,9 @@ func main() {
if *onlypublic {
intent = nano.IntentGuildPublic
}
if *addqqintent {
intent |= nano.IntentQQ
}

sus := make([]string, 0, 16)
for _, s := range flag.Args() {
Expand Down

0 comments on commit 2130ac1

Please sign in to comment.