{"id":28878469,"url":"https://github.com/d00movenok/achtung","last_synced_at":"2026-03-09T04:02:41.396Z","repository":{"id":42497045,"uuid":"358986540","full_name":"D00Movenok/achtung","owner":"D00Movenok","description":"📢 ✉️ Modular multi-notifier","archived":false,"fork":false,"pushed_at":"2024-01-29T23:42:45.000Z","size":124,"stargazers_count":4,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-04-16T00:17:20.804Z","etag":null,"topics":["bot","discord","discord-bot","notifications","telegram","telegram-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","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/D00Movenok.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-04-17T21:31:43.000Z","updated_at":"2023-10-31T08:25:22.000Z","dependencies_parsed_at":"2022-09-06T05:30:45.345Z","dependency_job_id":null,"html_url":"https://github.com/D00Movenok/achtung","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/D00Movenok/achtung","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D00Movenok%2Fachtung","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D00Movenok%2Fachtung/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D00Movenok%2Fachtung/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D00Movenok%2Fachtung/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/D00Movenok","download_url":"https://codeload.github.com/D00Movenok/achtung/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/D00Movenok%2Fachtung/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260985223,"owners_count":23092892,"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","discord","discord-bot","notifications","telegram","telegram-bot"],"created_at":"2025-06-20T17:14:19.224Z","updated_at":"2026-03-09T04:02:41.386Z","avatar_url":"https://github.com/D00Movenok.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📢✉️ Achtung\n\nAchtung is a modular, extensible multi-notifier that makes it easy to manage multiple notifications from all the tools you need.\n\n## Content\n\n1. [Features](#features)\n2. [Screenshots](#screenshots)\n3. [Installation](#installation)\n    1. [Configuration](#configuration)\n        1. [Catcher](#catcher)\n        2. [Telegram admin panel](#telegram-admin-panel)\n        3. [docker-compose.yml](#docker-composeyml)\n    2. [Launch](#launch)\n4. [Usage](#usage)\n5. [Adding new messengers](#adding-new-messengers-senders)\n\n## Features\n\n* Easy to use: one command to deploy, user-friendly admin panel\n\n* Easy to extend: add messengers you want in 10 lines of code\n\n* Enable/disable notifications in one click\n\n* Send notifications to multiple chats and messengers\n\n* Already implemented messengers:\n\n  * Telegram\n\n  * Discord\n\n## Screenshots\n\n| ![chat example](img/chat_example.png) | ![chats menu](img/chats_menu.png) |\n|--|--|\n| ![create notifier](img/notifier_create.png) | ![notifier example](img/notifier_example.png) |\n\n## Installation\n\n### Configuration\n\n#### Catcher\n\n1. Generate random password for communicating with API and put it into .env file:\n\n```env\nADMIN_PASS=R3411yR4nd0m+P455w0rd\n```\n\n2. There is also Catcher OpenAPI documentation. If you wanna Swagger UI for the documentation to be enabled, put it into .env file:\n```env\nAPI_DOC_ENABLED=true\n```\n\n#### Telegram admin panel\n\n1. Register a bot for Telegram admin panel: @BotFather.\n\n2. Enter your Telegram bot API token into .env file:\n\n```env\nAPI_TOKEN=**YOUR_TELEGRAM_BOT_API_TOKEN**\n```\n\n3. Put comma-separated admin IDs into .env file:\n\n```env\nADMIN_ID=**FIRST_ADMIN_TG_ID**,**ANOTHER_ADMIN_TG_ID**\n```\n\n4. **If you want to use webhooks**, put your HOST machine address/domain into .env file:\n\n```env\nWEBHOOK_HOST=https://achtung.example.com\n```\n\n**If you don't want use webhooks**, edit .env:\n\n```env\nWEBHOOK=false\n```\n\n#### docker-compose.yml\n\n1. Replace services.nginx.ports in docker-compose.yml with IP and PORT you need:\n\n```yml\nports:\n    - \"0.0.0.0:1337:8080\"\n```\n\nRemember, the last 8080 is required.\n\n### Launch\n\n1. Install docker and docker-compose.yml:\n\n* https://docs.docker.com/engine/install/\n\n* https://docs.docker.com/compose/install/\n\n2. Run:\n\n```bash\ndocker-compose up -d\n```\n\n## Usage\n\n1. Register bots to send notifications.\n\n2. Invite bots for notifications to the chats/dialogs.\n\n3. Create CHATS using admin panel or raw API.\n\n4. Create NOTIFIER and select CHATS you want using admin panel or raw API.\n\n5. Send notifications using your NOTIFIER's token:\n\n```bash\ncurl 'https://achtung.example.com/api/notify' -d '{\"access_token\":\"TOKEN_HERE\", \"message\":\"NOTIFICATIONS_HERE\"}'\n```\n\n## Adding new messengers (senders)\n\nSender is a class for sending notifications. Let's develop Sender for Telegram.\n\n1. Copy a sender-template:\n\n```python\nfrom aiohttp import ClientSession\n\nfrom senders.base import Sender\n\n\nclass NewSender(Sender):\n    required_fields = {\n        'first_field': 'description of the first field',\n        'second_field': 'description of the second field'\n    }\n\n    def __init__(self, **kwargs):\n        super().__init__(**kwargs)\n        self.url = ('https://api.example.com/{token}/send'\n                    .format(token=self.config['first_field']))\n\n    async def send(self, message):\n        async with ClientSession() as session:\n            await session.post(\n                self.url,\n                params={\n                    'chat_id': self.config['second_field'],\n                    'text': message\n                }\n            )\n\n```\n\n2. Let's fill in the required fields:\n\n```python\nrequired_fields = {\n    'token': 'Telegram Bot API token',\n    'chat_id': 'chat id where notifications will be sent'\n}\n```\n\nYou can get keys (token, chat_id) from `self.config['KEY']`.\u003c/br\u003e\nThe description is required to inform the user which parameter should be entered: `Enter {DESCRIPTION}`.\n\n3. In `__init__(self, **kwargs)` you can create additional variables (e.g. `self.url`):\n\n```python\ndef __init__(self, **kwargs):\n    super().__init__(**kwargs)\n    self.url = ('https://api.telegram.org/bot{token}/sendMessage'\n                .format(token=self.config['token']))\n```\n\n4. `send(self, message)`  method is for sending a notification (a `message` variable). Here you need to determine the logic of sending a request to the bot API:\n\n```python\nasync def send(self, message):\n    async with ClientSession() as session:\n        await session.post(\n            self.url,\n            params={\n                'chat_id': self.config['chat_id'],\n                'text': message,\n                'parse_mode': 'html'\n            }\n        )\n```\n\n5. In the end you need to import your Sender class in `catcher/app/senders/senders.py` and add it to `mapper`:\n\n```python\nfrom senders.telegram import Telegram\n\n...\n\nmapper['Telegram'] = Telegram\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd00movenok%2Fachtung","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd00movenok%2Fachtung","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd00movenok%2Fachtung/lists"}