From 75c04eafaab9ff60663e74af72aa9b4450df46bc Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Fri, 7 Oct 2016 00:28:13 +0800 Subject: [PATCH] support markdown format. Signed-off-by: Bo-Yi Wu --- plugin.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugin.go b/plugin.go index fafaa0a..18dd9c9 100644 --- a/plugin.go +++ b/plugin.go @@ -108,7 +108,13 @@ func (p Plugin) Exec() error { for _, user := range ids { for _, value := range trimElement(message) { msg := tgbotapi.NewMessage(user, value) - bot.Send(msg) + msg.ParseMode = "markdown" + + _, err := bot.Send(msg) + + if err != nil { + log.Println(err.Error()) + } } }