Skip to content

default034/UserBot-GiftsBuyer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⭐ Userbot GiftBuyer

Python Telethon License: MIT

A simple bot written in Python using the Telethon library to automatically monitor and purchase Star Gifts in Telegram. The project was created for personal use but can be easily configured for your tasks.


🚀 Features

  • Automatic Gift Detection: Periodically checks for new Star Gifts available for purchase.
  • Flexible Filtering: Allows you to configure criteria for purchasing, such as price, limited status, and availability.
  • Automated Purchasing: Automatically buys selected gifts for a predefined list of recipients.
  • Real-time Logging: Provides detailed logs of its actions, both in the console and in a specified Telegram chat.
  • Balance Control: Tracks the current star balance and stops purchasing when funds are insufficient.

🛠️ Installation

Follow these steps to set up the bot:

  1. Clone the repository:

    git clone https://github.com/default034/UserBot-GiftsBuyer.git
    cd your-repository
  2. Install the required libraries: It is recommended to use a virtual environment.

    pip install -r requirements.txt
  3. Configure the bot: Rename config.py.example to config.py and fill it with your data:

    • API_ID and API_HASH: You can get these from my.telegram.org.
    • SESSION: The name for the session file (e.g., "my_account").
    • RECIPIENTS: A list of usernames or IDs of the users to whom gifts will be sent.
    • PRICE_MIN, PRICE_MAX: The price range for gifts to be purchased.
    • LOG_CHAT: The username or ID of the chat where logs will be sent.

▶️ Usage

To launch the bot, run the following command in your terminal:

python main.py

After launching, the bot will start its work, and you will see logs in the console or in the specified log chat.

Bot in Action


⚙️ Configuration Details

The config.py file allows for detailed customization of the bot's behavior:

  • POLL_INTERVAL: The interval in seconds between checks for new gifts.
  • ONLY_LIMITED: Set to True to purchase only limited gifts.
  • GIFT_TYPES: A dictionary to specify the types of gifts to buy (e.g., {"birthday": True}).
  • HIDE_NAME: Set to True to send gifts anonymously.
  • MESSAGE_TEXT: A message to be sent along with the gift.

🤝 Contributing

This project was created for personal use, but I am open to suggestions and contributions. If you have ideas for improvement or find a bug, feel free to create an Issue or a Pull Request.


📜 License

This project is distributed under the MIT License. See the LICENSE file for more information.


Telegram Contact

About

This is a Telegram UserBot aimed at automated gift purchasing according to user settings

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages