{"id":48998367,"url":"https://github.com/arebaka/lena","last_synced_at":"2026-04-18T17:40:25.359Z","repository":{"id":62354801,"uuid":"389417765","full_name":"arebaka/lena","owner":"arebaka","description":"a Telegram bot who saves messages from group chats and sends them binding to triggers","archived":false,"fork":false,"pushed_at":"2022-04-09T07:26:17.000Z","size":143,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-18T11:27:48.840Z","etag":null,"topics":["bot","everlasting-summer","nodejs","telegram","trigger"],"latest_commit_sha":null,"homepage":"https://t.me/eslenabot","language":"JavaScript","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/arebaka.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}},"created_at":"2021-07-25T18:41:38.000Z","updated_at":"2025-05-24T17:58:35.000Z","dependencies_parsed_at":"2022-10-31T10:48:30.603Z","dependency_job_id":null,"html_url":"https://github.com/arebaka/lena","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/arebaka/lena","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arebaka%2Flena","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arebaka%2Flena/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arebaka%2Flena/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arebaka%2Flena/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arebaka","download_url":"https://codeload.github.com/arebaka/lena/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arebaka%2Flena/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31978803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T17:30:12.329Z","status":"ssl_error","status_checked_at":"2026-04-18T17:29:59.069Z","response_time":103,"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":["bot","everlasting-summer","nodejs","telegram","trigger"],"created_at":"2026-04-18T17:39:51.959Z","updated_at":"2026-04-18T17:40:25.332Z","avatar_url":"https://github.com/arebaka.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LenaBot\n*Всегда ненавидела эту суку!*\n\n\u003e A [Telegram](https://telegram.org) bot who saves messages from group chats and sends them binding to triggers.\n\n![](https://img.shields.io/tokei/lines/github/arebaka/lena)\n![](https://img.shields.io/github/repo-size/arebaka/lena)\n![](https://img.shields.io/npm/v/lenabot)\n![](https://img.shields.io/codefactor/grade/github/arebaka/lena)\n\n![](https://img.shields.io/badge/English-100%25-brightgreen)\n![](https://img.shields.io/badge/Russian-100%25-brightgreen)\n\n## Commands\n`/on \u003ctext\u003e` – create a trigger on text  \n`/off \u003cnumber\u003e` – delete the trigger by number  \n`/onjoin` – create a trigger on someone joins the chat  \n`/onleft` – create a trigger on someone lefts the chat  \n`/list` – get all active triggers  \n`/trigger \u003cnumber\u003e` – invoke active trigger by number forcibly  \n`/settings` – configure the chat  \n`/edit \u003cnumber\u003e` – configure the trigger by number\n\n## Supported message types\n+ 📃 text\n+ 📹 animation\n+ 🎧 audio\n+ 🎲 dice\n+ 🏷️ document\n+ 🌐 location\n+ 🖼️ photo\n+ 📊 poll (not quiz)\n+ 😽 sticker\n+ 🎬 video\n+ 🎥 videonote\n+ 🎤 voice\n\n## TLDR\n1. Create and setup a bot via [@BotFather](https://t.me/BotFather)\n2. Install [PostgreSQL](https://www.postgresql.org/download/) if you didnt\n3. Create an empty database 'lena' in PSQL owned to your user\n4. Install [npm](https://www.npmjs.com) \u0026 [node.js](https://npmjs.com/package/node)\n5. `npm i lenabot`\n6. `export TOKEN=\u003cTOKEN_FROM_BOTFATHER\u003e`\n7. `npx lenabot`\n8. Add your bot to a group chat and add triggers with commands above replying the messages to be resend\n9. To stop the bot type to console with it `stop` and press enter\n\n## Preparing\n1. Create your bot via [@BotFather](https://t.me/BotFather), it will guide you on that\n2. The bot uses DBMS PostgreSQL. [Install](https://www.postgresql.org/download/) if you dont have it\n3. Create a database in PSQL for you bot\n4. The bot works using [node.js](https://npmjs.com/package/node). Install it\n\n## Installation\n```bash\nnpm i lenabot\n```\n\n## Launch\nThe bot requires some environment variables. Here is a list of them:  \n`TOKEN` – bot token from @BotFather  \n`DBURI` – URI-string for connection to PSQL in format `postgres://\u003cUSER\u003e:\u003cPASSWORD\u003e@\u003cHOST\u003e/\u003cDATABASE\u003e:\u003cPORT\u003e`\n\nInstead of the environment you can set launch parameters in a file `config.toml`.\n\nAfter setup the environment run\n```bash\nnpx lenabot\n```\n\nIf everything went well, you will see something like this in the console:\n```\n\u003e lenabot@1.2.0 start\n\u003e node index.js\n\nBot @eslenabot started.\n\u003e _\n```\n\n## Control\nAfter the launch, there are available commands `stop` \u0026 `reload` for safe stop and restart respectively.\n\n## Usage\n1. Send the message with one of the supported type\n2. Reply to it with a command `/on` + the string on which you wanted to set the trigger (e.g. `/on !rules`)\n3. If success, bot will answer that the trigger has been added, as well as offer to edit it by an inline button\n4. Now, when a new message containing that string, bot will send a message that duplicates the one you replied to with the `/on` command\n5. To trigger when someone enters/leaves the chat, send a command `/onjoin` / `/onleft` without parameters replying to the message\n6. If the message is text or includes caption, it can contain some patterns that replaced with the corresponding values:\n    - `{chat}` – title of the chat\n    - `{chatid}` – Telegram ID of the chat\n    - `{chatname}` – username of the chat, if there is\n    - `{name}` – first name of the triggering message sender\n    - `{fullname}` – first name and last name of the sender\n    - `{mention}` – first name of the sender linked to them\n    - `{username}` – username of the sender if there is (without @)\n    - `{user}` – username with @ or linked first name to the sender\n    - `{userid}` – Telegram ID of the sender\n    - `{date}` – localized current date without time\n    - `{time}` – localized current time\n    - `{datetime}` – localized current date with time\n    - `{message}` – text of the triggering message\n    - `{messid}` – ID of the triggering message\n\n![screenshot of usage](https://user-images.githubusercontent.com/36796676/141665612-2ec1fd5c-ccab-4b20-897b-13ee461c5753.png)\n\n## Support\nIf something doesnt work, or you just wanna talk to the bot creator or his mom, write [@arelive](https://t.me/arelive). There also accepted kicks from volunteer project managers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farebaka%2Flena","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farebaka%2Flena","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farebaka%2Flena/lists"}