Archive Bot
Slack bot helper for managing outdated and very small channels. In its current iteration, it runs once and ends, meaning it is meant to be run on a schedule, such as a cron job or a Lambda function.
Configuration
Archive bot needs a bit of data to get started:
- Slack Bot Token
- Notification Channel ID
- Filter Prefixes (optional)
- The bot will ignore channels with these prefixes.
- Messages (optional)
- Configure messages to send prefixing updates.
- Staleness (optional)
- Configure how long a channel has to go without a message before it's considered "old."
- Small Channel Threshold (optional)
- Configure how small a channel has to be before it's considered "small."
let bot = ArchiveBot ;
Or, using default values:
let bot = ArchiveBot ;
Implementation
Currently this bot consists of a single runtime, with a single action. Further actions and config options TBD.
match bot.run.await
See the examples directory for further implementation details.
Setting Up Slack
See Slack documentation for basic app setup.
Generate your Bot User OAuth Token on the Slack API Admin > [Your App] > Features > OAuth & Permissions.
Your app needs the following scopes:
channels:history
channels:join
channels:read
chat:write
groups:history
groups:read
Logging
Archive Bot implements the log crate and does not produce output directly. See the examples directory for an implementation of simplelog.
Finding Slack Channel ID
To find the ID of a Slack channel, you can click the channel name for more info and find it at the bottom.