{"id":15898688,"url":"https://github.com/reiniiriarios/archive-bot","last_synced_at":"2026-04-28T11:05:21.938Z","repository":{"id":65850770,"uuid":"597943992","full_name":"reiniiriarios/archive-bot","owner":"reiniiriarios","description":":card_file_box: :robot: Slack bot helper for managing outdated channels.","archived":false,"fork":false,"pushed_at":"2023-04-13T19:48:37.000Z","size":326,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-01T10:39:54.452Z","etag":null,"topics":["bot","slack","slack-api","slack-bot"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/archive_bot","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reiniiriarios.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-06T03:34:40.000Z","updated_at":"2023-03-16T15:38:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"b9457e27-9a92-4d39-955b-38f97969e4bd","html_url":"https://github.com/reiniiriarios/archive-bot","commit_stats":{"total_commits":93,"total_committers":2,"mean_commits":46.5,"dds":"0.021505376344086002","last_synced_commit":"6676915a4f1a888500b9bfa7a5220514e3b2fd39"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/reiniiriarios/archive-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Farchive-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Farchive-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Farchive-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Farchive-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reiniiriarios","download_url":"https://codeload.github.com/reiniiriarios/archive-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reiniiriarios%2Farchive-bot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32377599,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T09:24:15.638Z","status":"ssl_error","status_checked_at":"2026-04-28T09:24:15.071Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bot","slack","slack-api","slack-bot"],"created_at":"2024-10-06T10:07:32.121Z","updated_at":"2026-04-28T11:05:21.920Z","avatar_url":"https://github.com/reiniiriarios.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Archive Bot\n\nSlack bot helper for managing outdated and very small channels. In its current iteration, it runs\nonce and ends, meaning it is meant to be run on a schedule, such as a cron job or a Lambda function.\n\n## Configuration\n\nArchive bot needs a bit of data to get started:\n\n- Slack [Bot Token](https://api.slack.com/authentication/token-types#bot)\n- Notification [Channel ID](https://github.com/reiniiriarios/archive-bot/#finding-slack-channel-id)\n- Filter Prefixes (optional)\n    - The bot will ignore channels with these prefixes.\n- Messages (optional)\n    - Configure messages to send prefixing updates.\n- Staleness (optional)\n    - Configure how long a channel has to go without a message before it's considered \"old.\"\n- Small Channel Threshold (optional)\n    - Configure how small a channel has to be before it's considered \"small.\"\n\n```rust\nlet bot = ArchiveBot {\n  // Bot tokens look like: xoxb-xxxxxxxyourtokenxxxxxxx.\n  token: env::var(\"SLACK_BOT_TOKEN\").expect(\"Error: environment variable SLACK_BOT_TOKEN is not set.\"),\n  // Use the channel ID and not the name.\n  notification_channel_id: env::var(\"SLACK_CHANNEL_ID\").expect(\"Error: environment variable SLACK_CHANNEL_ID is not set.\"),\n  // Ignore channels beginning with these prefixes.\n  filter_prefixes: vec![\"-\"],\n  // Messages to send (one is picked at random).\n  message_headers: vec![\n    \"Hey, you've got some cleaning up to do!\",\n    \"Hey boss, take a look at these, will ya?\",\n  ],\n  // How long before a channel is stale (in seconds).\n  stale_after: 6 * 7 * 24 * 60 * 60,\n  // How small a \"small\" channel is.\n  small_channel_threshold: 3,\n  // Whether to send a secondary notification to a different channel (message only).\n  notify_secondary_channel: true,\n  // The ID of a secondary channel.\n  secondary_notification_channel_id:  env::var(\"SLACK_CHANNEL_2_ID\").expect(\"Error: environment variable SLACK_CHANNEL_2_ID is not set.\"),\n  // The message prefix to send to the secondary channel. Will be suffixed with a link to the primary channel.\n  secondary_message_headers: vec![\n    \"Hey folks! I, uh... made a list for you. Of channels. That you should archive. Maybe.\",\n    \"Hey everyone! If you want the satisfaction of crossing a task off your list, I have one!\",\n  ],\n  ..ArchiveBot::default()\n};\n```\n\nOr, using default values:\n\n```rust\nlet bot = ArchiveBot {\n  token: env::var(\"SLACK_BOT_TOKEN\").expect(\"Error: environment variable SLACK_BOT_TOKEN is not set.\"),\n  notification_channel_id: \"C01A02A03A04\".to_string(),\n  ..ArchiveBot::default()\n};\n```\n\n## Implementation\n\nCurrently this bot consists of a single runtime, with a single action. Further actions and\nconfig options TBD.\n\n```rust\nmatch bot.run().await {\n  Ok(_) =\u003e println!(\"Success!\"),\n  Err(e) =\u003e panic!(\"Uhoh! {:}\", e),\n}\n```\n\nSee the [examples](https://github.com/reiniiriarios/archive-bot/examples/) directory for further implementation details.\n\n## Setting Up Slack\n\nSee Slack documentation for [basic app setup](https://api.slack.com/authentication/basics).\n\nGenerate your Bot User OAuth Token on the [Slack API Admin](https://api.slack.com/apps) \u003e \\[Your App\\] \u003e Features \u003e OAuth \u0026 Permissions.\n\nYour app needs the following scopes:\n\n- `channels:history`\n- `channels:join`\n- `channels:read`\n- `chat:write`\n- `groups:history`\n- `groups:read`\n\n## Logging\n\nArchive Bot implements the [log](https://docs.rs/log/latest/log/) crate and does not produce output directly.\nSee the [examples](#) directory for an implementation of [simplelog](https://github.com/drakulix/simplelog.rs).\n\n## Finding Slack Channel ID\n\nTo find the ID of a Slack channel, you can click the channel name for more info and find it at the bottom.\n\n\u003cimg src=\"docs/find-channel-id.png\" alt=\"Screenshot of Slack channel info with an arrow pointing to the Channel ID at the bottom of the window.\" width=\"500\"\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freiniiriarios%2Farchive-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freiniiriarios%2Farchive-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freiniiriarios%2Farchive-bot/lists"}