test
This commit is contained in:
parent
9e662d2f34
commit
d9831c360f
9
rules.go
9
rules.go
@ -63,6 +63,15 @@ func resetMsgParsingRules() error {
|
|||||||
SenderUserID64: 0,
|
SenderUserID64: 0,
|
||||||
}
|
}
|
||||||
rules2 = append(rules2, r)
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -517,6 +517,15 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
|
|||||||
ParseMode: cmdParseModeHTML,
|
ParseMode: cmdParseModeHTML,
|
||||||
}
|
}
|
||||||
TGCmdQueue <- c
|
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:
|
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)
|
//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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user