-
-
Save jfchevrette/dd34b16b87db72f4f591a4c66896dbb0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"github.com/go-joe/joe" | |
"github.com/go-joe/slack-adapter" | |
) | |
type SlackBot struct { | |
*joe.Bot | |
joe.Module | |
} | |
func main() { | |
b := &SlackBot{ | |
Bot: joe.New("testbot", slack.Adapter("TOKEN")), | |
} | |
b.Respond("test", b.Test) | |
err := b.Run() | |
if err != nil { | |
b.Logger.Fatal(err.Error()) | |
} | |
} | |
func (b *SlackBot) Test(msg joe.Message) error { | |
msg.Respond("test") | |
return nil | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment