This commit is contained in:
shoopea 2020-01-26 19:06:28 +08:00
parent 9e662d2f34
commit d9831c360f
2 changed files with 18 additions and 0 deletions

View File

@ -63,6 +63,15 @@ func resetMsgParsingRules() error {
SenderUserID64: 0,
}
rules2 = append(rules2, r)
r = MessageParsingRule{
Priority: 9998,
Description: fmt.Sprintf("Specific item craft %s", o.Code),
Rule: fmt.Sprintf("^%s$", o.Craft.Command),
MsgTypeID64: cacheObjSubType[`msg_bot_craft_item`],
ChatID64: cfg.Bot.Admin,
SenderUserID64: cfg.Bot.Admin,
}
rules2 = append(rules2, r)
}
}

View File

@ -517,6 +517,15 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
ParseMode: cmdParseModeHTML,
}
TGCmdQueue <- c
case cacheObjSubType[`msg_bot_craft_all`]:
c := TGCommand{
Type: commandReplyMsg,
Text: `Not implemented yet`,
FromMsgID64: m.ID64,
FromChatID64: m.ChatID64,
ParseMode: cmdParseModeHTML,
}
TGCmdQueue <- c
default:
//log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Unknwon message type in rule %d : %d (%d)\n%s\n", msgParsingRules[i].ID, msgParsingRules[i].MsgTypeID64, objId, m.Text)
}