I got a bot which may:
Question:
How can I know it's a DM channel or a normal channel?
I guess https://api.slack.com/methods/channels.info might help, but I'm not sure which property indicates it.
Your best approach is to use the conversations.info
API method. It will tell you exactly what kind of channel it is. It actually replaces the older channels.info
method (which only works for public channels anyways).
Among other you get:
"is_channel": true
"is_group": false
"is_im": false
Here is how those terms are used in the API and (mostly) in the documentation:
Alternatively you can also guess the channel type based on the first letter of it's ID. That is not 100% though, because channels can be converted from one type to another while keeping their ID.