helperbot/cmd/message.go

22 lines
541 B
Go

package main
import "github.com/nlopes/slack"
// This message type is for communications over the messages channel
type BotMessage struct {
source string
dest string
message slack.Message
}
func NewBotMessage(src, dst string, msg slack.Message) BotMessage {
return BotMessage{
source: src,
dest: dst,
message: msg,
}
}
func (m BotMessage) GetSource() string { return m.source }
func (m BotMessage) GetDestination() string { return m.dest }
func (m BotMessage) GetMessage() slack.Message { return m.message }