New Slack Library
This commit is contained in:
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
aoc "git.bullercodeworks.com/brian/go-adventofcode"
|
||||
"git.bullercodeworks.com/brian/helperbot"
|
||||
"github.com/nlopes/slack"
|
||||
"github.com/slack-go/slack"
|
||||
)
|
||||
|
||||
/* Plugin State */
|
||||
|
@@ -4,11 +4,12 @@ import (
|
||||
"C"
|
||||
)
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"git.bullercodeworks.com/brian/helperbot"
|
||||
"github.com/nlopes/slack"
|
||||
"github.com/slack-go/slack"
|
||||
)
|
||||
|
||||
type StatsState struct {
|
||||
@@ -26,6 +27,7 @@ func (s *StatsState) Initialize(m helperbot.Model) error {
|
||||
}
|
||||
|
||||
func (s *StatsState) ProcessMessage(m helperbot.Message) {
|
||||
fmt.Printf("Processing Message: %s\n", m.GetMessage().Text)
|
||||
if m.GetSource() == "slack" {
|
||||
slackMsg := m.GetMessage()
|
||||
if len(slackMsg.Channel) == 0 {
|
||||
|
Reference in New Issue
Block a user