Autoreply is a cross-platform desktop application built on PyQt5 that allows users to connect their Telegram and VK accounts and automatically respond to incoming messages. The app offers a rich set of features, a verbose user-friendly GUI, and flexible configuration options.
autoreply-demo.mp4
- Verbose GUI: The app provides detailed explanations of all actions and settings within the GUI.
- Multi-Account Support: Connect multiple Telegram and VK accounts, each running on separate threads.
- Tray Functionality: Minimize the app to the system tray and close it entirely from the tray icon.
- Enable/Disable Accounts: Enable or disable specific accounts at any time.
- First Message Response: Option to respond only to the first message in a chat.
- Automatic Chat Deletion: Automatically delete the chat after sending a response.
- Attachment Support: Add attachments, such as images, to reply messages.
- Proxy Configuration: Support for HTTP, SOCKS4, SOCKS5, and MTPROTO (Telegram only) proxies.
- Logging: Logs all actions and errors to separate log files.
- Google Sheets Logging: Send logs to Google Sheets for each automatic reply.
- Telegram Bot Reporting: Use a Telegram bot to send reports about autoresponses to specified chats or channels at configurable intervals.
- Multithreading: Efficiently handles tasks in parallel while maintaining a responsive GUI.
- Cross-Platform Compatibility: Runs on any platform.
- Python 3.6+
- Git
-
Clone the repository:
git clone https://github.com/Qbject/autoreply.git cd autoreply
-
Create a virtual environment:
python -m venv .venv
-
Activate the virtual environment:
- On Windows:
.venv\Scripts\activate
- On macOS/Linux:
source .venv/bin/activate
- On Windows:
-
Install dependencies:
pip install -r requirements.txt
-
Build the application using PyInstaller:
# On Windows build.bat # On macOS/Linux ./build.sh
-
The built app will be located in the
dist/Autoreply
directory. This directory is portable and contains all necessary data.
-
Run the App:
python src/autoreply.py
-
Tray Functionality:
- Minimize the main window to the system tray.
- Close the app entirely using the tray icon.
-
Data Directory:
- All app data, including Telegram sessions, Google API credentials, logs, and settings, are stored in the
data
directory.
- All app data, including Telegram sessions, Google API credentials, logs, and settings, are stored in the
-
Register your application on Telegram:
- Go to my.telegram.org.
- Log in with any Telegram account (preferably one you won't lose access to).
- Navigate to "API Development Tools" and create a new application.
- Choose "Desktop" as the platform and fill in the required fields.
- Copy the
api_id
andapi_hash
provided.
-
In the Autoreply app, input the
api_id
andapi_hash
in the corresponding fields and save the settings.
- VK does not require additional setup beyond providing the VK App ID. The default is set to Kate Mobile's App ID, but you can change it if needed.
- Create a new project in the Google Developers Console.
- Enable the Google Sheets API and Drive API for the project.
- Create a new Service Account, generate a JSON key file, and download it.
- Rename the file to
google.json
and place it in thedata
directory. - Share two Google Sheets named "Autoreply TG" and "Autoreply VK" with write access to the service account.
- Create a new bot using BotFather.
- Copy the bot token and input it into the Autoreply app.
- Specify the IDs of users or channels to receive reports, which can be obtained using @myidbot and @raw_data_bot.
- Telethon Library: Used for interfacing with the Telegram API.
- PyQt5: Provides the graphical user interface.
- Multithreading: Ensures efficient handling of multiple accounts and tasks.
- Cross-Platform: Can be run on Windows, macOS, and Linux.
- Qt Designer and UI Compilation:
- The app includes 2 UI files that can be edited using Qt Designer.
- These UI files can be compiled into Python files using the provided
compile-ui.bat
(for Windows) orcompile-ui.sh
(for macOS/Linux) scripts.
This project is licensed under the MIT License.