update rules

This commit is contained in:
shoopea 2020-01-14 15:16:31 +08:00
parent bc51deb3f3
commit b42bf961ef
2 changed files with 30 additions and 0 deletions

View File

@ -14,6 +14,16 @@
"name": "Unknown",
"obj_type": "msg"
},
{
"intl_id": "msg_guild_main",
"name": "Guild main chat",
"obj_type": "msg"
},
{
"intl_id": "msg_guild_deposit",
"name": "Guild deposit chat",
"obj_type": "msg"
},
{
"intl_id": "msg_war",
"name": "War report",

View File

@ -19,6 +19,26 @@ func resetMsgParsingRules() error {
err = json.Unmarshal(b, &rules)
r := MessageParsingRule{
Priority: 1,
Description: "Default Main chat",
Rule: "(?s:.*)",
MsgType: cacheObjSubType[`msg_guild_main`],
ChatID64: cfg.Bot.Mainchat,
SenderUserID64: 0,
}
rules2 = append(rules2, r)
r := MessageParsingRule{
Priority: 1,
Description: "Default Deposit chat",
Rule: "(?s:.*)",
MsgType: cacheObjSubType[`msg_guild_deposit`],
ChatID64: cfg.Bot.Depositchat,
SenderUserID64: 0,
}
rules2 = append(rules2, r)
for _, r := range rules {
r2 := MessageParsingRule{
Priority: r.Priority,