New Slack Library

This commit is contained in:
2023-11-29 17:54:12 -06:00
parent 09a662a8cd
commit 29ff2c7daf
12 changed files with 80 additions and 103 deletions

View File

@@ -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 */

View File

@@ -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 {