I'm assuming you just want to be able to have the bot message all channels. If that's not the case, let me know and I'll edit the answer.
I recommend taking a look at the Teams - Start New Thread in Channel
Sample.
Basically, you need to have the bot get a list of Channels:
public class MyBot : TeamsActivityHandler
{
protected override async Task OnMessageActivityAsync(ITurnContext<IMessageActivity> turnContext, CancellationToken cancellationToken)
{
IEnumerable<ChannelInfo> channels = await TeamsInfo.GetTeamChannelsAsync(turnContext, turnContext.Activity.TeamsGetTeamInfo().Id, cancellationToken);
await turnContext.SendActivityAsync($"The channel count is: {channels.Count()}");
}
}
And then you can send a Proactive Message to the channel by creating the conversation and then continuing it:
var conversationParameters = new ConversationParameters
{
IsGroup = true,
ChannelData = new { channel = new { id = teamsChannelId } },
Activity = (Activity)message,
};
ConversationReference conversationReference = null;
await ((BotFrameworkAdapter)turnContext.Adapter).CreateConversationAsync(
teamsChannelId,
serviceUrl,
credentials,
conversationParameters,
(t, ct) =>
{
conversationReference = t.Activity.GetConversationReference();
return Task.CompletedTask;
},
cancellationToken);
await ((BotFrameworkAdapter)turnContext.Adapter).ContinueConversationAsync(
_appId,
conversationReference,
async (t, ct) =>
{
await t.SendActivityAsync(MessageFactory.Text("This will be the first response to the new thread"), ct);
},
cancellationToken);
}