helperbot/cmd/helpers.go

15 lines
201 B
Go
Raw Normal View History

2019-11-13 00:45:56 +00:00
package main
import (
"encoding/json"
2019-11-21 23:45:04 +00:00
"github.com/nlopes/slack"
2019-11-13 00:45:56 +00:00
)
func GetMessageJson(msg *slack.Message) string {
if mb, me := json.Marshal(msg); me == nil {
return string(mb)
}
return ""
}