This is a Telegram bot implemented using the aiogram library in Python. The bot manages user authorization, admin privileges, and various commands for communication and user management.
-
Clone the repository:
git clone <repository_url>
-
Navigate to the cloned directory:
cd <cloned_directory>
-
Install dependencies using
requirements.txt
:pip install -r requirements.txt
-
Docker setup:
Docker configuration is already included in the repository. You can directly build and run the Docker container if you prefer to deploy using Docker.
-
Build Docker image:
docker build -t telegram-bot .
-
Run Docker container:
docker run -d telegram-bot
-
-
Obtain a bot token from Bot Father on Telegram.
-
Set the obtained token in the
TOKEN
variable within the code. -
Set the
creator
variable to your Telegram user ID. -
Customize admin usernames and any other configurations as needed.
-
Run the bot script:
python <bot_script_name>.py
/allow <user_id>
: Authorize a user./deny <user_id>
: Deny authorization for a user./help
: Display help message./admin <user_id>
: Grant admin privileges to a user (only accessible to the creator)./text <message>
: Send a message to all authorized users./textto <user_id> <message>
: Send a message to a specific user./users
: Display list of authorized users./all
: Display all user nicknames./banned
: Display list of banned users./save
: Save data to files./ban <user_id>
: Ban a user./free <user_id>
: Release a user from ban./delete <user_id>
: Delete a user.
This project is licensed under the MIT License.
Contributions to improve and extend the functionality of this bot are welcome. If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.