{"id":17647818,"url":"https://github.com/moshfeu/dictation-tel-bot","last_synced_at":"2026-05-10T09:33:29.501Z","repository":{"id":88544698,"uuid":"117009423","full_name":"moshfeu/dictation-tel-bot","owner":"moshfeu","description":"Use Telegram Bot to create a diction game","archived":false,"fork":false,"pushed_at":"2018-01-27T20:53:52.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-26T05:46:45.477Z","etag":null,"topics":["bot","chat-bot","firebase","nodejs","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moshfeu.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-01-10T20:51:36.000Z","updated_at":"2020-08-20T08:50:35.000Z","dependencies_parsed_at":"2024-03-30T18:15:21.176Z","dependency_job_id":null,"html_url":"https://github.com/moshfeu/dictation-tel-bot","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/moshfeu%2Fdictation-tel-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moshfeu%2Fdictation-tel-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moshfeu%2Fdictation-tel-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moshfeu%2Fdictation-tel-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moshfeu","download_url":"https://codeload.github.com/moshfeu/dictation-tel-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246296583,"owners_count":20754632,"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","chat-bot","firebase","nodejs","telegram-bot","typescript"],"created_at":"2024-10-23T11:14:40.848Z","updated_at":"2026-05-10T09:33:29.458Z","avatar_url":"https://github.com/moshfeu.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Create a dictation game on Telegram using Telegram Bot and firebase on node.js\n\n\u003cimg width=\"508\" alt=\"screenshot of the dictation game\" src=\"https://user-images.githubusercontent.com/3723951/34834126-d4594666-f6f9-11e7-98ec-eabcba871a87.png\"\u003e\n\n\nThanks to [@yagop](https://github.com/yagop) for the great package [node-telegram-bot-api](https://github.com/yagop/node-telegram-bot-api)\n\n# Installation\n\n```\ntypings install --global dt~es6-shim\n```\n\nIf your code is public and you care about sensitive data, please read the [`build`](#build) section.\n\n1. create `config` folder (at root)\n2. put `serviceAccountKey.json` from [firebase](https://firebase.google.com/docs/admin/setup#add_firebase_to_your_app).\n3. add a node in firebase **realtime** called `words`, like this:\u003cbr /\u003e\n   \u003cimg width=\"303\" height=\"165\" alt=\"screen shot of how the 'word' node should looks like in firebase\" src=\"https://user-images.githubusercontent.com/3723951/35352575-140cbe3e-014d-11e8-97f7-c52d1a462cb1.png\" /\u003e\n4. create `config.json`. it should contains this props:\n\n```\n{\n  \"botToken\": \"bot api from BotFather\",\n  \"firebaseDatabaseUrl\": \"https://{database_name}.firebaseio.com\"\n}\n```\n- `botToken` - from [`botFather`](https://core.telegram.org/bots#6-botfather)\n- `firebaseDatabaseURL` - from [`firebase` dashboard](https://firebase.google.com/docs/database/web/start)\n5. add texts.json to `config` folder, it should contains:\n```\n{\n  \"compliments\": [\n    \"good\",\n    \"http://yoursite.com/audio.mp3\",\n    \"http://yoursite.com/audio.ogg\",\n    \"http://yoursite.com/image.gif\",\n  ], // array of strings. support texts and url of .gif, .mp3 and .ogg\n  \"corrections\": []\n}\n```\n\n# Usage\n\nBot [commands](https://core.telegram.org/bots#global-commands):\n\n1. `/start` start the bot.\n2. `/test` start the test.\n3. `/add` add words to the game.\n4. `/list` review and delete words from the list.\n\n# Build\n\nIf your code is not public, just remove the `config` folder from `.gitignore` so it will push all of the files to the server.\u003cbr /\u003e\nOtherwise, make sure that `env` will contains the following variables:\n\n- appURL\n- botToken\n- firebaseConfig\n- firebaseDatabaseURL\n- prod -\u003e `true`\n\nAnd read the next section\n\n*Some facts:*\n- I'm using _Heroku_ to host my app.\n- The messages about right/wrong answer can be configured in `config/texts.json`.\n- We want to allow people to use thier own files (such as `.gif` etc.)\n- Therefore:\n  - The file contents shouldn't be public\n  - We are storing the data in `env` variable.\n  - We need to update `env` from the `texts.json` file.\n\n**Conclution**\u003cbr /\u003e\n`build/pre-push.js` push `texts.json` content as `env` param.\n\n*If you are using defferent hosting than _Heroku_, modify this file so it will push the texts to your server*\n\n\n\n*TODO*\n\n1. Add more commands (`/delete` etc.).\n2. Add tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoshfeu%2Fdictation-tel-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoshfeu%2Fdictation-tel-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoshfeu%2Fdictation-tel-bot/lists"}