Nicolai
Nicolai

Reputation: 2915

How do I figure out which channels my bot is in?

Using MS Bot Framework, how do I figure out which channels my bot is in, on slack?

Is it possible, without doing something slack specific?

I have tried doing something with the message type BotAddedToConversation but without any luck.

Basically, I would like to write to a channel, without having a message to reply to.

Upvotes: 0

Views: 289

Answers (1)

Etienne Margraff
Etienne Margraff

Reputation: 711

In the Message object that you get in the Post function of your Api, the ChannelConversationId property contains the Channel.

public async Task<Message> Post([FromBody]Message message)
{
    if (message.Type == "Message")
    {
        var channel = message.ChannelConversationId;
        [...]
    }
}

Upvotes: 1

Related Questions