{"id":15887070,"url":"https://github.com/avivace/misterino","last_synced_at":"2026-02-25T03:31:25.583Z","repository":{"id":79663905,"uuid":"148205553","full_name":"avivace/misterino","owner":"avivace","description":"Telegram Bot to subscribe and deliver notifications from Twitch Webhooks","archived":false,"fork":false,"pushed_at":"2018-11-05T08:58:26.000Z","size":111,"stargazers_count":4,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-03T12:11:09.840Z","etag":null,"topics":["polling","telegram","telegram-bot","twitch","twitch-api","twitch-api-new","twitchtv","webhook","webhook-listener","webhooks"],"latest_commit_sha":null,"homepage":"","language":"Python","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/avivace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2018-09-10T19:08:15.000Z","updated_at":"2022-05-11T06:44:04.000Z","dependencies_parsed_at":"2023-03-01T01:16:06.672Z","dependency_job_id":null,"html_url":"https://github.com/avivace/misterino","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/avivace/misterino","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avivace%2Fmisterino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avivace%2Fmisterino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avivace%2Fmisterino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avivace%2Fmisterino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avivace","download_url":"https://codeload.github.com/avivace/misterino/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avivace%2Fmisterino/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29809688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T03:30:18.102Z","status":"ssl_error","status_checked_at":"2026-02-25T03:30:17.799Z","response_time":61,"last_error":"SSL_read: 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":["polling","telegram","telegram-bot","twitch","twitch-api","twitch-api-new","twitchtv","webhook","webhook-listener","webhooks"],"created_at":"2024-10-06T06:01:07.696Z","updated_at":"2026-02-25T03:31:25.568Z","avatar_url":"https://github.com/avivace.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"logo.png\" alt=\"misterino\" width=\"250px\"/\u003e\n\n\u003e Developed by [Denni Bevilacqua](https://github.com/dennib) and [Antonio Vivace](https://github.com/avivace).\n\nTelegram bot notifying when your favorite streamers go live on Twitch.tv. Users can subscribe to Twitch streamers and receive a message when they go online (privately or in a group).\n\nThe telegram bot can function in `polling` or in `webhook` mode. Those modes are idem-potent and you *should* see the same results and behaviours.\n\n### Stack\n\nWe make use of \n\n- [_New_ Twitch API](https://dev.twitch.tv/docs/api/reference/);\n- [Twitch Webhooks](https://dev.twitch.tv/docs/api/webhooks-reference/) to subscribe to events instead of polling for them.\n- [Flask](http://flask.pocoo.org/docs/1.0/api/) as webhook listener;\n- [SQLite3](https://www.sqlite.org/docs.html) for persistence and multi-user experience;\n- [python-telegram-bot](https://github.com/python-telegram-bot/python-telegram-bot);\n\n#### Webhook mode\n\nThe bot was developed to operate in `webhook` mode (this is also why it _may_ seem over-engineered). Please understand that this requires additional work and maintenance. You need:\n\n- A public IP address and/or domain;\n- A SSL certificate;\n- A webhook listener;\n- A reverse proxy exposing the webhook listener, handling TLS1.0+ HTTPS-traffic. \n\nWe don't use the python-telegram-bot integrated webserver, but we listen for webhooks with Flask, then we dispatch the de-jsonified (is this even a word?) payloads to another thread, using a shared Queue.\n\nDuring development, we use the polling mode to get the payload from messages sent to the bot, then pipe them to `webhookTest.sh` to simulate the Telegram server sending webhook to our listener.\n\nFYI the Twitch events are received anyway listening for webhooks, the `mode` setting changes only the telegram bot operating mode. You don't need all the mentioned things for Twitch because it doesn't require an https enabled endpoint: as long as you have DMZ/open ports you are able to set your own IP as _callback_ for the webhook subscriptions.\n\n### Get started\n\n```bash\n# System dependencies\napt install python3 python3-pip\n\n# Get things ready\ngit clone git@github.com:avivace/misterino.git\ncd misterino\npython3 -m venv .\nsource bin/activate\n\n# Python dependencies\npip3 install -r requirements.txt\n```\n\nYou need a Telegram bot token (use [BotFather](https://t.me/BotFather)), a Twitch Client ID and a Twitch Client Secret (register an application on the [Twitch dev portal](https://dev.twitch.tv/dashboard/apps/create)).\n\nCreate a `config.json` with the mentioned values:\n\n```json\n{\n    \"mode\": \"polling\",\n    \"botToken\": \"TELGRAM_BOT_TOKEN\",\n    \"TwitchAppClientID\": \"TWITCH_APP_CLIENT_ID\",\n    \"TwitchAppClientSecret\": \"TWITCH_APP_CLIENT_SECRET\"\n}\n```\n\nStart the bot\n\n```bash\npython3 main.py\n```\n\nIf the script can't find `config.json`, it'll create a default one for you.\n\nYou can specify the configuration file to use using `python3 main.py -c config2.json`.\n\nBot is up and running, talk to it on Telegram.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favivace%2Fmisterino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favivace%2Fmisterino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favivace%2Fmisterino/lists"}