Example #1
0
func changedPresence(slackApi gobot.SlackApi, presenceChange gobot.PresenceChange) {
	user, err := slackApi.GetUser(presenceChange.User)
	if err == nil {
		fmt.Println(user.Name + " changed status to " + presenceChange.Presence)
	}
}
Example #2
0
func echoMessage(slackApi gobot.SlackApi, message gobot.Message) {
	slackApi.PostMessage(message.Channel, message.Text)
}