{"id":20706706,"url":"https://github.com/lucapasquale/botchini","last_synced_at":"2025-06-28T20:10:54.344Z","repository":{"id":37789537,"uuid":"342724355","full_name":"lucapasquale/botchini","owner":"lucapasquale","description":"Discord bot with Twitch integration","archived":false,"fork":false,"pushed_at":"2025-04-03T01:23:15.000Z","size":1011,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-23T02:17:04.003Z","etag":null,"topics":["discord","discord-bot","elixir","twitch","youtube"],"latest_commit_sha":null,"homepage":"https://botchini.luca.codes","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucapasquale.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2021-02-26T23:14:09.000Z","updated_at":"2025-04-03T01:23:18.000Z","dependencies_parsed_at":"2024-06-23T23:28:07.846Z","dependency_job_id":"f5179df3-394c-46f9-bfd3-bf196dcc6e9e","html_url":"https://github.com/lucapasquale/botchini","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/lucapasquale%2Fbotchini","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucapasquale%2Fbotchini/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucapasquale%2Fbotchini/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucapasquale%2Fbotchini/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucapasquale","download_url":"https://codeload.github.com/lucapasquale/botchini/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250354519,"owners_count":21416752,"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","discord-bot","elixir","twitch","youtube"],"created_at":"2024-11-17T01:23:52.432Z","updated_at":"2025-04-23T02:17:12.915Z","avatar_url":"https://github.com/lucapasquale.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Botchini\n\nDiscord Bot with Twitch and YouTube integrations for creator notifications!\n\nGet messages when a Twitch user starts streaming, or when a YouTube channel posts a new video or starts a live.\n\nUses modern features like [Slash Commands](https://blog.discord.com/slash-commands-are-here-8db0a385d9e6?gi=cb5c18566e7) and [Message Components](https://discord.com/developers/docs/interactions/message-components)\n\n## [Add it to your server](https://discord.com/api/oauth2/authorize?client_id=814896826569195561\u0026permissions=2048\u0026scope=bot%20applications.commands)\n\n![image](https://user-images.githubusercontent.com/15659967/121437344-89bb7180-c958-11eb-9d2f-034cf8b5f179.png)\n\n## Slash Commands\n\n - Common\n    - `/about` : Bot status with uptime, memory usage and more\n - Creators\n    - `/info \u003cservice\u003e \u003cterm\u003e` : Information about a Twitch user or YouTube channel\n    - `/follow \u003cservice\u003e \u003cterm\u003e` : Follow a creator and get notified when it starts streaming or uploads a video\n    - `/unfollow \u003cservice\u003e \u003cterm\u003e` : Stops following a creator\n    - `/list` : Lists all creators being followed on the server\n - Music\n    - `/play \u003cterm\u003e`: Play a song from YouTube\n    - `/pause`: Pauses current song\n    - `/resume`: Resumes current song\n    - `/skip`: Skips current song\n    - `/stop`: Stops playing and clears the queue\n    - `/queue`: Lists current songs in queue\n\n\n## Installation\n\nCopy the sample environment sample file into a secrets file:\n\n```bash\ncat config/dev.secret-sample.exs \u003e config/dev.secret.exs\n```\n\nRun `mix setup` to install all dependencies and run the database migrations\n\n### Host\n\nFor receiving and registering to webhooks locally, you need a public url that can reach your machine. You can use start a proxy with [ngrok http $PORT](https://ngrok.com/), then copy the url generated into the `:host` config.\n\n### Discord\n\nGrab your bot's token from [Discord Applications](https://discord.com/developers/applications) on `Your application \u003e Bot \u003e Click to reveal token`\n\n### YouTube\n\nCreate an account on [Google Cloud Platform](https://console.cloud.google.com), and create a new API Key for your bot. You can limit the key to only have access to `YouTube Data API v3`\n\n\u003cdetails\u003e\n  \u003csummary\u003eExample webhook payload\u003c/summary\u003e\n\n  ```xml\n  \u003c?xml version='1.0' encoding='UTF-8'?\u003e\n   \u003cfeed\n      xmlns:yt=\"http://www.youtube.com/xml/schemas/2015\"\n      xmlns=\"http://www.w3.org/2005/Atom\"\u003e\n      \u003clink rel=\"hub\" href=\"https://pubsubhubbub.appspot.com\"/\u003e\n      \u003clink rel=\"self\" href=\"https://www.youtube.com/xml/feeds/videos.xml?channel_id=UCHDxYLv8iovIbhrfl16CNyg\"/\u003e\n      \u003ctitle\u003eYouTube video feed\u003c/title\u003e\n      \u003cupdated\u003e2024-05-17T01:37:49.636216015+00:00\u003c/updated\u003e\n      \u003centry\u003e\n         \u003cid\u003eyt:video:TBXAlFqn93E\u003c/id\u003e\n         \u003cyt:videoId\u003eTBXAlFqn93E\u003c/yt:videoId\u003e\n         \u003cyt:channelId\u003eUCHDxYLv8iovIbhrfl16CNyg\u003c/yt:channelId\u003e\n         \u003ctitle\u003eI wish this wasn’t an Ubisoft game\u003c/title\u003e\n         \u003clink rel=\"alternate\" href=\"https://www.youtube.com/watch?v=TBXAlFqn93E\"/\u003e\n         \u003cauthor\u003e\n            \u003cname\u003eGameLinked\u003c/name\u003e\n            \u003curi\u003ehttps://www.youtube.com/channel/UCHDxYLv8iovIbhrfl16CNyg\u003c/uri\u003e\n         \u003c/author\u003e\n         \u003cpublished\u003e2024-05-17T01:37:38+00:00\u003c/published\u003e\n         \u003cupdated\u003e2024-05-17T01:37:49.636216015+00:00\u003c/updated\u003e\n      \u003c/entry\u003e\n   \u003c/feed\u003e\n  ```\n\u003c/details\u003e\n\n### Twitch\n\nTo be able to search and receive webhooks from streams, you need to register an application on the [Twitch Applications](https://dev.twitch.tv/console/apps). After that, you'll be able to get the `client_id` and `client_secret` tokens.\n\n\u003cdetails\u003e\n  \u003csummary\u003eExample webhook payload\u003c/summary\u003e\n\n  ```json\n  {\n      \"challenge\":\"6gepqopldUA-K7p_CJDK3gmndD6mxyxjWSS7wCTFxZ8\",\n      \"subscription\":{\n         \"id\":\"3ce498e8-44d4-446f-886c-66bc256af5d9\",\n         \"status\":\"webhook_callback_verification_pending\",\n         \"type\":\"stream.online\",\n         \"version\":\"1\",\n         \"condition\":{\n            \"broadcaster_user_id\":\"35958947\"\n         },\n         \"transport\":{\n            \"method\":\"webhook\",\n            \"callback\":\"https://botchini.lucapasquale.dev/api/twitch/webhooks/callback\"\n         },\n         \"created_at\":\"2024-05-17T01:46:52.47828845Z\",\n         \"cost\":1\n      }\n   }\n  ```\n\u003c/details\u003e\n\n## Running locally\n\nAfter all necessary values are on `config/dev.secret.exs`, run the bot with: `mix phx.server`. It will reload automatically when you update a file.\n\n## Running in production\n\nThe bot needs the following env_vars:\n\n - `PORT` : Port to run on. Defaults to 4000\n - `PHX_HOST` : The endpoint your bot is running on, without `https://`\n - `DATABASE_URL` : The url to connect to your postgres db\n - `DISCORD_TOKEN` : Token for your Discord Bot\n - `YOUTUBE_API_KEY` : YouTube API key\n - `YOUTUBE_WEBHOOK_SECRET` : Secret string to be used for validating YouTube webhooks\n - `TWITCH_CLIENT_ID` : Client ID for your Twitch application\n - `TWITCH_CLIENT_SECRET` : Client Secret for your Twitch application\n - `TWITCH_WEBHOOK_SECRET` : Secret string to be used for validating Twitch webhooks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucapasquale%2Fbotchini","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucapasquale%2Fbotchini","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucapasquale%2Fbotchini/lists"}