mirror of https://github.com/velour/catbase.git
ngate: fix formatting for all platforms
This commit is contained in:
parent
6cacff4513
commit
2cfca47d7d
|
@ -78,7 +78,7 @@ func (p *NewsBid) bidsCmd(r bot.Request) bool {
|
||||||
out := "Bids:\n"
|
out := "Bids:\n"
|
||||||
for _, b := range bids {
|
for _, b := range bids {
|
||||||
hnURL := fmt.Sprintf("https://news.ycombinator.com/item?id=%d", b.HNID)
|
hnURL := fmt.Sprintf("https://news.ycombinator.com/item?id=%d", b.HNID)
|
||||||
out += fmt.Sprintf("• %s bid %s <%s|%s> (<%s|Comments>)\n", b.User, b.BidStr, b.URL, b.Title, hnURL)
|
out += fmt.Sprintf("• %s bid %s on %s (%s)\n", b.User, b.BidStr, b.Title, hnURL)
|
||||||
}
|
}
|
||||||
p.bot.Send(r.Conn, bot.Message, ch, out)
|
p.bot.Send(r.Conn, bot.Message, ch, out)
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -36,9 +36,9 @@ func (is Items) Titles() string {
|
||||||
for _, v := range is {
|
for _, v := range is {
|
||||||
hnURL := fmt.Sprintf("https://news.ycombinator.com/item?id=%d", v.ID)
|
hnURL := fmt.Sprintf("https://news.ycombinator.com/item?id=%d", v.ID)
|
||||||
if v.URL == "" {
|
if v.URL == "" {
|
||||||
out += fmt.Sprintf("• %s %s (<%s|Comments>)\n", v.Bid, v.Title, hnURL)
|
out += fmt.Sprintf("• %s %s (%s)\n", v.Bid, v.Title, hnURL)
|
||||||
} else {
|
} else {
|
||||||
out += fmt.Sprintf("• %s <%s|%s> (<%s|Comments>)\n", v.Bid, v.URL, v.Title, hnURL)
|
out += fmt.Sprintf("• %s %s (%s)\n", v.Bid, v.Title, hnURL)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return out
|
return out
|
||||||
|
|
Loading…
Reference in New Issue