This commit is contained in:
shoopea 2020-01-16 22:52:48 +08:00
parent 9c82496757
commit 0bb0fd38b7

6
job.go
View File

@ -1588,12 +1588,12 @@ func jobGWithdraw(j Job) {
ref := hex.EncodeToString(out)
user := bot.ChatByID(fmt.Sprintf("%d", p.UserID64))
stock := make(string, 0)
stock := new(string)
for _, i := range p.Items {
if i.Available > i.Required {
stock = fmt.Sprintf("\n%d x %s", i.Required, i.Name)
stock = fmt.Sprintf("%s\n%d x %s", stock, i.Required, i.Name)
} else {
stock = fmt.Sprintf("\n%d x %s", i.Available, i.Name)
stock = fmt.Sprintf("%s\n%d x %s", stock, i.Available, i.Name)
}
}