From 56144bc3aa3f982e6ba2ad2faa21b9753a8fb261 Mon Sep 17 00:00:00 2001 From: shoopea Date: Tue, 16 Jun 2020 19:04:45 +0200 Subject: [PATCH] test --- bot.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/bot.go b/bot.go index 4ba20f9..5b6924e 100644 --- a/bot.go +++ b/bot.go @@ -938,6 +938,30 @@ func botUserConfig(m *ChatWarsMessage) { } else { out = fmt.Sprintf("%s Wartime : DEFEND GUILD (set to castle)\n", out) } + + if clt.Config.AutoDeposit { + out = fmt.Sprintf("%s Deposit : ON (set off)\n", out) + if len(clt.Config.AutoDepositItems) == 0 { + out = fmt.Sprintf("%s Add individual items\n", out) + } else { + out = fmt.Sprintf("%s Individual items\n", out) + for _, v := range clt.Config.AutoDepositItems { + o, err := getObjItem(cacheObjItem[v]) + logOnError(err, "botUserConfig : getObjItem") + out = fmt.Sprintf("%s %s(remove)\n", out, o.Names[0], o.Code) + } + } + if len(clt.Config.AutoDepositTypes) == 0 { + out = fmt.Sprintf("%s Add item types\n", out) + } else { + out = fmt.Sprintf("%s Item types\n", out) + for _, v := range clt.Config.AutoDepositItems { + out = fmt.Sprintf("%s %s(remove)\n", out, v, v) + } + } + } else { + out = fmt.Sprintf("%s Deposit : OFF (set on)\n", out) + } c := TGCommand{ Type: commandReplyMsg, Text: out,