Fix tl;dr formatting

Remove extra space before `:`.
Make topics bold.
Add a blank line between topics.
Remove leading tabs.
This commit is contained in:
Ethan Burns 2019-03-26 19:31:09 -04:00 committed by GitHub
parent c984239c96
commit efcf8a7c34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -101,10 +101,11 @@ func (p *TLDRPlugin) message(kind bot.Kind, message msg.Message, args ...interfa
bestTopic = vocab[word]
}
}
response += fmt.Sprintf("Topic #%d : %s\n", topic, bestTopic)
response += fmt.Sprintf("\n*Topic #%d: %s*\n", topic, bestTopic)
for i := range bestDocs[topic] {
response += fmt.Sprintf("\t<%s>%s [%f]\n", bestDocs[topic][i].user, bestDocs[topic][i].body, bestScores[topic][i])
response += fmt.Sprintf("<%s>%s [%f]\n", bestDocs[topic][i].user, bestDocs[topic][i].body, bestScores[topic][i])
}
}
p.bot.Send(bot.Message, message.Channel, response)