File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1414## 命令行参数
1515> ` [] ` 代表是可选参数
1616``` bash
17- nanobot [-Tadhst ] ID1 ID2 ...
18-
17+ nanobot [参数 ] ID1 ID2 ...
18+ 参数:
1919 -D enable debug-level log output
2020 -T int
2121 api timeout (s) (default 60)
@@ -26,6 +26,8 @@ nanobot [-Tadhst] ID1 ID2 ...
2626 -h print this help
2727 -public
2828 only listen to public intent
29+ -qq
30+ also listen QQ intent
2931 -s string
3032 qq secret
3133 -sandbox
Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ func main() {
5757 loadconfig := flag .String ("c" , "" , "load from config" )
5858 sandbox := flag .Bool ("sandbox" , false , "run in sandbox api" )
5959 onlypublic := flag .Bool ("public" , false , "only listen to public intent" )
60+ addqqintent := flag .Bool ("qq" , false , "also listen QQ intent" )
6061 shardindex := flag .Uint ("shardindex" , 0 , "shard index" )
6162 shardcount := flag .Uint ("shardcount" , 0 , "shard count" )
6263 savecfg := flag .String ("save" , "" , "save bot config to filename (eg. config.yaml)" )
@@ -74,6 +75,9 @@ func main() {
7475 if * onlypublic {
7576 intent = nano .IntentGuildPublic
7677 }
78+ if * addqqintent {
79+ intent |= nano .IntentQQ
80+ }
7781
7882 sus := make ([]string , 0 , 16 )
7983 for _ , s := range flag .Args () {
You can’t perform that action at this time.
0 commit comments