File tree Expand file tree Collapse file tree 2 files changed +88
-9
lines changed Expand file tree Collapse file tree 2 files changed +88
-9
lines changed Original file line number Diff line number Diff line change @@ -55,18 +55,33 @@ Milky 服务监听的路径前缀\
5555}
5656```
5757
58- ### Milky.UseWebSocket
58+ ### Milky.AccessToken
5959
60- - 类型: ` boolean `
61- - 默认值: ` true `
60+ - 类型: ` string `
61+ - 默认值: ` null `
62+
63+ Milky 服务用于验证的 Token\
64+ 设置为 null 关闭验证
65+
66+ ``` json5
67+ {
68+ " Milky" : {
69+ " AccessToken" : null
70+ }
71+ }
72+ ```
73+
74+ ### Milky.WebSocket
75+
76+ - 类型: ` object | null `
77+ - 默认值: ` { } `
6278
63- 是否使用 WebSocket 服务\
64- 为 ` false ` 时将关闭 ws 服务, 无法再通过 ` /event ` 路径获取事件
79+ 设置为 ` null ` 以禁用 WebSocket 服务
6580
6681``` json5
6782{
6883 " Milky" : {
69- " UseWebSocket " : true
84+ " WebSocket " : {}
7085 }
7186}
7287```
@@ -76,7 +91,7 @@ Milky 服务监听的路径前缀\
7691- 类型: ` object | null `
7792- 默认值: ` null `
7893
79- 设置为 null 以禁用 WebHook 服务
94+ 设置为 ` null ` 以禁用 WebHook 服务
8095
8196``` json5
8297{
@@ -100,4 +115,60 @@ WebHook 目标 URL
100115 }
101116 }
102117}
118+ ```
119+
120+ ### Milky.Message.IgnoreBotMessage
121+
122+ - 类型: ` bool `
123+ - 默认值: ` false `
124+
125+ 是否忽略 Bot 自己发送的消息
126+
127+ ``` json5
128+ {
129+ " Milky" : {
130+ " Message" : {
131+ " IgnoreBotMessage" : false
132+ }
133+ }
134+ }
135+ ```
136+
137+ ### Milky.Message.Cache.Policy
138+
139+ - 类型: ` enum `
140+ - 默认值: ` "LRU" `
141+ - 可用值: ` "LRU" ` ` "FIFO" `
142+
143+ 消息缓存所使用的淘汰策略
144+
145+ ``` json5
146+ {
147+ " Milky" : {
148+ " Message" : {
149+ " Cache" : {
150+ " Policy" : " LRU"
151+ }
152+ }
153+ }
154+ }
155+ ```
156+
157+ ### Milky.Message.Cache.Capacity
158+
159+ - 类型: ` number `
160+ - 默认值: ` 1000 `
161+
162+ 消息缓存最大容量
163+
164+ ``` json5
165+ {
166+ " Milky" : {
167+ " Message" : {
168+ " Cache" : {
169+ " Policy" : 1000
170+ }
171+ }
172+ }
173+ }
103174```
Original file line number Diff line number Diff line change 3636 " Host" : " 127.0.0.1" ,
3737 " Port" : 3000 ,
3838 " Prefix" : " /" ,
39- " UseWebSocket" : true ,
40- " WebHook" : null
39+ " AccessToken" : null ,
40+ " WebSocket" : {},
41+ " WebHook" : null ,
42+ " Message" : {
43+ " IgnoreBotMessage" : false ,
44+ " Cache" : {
45+ " Policy" : " LRU" ,
46+ " Capacity" : 1000 ,
47+ },
48+ },
4149 },
4250}
4351
You can’t perform that action at this time.
0 commit comments