hash-gaming / robotk

Mostly helpful but sometimes trolly
MIT License
2 stars 1 forks source link

fix discuss command #37

Closed YashdalfTheGray closed 6 years ago

YashdalfTheGray commented 6 years ago

The issue

The current way that automod tries to create discussion groups is try to create a group, if it exists already, unarchive it and then add all the members to it. This process depends on Slack returning the full list of private channels to us every time we ask. Apparently there is a case where a channel is created but it won't be returned in the full list of private channels so we get into the issue of not being able to create it and not being able to unarchive it.

The fix

To fix this, I return a message to the user telling them to run the command again with a number at the end so that I can postfix it to the channel name and create an entirely new private channel. It follows the same create, find, unarchive logic that automod does already but for a channel with a slightly different name.

Other fixes