update config

This commit is contained in:
shoopea 2020-02-10 12:18:40 +08:00
parent 77dc965ff8
commit a23c2c341e

10
bot.go
View File

@ -892,9 +892,17 @@ func botCraftItem(m *ChatWarsMessage, r *regexp.Regexp) {
} }
func botUserConfig(m *ChatWarsMessage) { func botUserConfig(m *ChatWarsMessage) {
clt, _ := getLockedClient(m.TGUserID64, false)
clt.Mux.Unlock()
out := fmt.Printf("Config:\n")
if clt.Config.InterceptPillage {
out = fmt.Printf("%s Pillage : ON (<a href=\"https://t.me/share/url?url=/config_pillage_off\">set off</a>)\n", out)
} else {
out = fmt.Printf("%s Pillage : OFF (<a href=\"https://t.me/share/url?url=/config_pillage_on\">set on</a>)\n", out)
}
c := TGCommand{ c := TGCommand{
Type: commandReplyMsg, Type: commandReplyMsg,
Text: "Config:", Text: out,
FromMsgID64: m.ID64, FromMsgID64: m.ID64,
FromChatID64: m.ChatID64, FromChatID64: m.ChatID64,
} }