fix shops

This commit is contained in:
shoopea 2020-02-11 10:27:17 +08:00
parent 7e59d0d571
commit df8625154a

8
job.go
View File

@ -2249,7 +2249,11 @@ func jobShops(j Job) {
logOnError(err, "jobShops : parseSubTypeMessageShopMainAck")
if cwm.Guru != guru {
guru = cwm.Guru
out = fmt.Sprintf("%s - %s\n", out, guru)
if len(guru) == 0 {
out = fmt.Sprintf("%s - Not a guru\n", out)
} else {
out = fmt.Sprintf("%s - %s\n", out, guru)
}
}
if cwm.Open {
out = fmt.Sprintf("%s ✔️", out)
@ -2261,8 +2265,8 @@ func jobShops(j Job) {
for _, s := range cfg.Bot.Shops {
if s.Link == cwm.Link {
out = fmt.Sprintf("%s@%s", out, s.Username)
break
}
break
}
out = fmt.Sprintf("%s [%d💧]", out, cwm.Mana)
out = fmt.Sprintf("%s Visit <a href=\"https://t.me/share/url?url=/ws_%s\">%s</a>", out, cwm.Link, cwm.User)