{"id":17305228,"url":"https://github.com/minndevelopment/strumbot-rs","last_synced_at":"2025-04-14T13:22:24.460Z","repository":{"id":40237971,"uuid":"499576774","full_name":"MinnDevelopment/strumbot-rs","owner":"MinnDevelopment","description":"A Twitch Stream Notification Bot written in Rust","archived":false,"fork":false,"pushed_at":"2024-02-17T20:09:15.000Z","size":1809,"stargazers_count":6,"open_issues_count":6,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-28T02:38:07.347Z","etag":null,"topics":["discord","docker","rust","rust-lang","tokio-rs","twilight-rs","twitch"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MinnDevelopment.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":"minndevelopment"}},"created_at":"2022-06-03T16:21:41.000Z","updated_at":"2024-08-02T14:55:35.000Z","dependencies_parsed_at":"2024-02-17T21:25:53.085Z","dependency_job_id":"6d4f98e9-678c-48c8-aa72-d9f9e588016c","html_url":"https://github.com/MinnDevelopment/strumbot-rs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinnDevelopment%2Fstrumbot-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinnDevelopment%2Fstrumbot-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinnDevelopment%2Fstrumbot-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MinnDevelopment%2Fstrumbot-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MinnDevelopment","download_url":"https://codeload.github.com/MinnDevelopment/strumbot-rs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886549,"owners_count":21177689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["discord","docker","rust","rust-lang","tokio-rs","twilight-rs","twitch"],"created_at":"2024-10-15T11:55:02.612Z","updated_at":"2025-04-14T13:22:24.433Z","avatar_url":"https://github.com/MinnDevelopment.png","language":"Rust","funding_links":["https://github.com/sponsors/minndevelopment"],"categories":[],"sub_categories":[],"readme":"[live-event]: https://raw.githubusercontent.com/MinnDevelopment/strumbot-rs/master/assets/live-event.png\n[update-event]: https://raw.githubusercontent.com/MinnDevelopment/strumbot-rs/master/assets/update-event.png\n[vod-event]: https://raw.githubusercontent.com/MinnDevelopment/strumbot-rs/master/assets/vod-event.png\n[rank-joining]: https://raw.githubusercontent.com/MinnDevelopment/strumbot-rs/master/assets/rank-joining.gif\n[example-config]: https://github.com/MinnDevelopment/strumbot-rs/blob/master/example-config.json\n\n# strumbot-rs\n\n[![tests](https://github.com/MinnDevelopment/strumbot-rs/actions/workflows/tests.yml/badge.svg)](https://github.com/MinnDevelopment/strumbot-rs/actions/workflows/tests.yml)\n[ ![docker-pulls](https://img.shields.io/docker/pulls/minnced/strumbot-rs?logo=docker\u0026logoColor=white) ](https://hub.docker.com/r/minnced/strumbot-rs)\n[ ![](https://img.shields.io/docker/image-size/minnced/strumbot-rs?logo=docker\u0026logoColor=white\u0026sort=semver) ](https://hub.docker.com/r/minnced/strumbot-rs/tags?page=1\u0026ordering=last_updated)\n[ ![Publish Artifacts](https://github.com/MinnDevelopment/strumbot-rs/actions/workflows/artifact.yml/badge.svg) ](https://github.com/MinnDevelopment/strumbot-rs/actions/workflows/artifact.yml)\n\nA Twitch Stream Notification Bot. This will send notifications to a webhook in your Discord server when the subscribed streamer goes live or changes their game.\n\n## Configurations\n\nThe configuration file must be called `config.json` and has to be in the working directory. An example configuration can be found in [`example-config.json`][example-config].\n\n### Discord\n\nThis section of the configuration contains settings for the discord side of the bot such as role names and webhook URLs.\nNote that the bot uses global role cache, independent of servers, and it is recommended to only have the bot account in one server.\n\nAnything that provides a default or described as optional, can be omitted.\n\n- `server_id` Optional target server id where the bot operates (if it is participant in more than one server at a time)\n- `token` The discord bot token\n- `stream_notifications` The webhook URL to send stream updates to\n- `role_name` Optional configuration of `type`-\u003e`role` to change the default names of the update roles (empty value `\"\"` disables the role, and removes the role mention from notifications)\n- `enabled_events` Array of events to publish to the `stream_notifications` webhook\n- `show_notify_hints` Whether to show a hint in the embed footer about the `/notify` command (default: true)\n- `avatar_url` Custom URL for the image to use as the webhook avatar (must be `png`/`jpeg`/`gif`/`webp`, or null)\n- `enable_command` Wether the `/notify` command should be enabled (default: true)\n\nThe roles used for updates can be managed by the bot with the `/notify role: \u003ctype\u003e` command.\nThis command will automatically assign the role to the user.\n\nFor example, with the configuration `\"live\": \"stream is live\"` the bot will accept the command `/notify role: live` and assign/remove the role `stream is live` for the user.\nThese commands are *ephemeral*, which means they only show up to the user who invokes them. This way you can use them anywhere without having any clutter in chat!\n\n![rank-joining.gif][rank-joining]\n\n\n#### Events\n\n![vod-event.png][vod-event]\n\n- [`live`][live-event] When the streamer goes live\n- [`update`][update-event] When the streamer changes the current game\n- [`vod`][vod-event] When the streamer goes offline (includes vod timestamps for game changes)\n\n### Twitch\n\nThis configuration section contains required information to track the stream status.\n\n- `offline_grace_period` Number of minutes to wait before firing a VOD event after channel appears offline (Default: 2)\n- `top_clips` The maximum number of top clips to show in the vod event (0 \u003c= x \u003c= 5, default 0)\n- `client_id` The twitch application's client_id\n- `client_secret` The twitch application's client_secret\n- `user_login` The list of usernames for the individual streamers\n\nThe `offline_grace_period` is an engineering parameter which is helpful to handle cases where streams temporarily appear offline due to outages or otherwise unwanted connection issues.\n\n### Cache\n\nThis lets you control how the cache should be handled. By default, this bot will write the currently tracked stream information into a `.cache` directory in the current working directory.\n\nThe purpose of this cache is to handle persistent state between restarts, allowing the bot gracefully resume the stream updates.\n\n- `enabled` Whether to enable the cache (default: true)\n\nYou can omit the entire cache config, to use the recommended defaults.\n\n### Example\n\n```json\n{\n  \"discord\": {\n    \"token\": \"NjUzMjM1MjY5MzM1NjQ2MjA4.*******.*******\",\n    \"stream_notifications\": \"https://discord.com/api/webhooks/*******/******\",\n    \"show_notify_hints\": true,\n    \"avatar_url\": \"https://cdn.discordapp.com/avatars/86699011792191488/e43b5218e073a3ae0e9ff7504243bd32.png\",\n    \"role_name\": {\n      \"live\": \"live\",\n      \"vod\": \"vod\",\n      \"update\": \"update\"\n    },\n    \"enabled_events\": [\"live\", \"update\", \"vod\"]\n  },\n  \"twitch\": {\n    \"top_clips\": 5,\n    \"offline_grace_period\": 2,\n    \"client_id\": \"*******\",\n    \"client_secret\": \"*******\",\n    \"user_login\": [\"Elajjaz\", \"Distortion2\"]\n  }\n}\n```\n\n# Docker Setup\n\nAn example setup would be a folder like this:\n\n```\nstrumbot/\n|- docker-compose.yml\n|- config.json\n\\- cache/\n```\n\nThe config file should be populated as described above. The cache directory should be an empty directory that will be used as a persistent state database between container restarts.\n\nYour docker-compose.yml should then be configured this way:\n\n```yml\nversion: \"2.2\"\n\nservices:\n    strumbot:\n        image: minnced/strumbot-rs:1.2.11\n        volumes:\n            - ./cache:/app/.cache # The hosted cache directory as a local volume\n            - ./config.json:/app/config.json # Your config file is also available inside the container as a volume\n        restart: unless-stopped # This will restart the app if it crashes for some reason\n        container_name: strumbot # Easy accessible container name\n```\n\nOnce you have this setup, you can start the service with `docker compose build \u0026\u0026 docker compose up -d`. This will pull the image from [Docker Hub](https://hub.docker.com/r/minnced/strumbot-rs) and start it as a daemon.\n\nTo access the logs, you can use `docker logs strumbot`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminndevelopment%2Fstrumbot-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fminndevelopment%2Fstrumbot-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fminndevelopment%2Fstrumbot-rs/lists"}