{"id":21521064,"url":"https://github.com/secondthunder/anya-bot-ts","last_synced_at":"2025-06-30T09:33:15.396Z","repository":{"id":37545156,"uuid":"505920821","full_name":"SecondThundeR/anya-bot-ts","owner":"SecondThundeR","description":"Some random TypeScript bot with interesting features","archived":false,"fork":false,"pushed_at":"2024-10-19T14:08:25.000Z","size":485,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T22:40:41.580Z","etag":null,"topics":["deno","denojs","grammyjs","telegram-api","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/SecondThundeR.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-06-21T16:25:38.000Z","updated_at":"2024-10-19T14:08:28.000Z","dependencies_parsed_at":"2023-02-11T23:01:32.771Z","dependency_job_id":"3fcbe47d-108f-434b-9934-1c90ac3a52ff","html_url":"https://github.com/SecondThundeR/anya-bot-ts","commit_stats":null,"previous_names":[],"tags_count":13,"template":true,"template_full_name":null,"purl":"pkg:github/SecondThundeR/anya-bot-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SecondThundeR%2Fanya-bot-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SecondThundeR%2Fanya-bot-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SecondThundeR%2Fanya-bot-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SecondThundeR%2Fanya-bot-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SecondThundeR","download_url":"https://codeload.github.com/SecondThundeR/anya-bot-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SecondThundeR%2Fanya-bot-ts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262747939,"owners_count":23358071,"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":["deno","denojs","grammyjs","telegram-api","telegram-bot","typescript"],"created_at":"2024-11-24T01:05:37.865Z","updated_at":"2025-06-30T09:33:15.344Z","avatar_url":"https://github.com/SecondThundeR.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# anya-bot-ts\n\n\u003e [!WARNING]\n\u003e The bot is in maintenance mode. New features will most likely not appear\n\nSome random TypeScript bot with interesting features based on the grammY library\n\n\u003e [!NOTE]\n\u003e This bot was created as an additional tool to fight against premium Telegram stickers and emoji (Because they sucks)\n\u003e\n\u003e Live instance of bot: [@antipremiumbullshit_bot](https://t.me/antipremiumbullshit_bot)\n\n## Features\n\n- **Removes premium stickers/emojis (Can be disabled/enabled with special command)**\n- **Removes voice/video messages (Can be disabled/enabled with special command)**\n- Handy white/ignore lists configuration from DM\n- Locale configuration via commands\n- and more... _(maybe)_\n\n## Setup\n\n### Local\n\n1. Create a new bot and get a bot token\n   \u003e Note: Don't forget to disable [privacy mode](https://core.telegram.org/bots#privacy-mode) for your bot.\n   \u003e\n   \u003e For more information about how this does not violate the privacy of users conversations, read the [FAQ section](#faq)\n2. Install `redis-cli` and `deno`\n3. Clone this repository\n4. Open an `.env` file in the root of the folder and change variables into it:\n    - `BOT_TOKEN` - bot token\n    - `CREATOR_ID` - your ID for working with the bot whitelist/ignored list from the DM\n5. Run `deno task dev`\n    \u003e If you want to get all debug data, run `export DEBUG=\"grammy*\"` before launching bot\n6. Wait for `Started as @...` message and/or message in PM from bot\n7. Bot is ready to go!\n\n### Fly\n\n1. Create a new bot and get a bot token\n2. Create a new Redis database and get: Username, Password, Host and Port\n    \u003e How to create a Redis database, create a user and get the necessary data to connect will not be written here\n3. Refer to [Fly for Dockerfile documentation](https://fly.io/docs/languages-and-frameworks/dockerfile/) for creating app, setting up secrets and deploying\n    \u003e Which secrets need to be set can be found below in Heroku section, step 3\n4. Wait for `Started as @...` message in console and/or message in PM from bot\n5. Bot is ready to go!\n\n### Heroku\n\n1. Create a new bot and get a bot token\n2. Create a new Redis database and get: Username, Password, Host and Port\n    \u003e How to create a Redis database, create a user and get the necessary data to connect will not be written here\n3. Create a new pipeline in Heroku, the application in it and set neccessary config vars in the settings:\n    - `BOT_TOKEN` - bot token\n    - `CREATOR_ID` - your ID for working with the bot whitelist/ignored list from the DM (better to pass, as bot won't work correctly without it)\n    - `CHATS_TABLE_NAME` - name of table with data in Redis DB\n    - `REDISUSER` - name of Redis DB user\n    - `REDISPASS` - password of Redis DB user\n    - `REDISHOST` - endpoint of Redis DB\n    - `REDISPORT` - port of Redis DB endpoint\n4. Push sources on Heroku _(or set up auto-deployment)_ and wait for build\n5. Wait for `Started as @...` message in console and/or message in PM from bot\n6. Bot is ready to go!\n\n#### Note about Heroku\n\nWhile doing step 3, refer to [Heroku Docker Docs](https://devcenter.heroku.com/articles/build-docker-images-heroku-yml#getting-started) for converting the stack into a container\n\n\u003e [!TIP]\n\u003e If something doesn't work, check the application logs in Heroku or locally and try googling the problem. If nothing helps, open an Issue with a detailed description of the problem\n\n## Bot commands\n\n**Group commands:**\n\n- `help` - send help message\n- `silent` - manage bot silent mode\n- `aidenmode` - enables \"Aiden Pierce\" mode _(Removes voice/video messages)_\n- `aidensilent` - manage \"Aiden Pierce\" silent mode\n- `noemoji` - triggers emoji strictness removal\n- `adminpower` - triggers ignoring of restricted messages from admins\n- `silentonlocale` - change message when silent mode is enabled\n- `silentonlocalereset` - reset message when silent mode is enabled\n- `silentofflocale` - change message when silent mode is disabled\n- `silentofflocalereset` - reset message when silent mode is disabled\n- `messagelocale` - change message when bot removes stickers\n- `messagelocalereset` - reset message when bot removes stickers\n\n**DM commands:**\n\n- `help` - send DM help message\n- `addwl` - add group ID to white list\n- `remwl` - remove group ID from white list\n- `silentremwl` - remove group ID from white list without notification\n- `getwl` - get all groups info from white list\n- `addil` - add group ID to ignore list\n- `remil` - remove group ID from ignore list\n- `getil` - get all groups ID from ignore list\n- `getcmdusage` - get counters of commands usage\n- `import` - import database entries to the related Redis instance\n- `export` - export database entries from the related Redis instance\n- `uptime` - get current uptime of bot\n\n## Bot locale configuration\n\nThe entire locale strings are now stored in the `src/locales`. Some strings can be changed per chat using the commands above with `locale` substring in it.\n\n## Changelog\n\nThe project now has a separate file [CHANGELOG.md](https://github.com/SecondThundeR/anya-bot-ts/blob/main/CHANGELOG.md). Check it for details\n\n## FAQ\n\n\u003e Q: How white/ignore lists are working?\n\nWhen the bot is added to an unknown group, you will be prompted\nto add the group to the whitelist, decline the offer to add,\nor add it to the ignore list. The ignore list is used to prevent\nthe bot from sending you information about future additions to the\ngroup that  you have set to the ignore list. In the case of a simple\nrejection, the bot will not work in the new chat until you add it\nto the whitelist\n\n\u003e Q: Why were these lists added in the first place?\n\nDuring the tests, it became clear that with limited resources\n_(small database memory, low system configuration, etc.)_,\nthe best solution was to limit the number of chats, for\nless load on the infrastructure of the bot. If you want,\nwhitelist can be cut out of the code, perhaps later will\nbe created a separate branch for this, but not for sure\n\n\u003e Q: Is the privacy of conversations with the privacy mode disabled violated?\n\nNo, it is not violated. The advantage of this bot is that it:\n\n1. Does not log messages received from the Telegram API\n2. Processes only stickers, emojis and voice/video messages,\nthanks to a convenient filter provided by the grammY library.\nIf you want to make sure of this, look at the folder with [handlers](https://github.com/SecondThundeR/anya-bot-ts/tree/main/src/handlers)\n\n## License\n\nThis repository is licensed under [MIT License](https://github.com/SecondThundeR/anya-bot-ts/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecondthunder%2Fanya-bot-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsecondthunder%2Fanya-bot-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsecondthunder%2Fanya-bot-ts/lists"}