azohra / SlackDB

A key/value database courtesy of Slack 🙃
MIT License
13 stars 0 forks source link

Automate adding the bot user to new/included channels #1

Open dishonesthips opened 5 years ago

dishonesthips commented 5 years ago

Bots can't invite themselves to channels 😞. We should use the user_token to invite the bot user to new/included channels so that it doesn't need to be done manually.

dishonesthips commented 5 years ago

Slack's Conversations API allows us to invite users to channels given their ID. Unfortunately, the API doesn't make it easy to retrieve bot IDs. We'll need to paginate through the users.list endpoint and look for the bot user.

In fact, this process could happen on startup and then be loaded into the GenServer state

dishonesthips commented 4 years ago

discovered: the auth.test endpoint to allow a bot to get its own id

This means we dont have to paginate through all users to get the id