Documentation ¶
Index ¶
- type SlackClient
- func (s *SlackClient) AddReaction(emoji, messageRef string) error
- func (s *SlackClient) DeleteMessage(channel, timestamp string) error
- func (s *SlackClient) EditMessage(channel, timestamp, message string) error
- func (s *SlackClient) GetConversationHistory(channel string) ([]slack.Message, error)
- func (s *SlackClient) PostMessage(channel, message string) (string, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SlackClient ¶
type SlackClient struct {
// contains filtered or unexported fields
}
the package defines a struct SlackClient that holds the slack API client, and it also defines three methods PostMessage, GetConversationHistory, and AddReaction that can be used to interact with Slack.
SlackClient is a struct that holds the slack API client
func NewSlackClient ¶
func NewSlackClient(token string) *SlackClient
NewSlackClient creates and returns a new SlackClient
func (*SlackClient) AddReaction ¶
func (s *SlackClient) AddReaction(emoji, messageRef string) error
AddReaction adds a reaction to a message
func (*SlackClient) DeleteMessage ¶
func (s *SlackClient) DeleteMessage(channel, timestamp string) error
DeleteMessage delete a message in a channel
func (*SlackClient) EditMessage ¶
func (s *SlackClient) EditMessage(channel, timestamp, message string) error
EditMessage edit a message in a channel
func (*SlackClient) GetConversationHistory ¶
func (s *SlackClient) GetConversationHistory(channel string) ([]slack.Message, error)
GetConversationHistory returns the conversation history of a channel
func (*SlackClient) PostMessage ¶
func (s *SlackClient) PostMessage(channel, message string) (string, string, error)
PostMessage sends a message to a channel
Click to show internal directories.
Click to hide internal directories.