From cb6ae1e05212a919eb27102008a892cf47e76923 Mon Sep 17 00:00:00 2001 From: Machka Pasla <161734431+machka-pasla@users.noreply.github.com> Date: Mon, 18 Aug 2025 15:22:29 +0300 Subject: [PATCH 1/3] Update README.md --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 2025950..d5d100d 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,6 @@ - **aiohttp:** Для запуска веб-сервера (вебхуки). - **SQLAlchemy 2.x & asyncpg:** Асинхронная работа с базой данных PostgreSQL. - **YooKassa, aiocryptopay:** SDK для интеграции с платежными системами. -- **APScheduler:** Для выполнения отложенных задач (например, уведомления об окончании подписки). - **Pydantic:** Для управления настройками из `.env` файла. - **Docker & Docker Compose:** Для контейнеризации и развертывания. From dba82cfb97ffe8678d62d4af1be3cedfdebe219f Mon Sep 17 00:00:00 2001 From: Machka Pasla <161734431+machka-pasla@users.noreply.github.com> Date: Thu, 4 Sep 2025 15:04:53 +0300 Subject: [PATCH 2/3] Create LICENSE MIT --- LICENSE | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..27c0821 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2025 machka-pasla + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file From 11f5ec4a5bd11298438443cc0c65959266654496 Mon Sep 17 00:00:00 2001 From: Freize Date: Sun, 7 Sep 2025 20:58:50 +0300 Subject: [PATCH 3/3] Update .env.example Comments for bot configuration. Just in case. --- .env.example | 117 ++++++++++++++++++++++++++------------------------- 1 file changed, 60 insertions(+), 57 deletions(-) diff --git a/.env.example b/.env.example index ac2c427..5be10d1 100644 --- a/.env.example +++ b/.env.example @@ -1,55 +1,56 @@ # Telegram Bot Token and Admin IDs -BOT_TOKEN=your_bot_token_here -ADMIN_IDS=comma_separated_admin_ids +BOT_TOKEN=your_bot_token_here # Telegram bot token +ADMIN_IDS=comma_separated_admin_ids # Your telegram ID -POSTGRES_USER=postgres -POSTGRES_PASSWORD=postgres -POSTGRES_HOST=remnawave-tg-shop-db -POSTGRES_PORT=5432 -POSTGRES_DB=postgres +# PostgreSQL Database Connection Settings +POSTGRES_USER=postgres # Database user name +POSTGRES_PASSWORD=postgres # Database password +POSTGRES_HOST=remnawave-tg-shop-db # Database container name +POSTGRES_PORT=5432 # Port +POSTGRES_DB=postgres # Database name # Localization and Display -DEFAULT_LANGUAGE="ru" # or "en" -DEFAULT_CURRENCY_SYMBOL="RUB" # e.g., RUB, USD, EUR +DEFAULT_LANGUAGE="ru" # or "en" +DEFAULT_CURRENCY_SYMBOL="RUB" # e.g., RUB, USD, EUR # External Links -SUPPORT_LINK=https://t.me/your_support_link -SERVER_STATUS_URL=https://status.yourdomain.tld/status/your_service -TERMS_OF_SERVICE_URL=https://example.com/tos -SUBSCRIPTION_MINI_APP_URL= -START_COMMAND_DESCRIPTION= -DISABLE_WELCOME_MESSAGE= +SUPPORT_LINK=https://t.me/your_support_link # Link to the support chat +SERVER_STATUS_URL=https://status.yourdomain.tld/status/your_service # Link to the server status page +TERMS_OF_SERVICE_URL=https://example.com/tos # Link to the terms of service +SUBSCRIPTION_MINI_APP_URL= # URL of the subscription mini-app +START_COMMAND_DESCRIPTION= # Description of the /start command +DISABLE_WELCOME_MESSAGE= # Disable the welcome message # Webhook Base URL (used for Telegram and payment providers) WEBHOOK_BASE_URL=https://webhooks.yourdomain.tld # YooKassa Payment Gateway Configuration -YOOKASSA_SHOP_ID=your_shop_id -YOOKASSA_SECRET_KEY=your_secret_key -YOOKASSA_RETURN_URL=https://t.me/your_bot -YOOKASSA_DEFAULT_RECEIPT_EMAIL=your_email@example.com -YOOKASSA_VAT_CODE=1 -YOOKASSA_PAYMENT_MODE=full_prepayment -YOOKASSA_PAYMENT_SUBJECT=payment +YOOKASSA_SHOP_ID=your_shop_id # Your store ID in YooKassa +YOOKASSA_SECRET_KEY=your_secret_key # Your secret key for YooKassa +YOOKASSA_RETURN_URL=https://t.me/your_bot # URL to which the user will be returned after payment +YOOKASSA_DEFAULT_RECEIPT_EMAIL=your_email@example.com # Default email for sending receipts +YOOKASSA_VAT_CODE=1 # VAT code +YOOKASSA_PAYMENT_MODE=full_prepayment # Payment mode (e.g., full prepayment) +YOOKASSA_PAYMENT_SUBJECT=payment # Payment subject # CryptoBot Payment Gateway Configuration -CRYPTOPAY_TOKEN= -CRYPTOPAY_NETWORK=mainnet -CRYPTOPAY_CURRENCY_TYPE=fiat -CRYPTOPAY_ASSET=RUB +CRYPTOPAY_TOKEN= # API token for CryptoPay +CRYPTOPAY_NETWORK=mainnet # Network (mainnet or testnet) +CRYPTOPAY_CURRENCY_TYPE=fiat # Currency type (fiat or crypto) +CRYPTOPAY_ASSET=RUB # Asset, e.g., RUB, BTC, USDT # Tribute Payment Gateway Configuration -TRIBUTE_API_KEY= # API key for verifying Tribute webhook signatures -TRIBUTE_SKIP_NOTIFICATIONS=True # Skip renewal notifications for Tribute payments -TRIBUTE_SKIP_CANCELLATION_NOTIFICATIONS=False # Skip cancellation notifications for Tribute payments +TRIBUTE_API_KEY= # API key for verifying Tribute webhook signatures +TRIBUTE_SKIP_NOTIFICATIONS=True # Skip renewal notifications for Tribute payments +TRIBUTE_SKIP_CANCELLATION_NOTIFICATIONS=False # Skip cancellation notifications for Tribute payments # Payment Method Toggles -YOOKASSA_ENABLED=True -STARS_ENABLED=True -TRIBUTE_ENABLED=True -CRYPTOPAY_ENABLED=True +YOOKASSA_ENABLED=True # Turn on YOOKASSA +STARS_ENABLED=True # Turn on STARS +TRIBUTE_ENABLED=True # Turn on TRIBUTE +CRYPTOPAY_ENABLED=True # Turn on CRYPTOPAY -# Subscription Options +# Subscription Options. Specify cost parameters or payment links here. 1_MONTH_ENABLED=True RUB_PRICE_1_MONTH=150 STARS_PRICE_1_MONTH=0 @@ -71,59 +72,61 @@ STARS_PRICE_12_MONTHS=0 TRIBUTE_LINK_12_MONTHS= # Subscription Notifications -SUBSCRIPTION_NOTIFICATIONS_ENABLED=True -SUBSCRIPTION_NOTIFY_ON_EXPIRE=True -SUBSCRIPTION_NOTIFY_AFTER_EXPIRE=True -SUBSCRIPTION_NOTIFY_DAYS_BEFORE=3 +SUBSCRIPTION_NOTIFICATIONS_ENABLED=True # Enable subscription +SUBSCRIPTION_NOTIFY_ON_EXPIRE=True # Notify on subscription +SUBSCRIPTION_NOTIFY_AFTER_EXPIRE=True # Notify after +SUBSCRIPTION_NOTIFY_DAYS_BEFORE=3 # Days before expiration to notify -REFERRAL_ONE_BONUS_PER_REFEREE=False +REFERRAL_ONE_BONUS_PER_REFEREE=False # Give a bonus only once per referee # Referral Bonus Days +# Bonus for the inviting user REFERRAL_BONUS_DAYS_1_MONTH=3 REFERRAL_BONUS_DAYS_3_MONTHS=7 REFERRAL_BONUS_DAYS_6_MONTHS=15 REFERRAL_BONUS_DAYS_12_MONTHS=30 +# Invited User Bonus REFEREE_BONUS_DAYS_1_MONTH=1 REFEREE_BONUS_DAYS_3_MONTHS=3 REFEREE_BONUS_DAYS_6_MONTHS=7 REFEREE_BONUS_DAYS_12_MONTHS=15 # Panel API Configuration -PANEL_API_URL=http://your_panel_api_url/api -PANEL_API_KEY=your_panel_api_key -PANEL_WEBHOOK_SECRET= # secret used to verify panel webhook signatures +PANEL_API_URL=http://your_panel_api_url/api # URL of the panel API +PANEL_API_KEY=your_panel_api_key # Panel API key +PANEL_WEBHOOK_SECRET= # secret used to verify panel webhook signatures # User traffic limits (applied for all users) # 0 means unlimited -USER_TRAFFIC_LIMIT_GB=0 -USER_TRAFFIC_STRATEGY="NO_RESET" +USER_TRAFFIC_LIMIT_GB=0 # Traffic limit for users (0 unlimited) +USER_TRAFFIC_STRATEGY="NO_RESET" # Traffic reset strategy (NO_RESET, WEEK, MONTH) # Default Internal Squads for Users (Optional, comma-separated UUIDs) USER_SQUAD_UUIDS=uuid1,uuid2,uuid3 # Trial Settings -TRIAL_ENABLED=True -TRIAL_DURATION_DAYS=5 -TRIAL_TRAFFIC_LIMIT_GB=0 # 0 for unlimited -TRIAL_TRAFFIC_STRATEGY="NO_RESET" +TRIAL_ENABLED=True # Enable the trial period +TRIAL_DURATION_DAYS=5 # Duration of the trial period in days +TRIAL_TRAFFIC_LIMIT_GB=0 # Traffic limit for the trial period (0 = unlimited) +TRIAL_TRAFFIC_STRATEGY="NO_RESET" # Traffic reset strategy for the trial period (NO_RESET, WEEK, MONTH) # Web Server Settings (for handling webhooks) WEB_SERVER_HOST="0.0.0.0" WEB_SERVER_PORT=8080 # Admin Panel Log Pagination -LOGS_PAGE_SIZE=10 +LOGS_PAGE_SIZE=10 # Number of events in the log # Admin Logging Configuration -LOG_CHAT_ID=-1001234567890 # Telegram chat/group ID for admin notifications -LOG_THREAD_ID= # Optional: Thread ID for supergroup messages -LOG_NEW_USERS=True -LOG_PAYMENTS=True -LOG_PROMO_ACTIVATIONS=True -LOG_TRIAL_ACTIVATIONS=True -LOG_SUSPICIOUS_ACTIVITY=True +LOG_CHAT_ID=-1001234567890 # Telegram chat/group ID for admin notifications +LOG_THREAD_ID= # Optional: Thread ID for supergroup messages +LOG_NEW_USERS=True # Log new user registrations +LOG_PAYMENTS=True # Log payments +LOG_PROMO_ACTIVATIONS=True # Log promo code activations +LOG_TRIAL_ACTIVATIONS=True # Log trial activations +LOG_SUSPICIOUS_ACTIVITY=True # Log suspicious activity -# Inline Mode Thumbnails +# Embedded mode thumbnails. Please don't touch this. INLINE_REFERRAL_THUMBNAIL_URL=https://cdn-icons-png.flaticon.com/512/1077/1077114.png INLINE_USER_STATS_THUMBNAIL_URL=https://cdn-icons-png.flaticon.com/512/681/681494.png INLINE_FINANCIAL_STATS_THUMBNAIL_URL=https://cdn-icons-png.flaticon.com/512/2769/2769339.png