helperbot/cmd/message.go

22 lines
562 B
Go
Raw Normal View History

2019-11-13 00:45:56 +00:00
package main
import slack "git.bullercodeworks.com/brian/go-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 }