{"id":29179787,"url":"https://github.com/danielzotti/danielzotti-telegram-bot","last_synced_at":"2026-05-02T05:03:07.171Z","repository":{"id":63954683,"uuid":"570204442","full_name":"danielzotti/danielzotti-telegram-bot","owner":"danielzotti","description":"A Telegram bot that manages events, jokes, members and more","archived":false,"fork":false,"pushed_at":"2024-12-03T15:04:01.000Z","size":436,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-03T16:19:57.391Z","etag":null,"topics":["bot","nodejs","telegram","telegram-bot","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/danielzotti.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":"2022-11-24T15:21:10.000Z","updated_at":"2024-12-03T15:06:14.000Z","dependencies_parsed_at":"2024-12-03T16:19:44.344Z","dependency_job_id":"4feb40e4-8cb4-46d2-8528-919a7be6bce6","html_url":"https://github.com/danielzotti/danielzotti-telegram-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danielzotti/danielzotti-telegram-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielzotti%2Fdanielzotti-telegram-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielzotti%2Fdanielzotti-telegram-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielzotti%2Fdanielzotti-telegram-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielzotti%2Fdanielzotti-telegram-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielzotti","download_url":"https://codeload.github.com/danielzotti/danielzotti-telegram-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielzotti%2Fdanielzotti-telegram-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263021821,"owners_count":23401148,"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","nodejs","telegram","telegram-bot","typescript"],"created_at":"2025-07-01T19:07:00.281Z","updated_at":"2026-05-02T05:03:02.150Z","avatar_url":"https://github.com/danielzotti.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Daniel Zotti Telegram bot\n\nA Telegram bot designed to be included in Telegram groups. The bot expose these features:\n\n1. Jokes\n2. Welcome/Goodbye messages\n\n## Bot creation (already done, but it's here as a reminder)\n\n- `/setname` @DanielZottiBot\n- `/setdescription` A Telegram bot that manages events, jokes, member and more\n- `/setuserpic`: `/assets/profile.jpg`\n\n## Bot Commands\n\n- `/start` it shows a message when the bot is started\n- `/help` it shows info about the bot\n- `/jokes` it shows how many jokes are in the DB\n- `/random_joke` it sends a random joke\n\n## Features\n\n### 1. Jokes\n\nSome examples to trigger a joke:\n\n- `What would Daniel say?` (keyword: \"Daniel\")\n- `I need a joke!` (keyword: \"joke\")\n\n#### How to add jokes\n\nIn order to add (or edit) a joke, you have to edit the `/assets/jokes.json` file.\n\nThe JSON file is an array of objects having this structure:\n\n- `date` (optional): data with following format `yyyy-mm-dd`.\n- `event` (optional): info about the place or the occasion the joke has been stated.\n- `sentences (required)`: a list of sentences, structured this way:\n  - `name` (optional) name of the person\n  - `text` (required): the actual sentence\n\n##### Example\n\n```json\n{\n  \"date\": \"2021-10-05\",\n  \"event\": \"In pub with friends\",\n  \"sentences\": [\n    {\n      \"name\": \"Daniel\",\n      \"text\": \"Why do programmers keep pressing the F5 button??\"\n    },\n    {\n      \"name\": \"Friends\",\n      \"text\": \"No, not again.....\"\n    },\n    {\n      \"name\": \"Daniel\",\n      \"text\": \"Because it’s \u003ci\u003erefreshing\u003c/i\u003e.\"\n    }\n  ]\n}\n```\n\n### 2. Welcome/Goodbye messages\n\n- One or more members are added to the group:\n  `@danielzotti has just added a member to the group! Let's welcome @mario aka Mario Rossi`\n- A member is removed from the group (or leave):\n  `Oh no! @mario aka Mario Rossi has left the group!`\n\n\n## Installation and how to use\n\n- `nvm use` to set the right node version\n- `npm install`\n- `npm run start` to run it locally\n- `npm run dev` to run it locally with nodemon\n\n## Deploy\n\nOn Daniel's server through GitHub Actions\n\n## Add bot to a group\nIn order to make the \"send joke triggered by keyword\" work, the Daniel Zotti bot needs to have access to the message of a group.\nThe *group privacy* has to be turned *off*: https://stackoverflow.com/questions/50204633/allow-bot-to-access-telegram-group-messages\n\n## Useful links\n- https://medium.com/@g.c.dassanayake/deploying-a-nodejs-application-using-github-actions-e5f4bde7b21b\n\n## GitHub Actions\n\n### Add GitHub runner\nAdd runner on private linux server:\n- Add self-hosted runner to GitHub project and install it: https://docs.github.com/en/actions/hosting-your-own-runners/adding-self-hosted-runners\n- Create docker group: `sudo groupadd docker`\n- Create a dedicated user for the runner: `sudo useradd github-runner`\n- Add it to docker group: `sudo usermod -aG docker github-runner` \n- Move to github-runner home folder: `cd /home/github-runner`\n\nMore info: https://docs.github.com/en/actions/hosting-your-own-runners/about-self-hosted-runners\n\nRunning as a service: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/configuring-the-self-hosted-runner-application-as-a-service\n\n### Create workflow\nCreate a file in `.github/workflows/main.yml`\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielzotti%2Fdanielzotti-telegram-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielzotti%2Fdanielzotti-telegram-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielzotti%2Fdanielzotti-telegram-bot/lists"}