{"id":19751040,"url":"https://github.com/reineimi/tgbot","last_synced_at":"2026-04-18T07:32:47.315Z","repository":{"id":238914175,"uuid":"797980742","full_name":"reineimi/tgbot","owner":"reineimi","description":"A simple telegram bot written in JS with Grammy.js API  for Node.js","archived":false,"fork":false,"pushed_at":"2024-05-30T14:37:28.000Z","size":106,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-20T15:42:02.472Z","etag":null,"topics":["bot","grammyjs","javascript","nodejs","telegram","telegram-bot","typescript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/reineimi.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":"2024-05-08T21:21:53.000Z","updated_at":"2024-05-30T14:37:32.000Z","dependencies_parsed_at":"2024-05-28T10:33:58.052Z","dependency_job_id":"08c1dcea-cd68-40ea-bea1-636c57f9ac08","html_url":"https://github.com/reineimi/tgbot","commit_stats":null,"previous_names":["reineimi/tgbot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/reineimi/tgbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reineimi%2Ftgbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reineimi%2Ftgbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reineimi%2Ftgbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reineimi%2Ftgbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reineimi","download_url":"https://codeload.github.com/reineimi/tgbot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reineimi%2Ftgbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31961211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bot","grammyjs","javascript","nodejs","telegram","telegram-bot","typescript"],"created_at":"2024-11-12T02:42:03.417Z","updated_at":"2026-04-18T07:32:47.300Z","avatar_url":"https://github.com/reineimi.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Usage\nIf installed using `install.sh`, simply run:\n```\ntgbot\n```\nOtherwise, navigate `node` to your `tgbot.js` path:\n```\nnode /Your/Bot/Path/tgbot.js\n```\nOr, alternatively, use `service_setup.sh` from the [setup](https://github.com/reineimi/tgbot/tree/main/setup) folder (Linux only):\n```\nbash service_setup.sh\n```\n\n### Initial commands\n`/getid`\n\u003e Receive `dev_chat_id` for `conf.json` !(must be used only in PMs with bot)!\n#\n`/js ...`\n\u003e Execute JavaScript in `dev_chat_id` chat room\n#\n**Examples of files can be found [here](https://github.com/reineimi/tgbot/tree/main/example).**\n\n\u003cbr\u003e\u003cbr\u003e\u003chr\u003e\n\n# Installation\nSimply open Linux/Android (Termux) terminal and run:\n```\ncurl -LO bit.ly/tgbot_ei; sh tgbot_ei\n```\nOr, manually:\n## 1. Install Node.js\n**Linux:** `nodejs` and `npm` packages\n\n**Windows:** https://nodejs.org/en/download\n\n**Android (Termux):**\n```sh\npkg upgrade; pkg install nodejs\n```\n\n## 2. Install Grammy.js\nCreate a folder(s) in your preferred directory (let's call it `DIR`) and run:\n```sh\nnpm install --prefix DIR grammy\n```\n\n## 3. Download tgbot.js\nDownload [tgbot.js](https://github.com/reineimi/tgbot/blob/main/tgbot.js) or clone/unzip the whole repo in the same `DIR`.\n\n## 4. Configure the bot\nIn the same `DIR`, add and/or modify `conf.json` as you need.\n\n\u003cbr\u003e\u003cbr\u003e\u003chr\u003e\n\n# Files\n\u003e Note: None of the files, except for `conf.json`, are required. You can add/remove those you do not need.\n\n## conf.json\nWill be generated from `install.sh` or created manually. Contains:\n```json\n{\n  \"bot_token\": \"000:000\",\n  \"dev_chat_id\": \"000\",\n  \"github\": \"user/repo\",\n  \"localFiles\": true,\n  \"localPath\": \"example\",\n  \"commandsMenu\": false,\n  \"keywordsMenu\": true\n}\n```\nFrom which:\u003cbr\u003e\u003cbr\u003e\n`bot_token`\n\u003e Your token generated by [BotFather](https://t.me/botfather)\n#\n`dev_chat_id`\n\u003e Your `chat id` received from `/getid` command. Allows bot to execute JS from **your PM**.\u003cbr\u003e\n\u003e Please use `chat id` **only** from **your private messages with the bot**\n#\n`github`\n\u003e Your GitHub username and repository, taken from:\u003cbr\u003e\n\u003e **https:// github.com /`user` /`repo`**\n#\n`localFiles`\n\u003e Use Current Working Directory's subdirectory instead of GitHub repo?\n#\n`localPath`\n\u003e CWD subdirectory path\n#\n`commandsMenu`\n\u003e A button with commands list in the chat\n#\n`keywordsMenu`\n\u003e A list of buttons beneath the chat\n\n#\n## commands.json\nA list of commands with the following syntax:\n```json\n{\n  \"command\": \"description\",\n  \"test\": \"A test\"\n}\n```\n\u003e Note: Commands are `/command` actions with associated text documents.\n\nOnce you've added a command, create the corresponding `.md` document file in the same directory:\u003cbr\u003e\n`command.md` (example: `test.md`).\u003cbr\u003e\n\nYou can also add one `JPG` image to the command (example: `test.jpg`).\n\n#\n## keywords.json\nA list of keywords (phrases) with the following syntax:\n```json\n{\n  \"keyword\": [\"filename.extension\"],\n  \"Text only\": [],\n  \"A test\": [\"example1.jpg\", \"example2.png\"]\n}\n```\n\u003e Note: Keywords are buttons/phrases with associated images and text documents.\n\nKeywords can use multiple text files:\n- `.md` File for the keyword itself\n- `.txt` File for media caption\n\nFor example: `A test.md`, `example1.txt` and `example2.txt`.\n\n\u003cbr\u003e\u003cbr\u003e\u003chr\u003e\n\n# Examples\nYou can take a look at examples in [this](https://github.com/reineimi/tgbot/tree/main/example) folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freineimi%2Ftgbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freineimi%2Ftgbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freineimi%2Ftgbot/lists"}