{"id":16876696,"url":"https://github.com/emilgardis/twitch_discord_moderation","last_synced_at":"2025-04-15T21:50:25.438Z","repository":{"id":37103034,"uuid":"298855659","full_name":"Emilgardis/twitch_discord_moderation","owner":"Emilgardis","description":"Bot to notify and log in a discord channel when a moderator makes an action in a twitch channel","archived":false,"fork":false,"pushed_at":"2025-02-17T07:43:55.000Z","size":298,"stargazers_count":3,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T01:51:37.812Z","etag":null,"topics":["bot","discord","twitch"],"latest_commit_sha":null,"homepage":"https://github.com/Emilgardis/twitch_discord_moderation/pkgs/container/twitch_discord_moderation","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/Emilgardis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2020-09-26T16:32:29.000Z","updated_at":"2025-02-17T07:43:26.000Z","dependencies_parsed_at":"2024-05-02T23:22:54.621Z","dependency_job_id":"7be8ae21-5e39-42b3-b106-a4d08ef4bfca","html_url":"https://github.com/Emilgardis/twitch_discord_moderation","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emilgardis%2Ftwitch_discord_moderation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emilgardis%2Ftwitch_discord_moderation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emilgardis%2Ftwitch_discord_moderation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Emilgardis%2Ftwitch_discord_moderation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Emilgardis","download_url":"https://codeload.github.com/Emilgardis/twitch_discord_moderation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249161104,"owners_count":21222468,"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":["bot","discord","twitch"],"created_at":"2024-10-13T15:40:17.116Z","updated_at":"2025-04-15T21:50:25.420Z","avatar_url":"https://github.com/Emilgardis.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Twitch Discord Moderation | Log mod actions with discord\n\nLog moderator actions with a discord channel.\n\nExample usage with docker-compose\n\n```yml\nversion: \"3\"\n\nservices:\n  twitch-discord-moderation:\n    image: emilgardis/twitch-discord-moderation:latest\n    env_file: .env\n    environment:\n      RUST_LOG: \"info\"\n    restart: \"unless-stopped\"\n    volumes:\n      - ./.dcf_secret:/app/.dcf_secret # only needed if you want to use DCF\n```\n\ncreate an empty file called `.dcf_secret` (and make sure it's only readable by trusted users)\n\nand then create a `.env` file containing the following (make sure to replace `CHANNEL_LOGIN` or omit it to use the owner of the token):\n\n```txt\nDCF_OAUTH_CLIENT_ID=ytf4qimvfnkm2egtyxi4ckm4bex49e # This is a client id created for this application. Feel free to use it.\nCHANNEL_LOGIN=justintv\nDISCORD_WEBHOOK=https://discordapp.com/api/webhooks/111111111111/aaaaaaaaaaaaaaa\nRUST_LOG=info\n```\n\nWith the above config, the bot will post a message to the webhook prompting a user to login with a link. Once authorized, the bot will monitor moderation actions on the specified channel `justintv` (if the user that authorized has permission to do that) and post them to the discord webhook.\n\n## Features\n\nThis application also supports getting an oauth2 token from an external service on url. This service should return a token in a json body where the token string is in the field `access_token`, if not, specify the path with a pointer.\n\n## Commandline options\n\n\u003c!--BEGIN commandline options--\u003e\n```text\nBot to send twitch moderator actions to a discord webhook\n\nUsage: twitch-discord-moderation [OPTIONS] --discord-webhook \u003cDISCORD_WEBHOOK\u003e\n\nOptions:\n      --discord-webhook \u003cDISCORD_WEBHOOK\u003e\n          URL to discord webhook\n\n      --access-token \u003cACCESS_TOKEN\u003e\n          OAuth2 Access token\n\n      --channel-login \u003cCHANNEL_LOGIN\u003e\n          Name of channel to monitor. If left out, defaults to owner of access token\n\n      --channel-id \u003cCHANNEL_ID\u003e\n          User ID of channel to monitor. If left out, defaults to owner of access token\n\n      --oauth2-service-url \u003cOAUTH2_SERVICE_URL\u003e\n          URL to service that provides OAuth2 token. Called on start and whenever the token needs to be refreshed.\n\n          This application does not do any refreshing of tokens.\n\n      --oauth2-service-key \u003cOAUTH2_SERVICE_KEY\u003e\n          Bearer key for authorizing on the OAuth2 service url\n\n      --oauth2-service-pointer \u003cOAUTH2_SERVICE_POINTER\u003e\n          Grab token by pointer. See https://tools.ietf.org/html/rfc6901\n\n      --oauth2-service-refresh \u003cOAUTH2_SERVICE_REFRESH\u003e\n          Grab a new token from the OAuth2 service this many seconds before it actually expires. Default is 30 seconds\n\n      --dcf-oauth-client-id \u003cDCF_OAUTH_CLIENT_ID\u003e\n          Client id to get a token. Stores the token data in the path specified by `--dcf-secret` (client id and optional secret is not stored)\n\n      --dcf-oauth-client-secret \u003cDCF_OAUTH_CLIENT_SECRET\u003e\n          Client secret to get a token. Only needed for confidential applications\n\n      --dcf-secret-path \u003cDCF_SECRET_PATH\u003e\n          Path for storing DCF oauth\n\n          [default: ./.dcf_secret]\n\n      --channel-bot-name \u003cCHANNEL_BOT_NAME\u003e\n          Name of channel bot\n\n  -h, --help\n          Print help (see a summary with '-h')\n\n  -V, --version\n          Print version\n\n```\n\u003c!--END commandline options--\u003e\n\n\u003ch5\u003e License \u003c/h5\u003e\n\n\u003csup\u003e\nLicensed under either of \u003ca href=\"LICENSE-APACHE\"\u003eApache License, Version\n2.0\u003c/a\u003e or \u003ca href=\"LICENSE-MIT\"\u003eMIT license\u003c/a\u003e at your option.\n\u003c/sup\u003e\n\n\u003cbr\u003e\n\n\u003csub\u003e\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in this crate by you, as defined in the Apache-2.0 license, shall\nbe dual licensed as above, without any additional terms or conditions.\n\u003c/sub\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femilgardis%2Ftwitch_discord_moderation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femilgardis%2Ftwitch_discord_moderation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femilgardis%2Ftwitch_discord_moderation/lists"}