I am using simple template of slack bot RTM API, that is given at https://github.com/slackapi/node-slack-sdk
var RtmClient = require('@slack/client').RtmClient;
var CLIENT_EVENTS = require('@slack/client').CLIENT_EVENTS;
var bot_token = process.env.SLACK_BOT_TOKEN || '';
var rtm = new RtmClient(bot_token);
The question is how to fetch the channels name?
I found that I should use channel.list which is compatible with WEB API.
But how to call WEB API when I am using RTM API? And, in general, why all these so overcomplicated?
How about following sample? Please import your access token, when you use this.
Sample :
Result :
If I misunderstand your question, I'm sorry.