Skip to content

Commit

Permalink
Add conversations.list command to replace im.list
Browse files Browse the repository at this point in the history
  • Loading branch information
cixtor committed Dec 6, 2020
1 parent b7bb93a commit fb4fafe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions funs.go
Expand Up @@ -129,6 +129,11 @@ func (cli *CLI) CallConversationsArchive() int {
return cli.PrintJSON(cli.api.ConversationsArchive(flag.Arg(1)))
}

// CallConversationsList sends a http request with the conversations.list action.
func (cli *CLI) CallConversationsList() int {
return cli.PrintJSON(cli.api.ConversationsList(slackapi.ConversationsListInput{}))
}

// CallConversationsMark sends a http request with the conversations.mark action.
func (cli *CLI) CallConversationsMark() int {
return cli.PrintJSON(cli.api.ConversationsMark(slackapi.ConversationsMarkInput{
Expand Down
1 change: 1 addition & 0 deletions main.go
Expand Up @@ -26,6 +26,7 @@ func main() {
cli.Register(cli.CallChatRobotMessage, "chat.robotMessage", []string{"channel", "text"}, "Sends a message to a channel as a robot")
cli.Register(cli.CallChatUpdate, "chat.update", []string{"channel", "time", "text"}, "Updates a message")
cli.Register(cli.CallConversationsArchive, "conversations.archive", []string{"room"}, "Archives a conversation")
cli.Register(cli.CallConversationsList, "conversations.list", []string{}, "Lists all channels in a Slack team")
cli.Register(cli.CallConversationsMark, "conversations.mark", []string{"room", "time"}, "Sets the read cursor in a channel")
cli.Register(cli.CallConversationsRename, "conversations.rename", []string{"room", "name"}, "Renames a conversation")
cli.Register(cli.CallConversationsSetPurpose, "conversations.setPurpose", []string{"room", "purpose"}, "Sets the purpose for a conversation")
Expand Down

0 comments on commit fb4fafe

Please sign in to comment.