Skip to content

Runixe786/GiveawayBot

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GiveawayBot

Manage giveaways on Telegram using a simple pyrogram script :D

Features

  1. Easy Registration: The bot can manage and handle the registrations using a simple inline button.
  2. Time Limit: Each giveaway can have a custom time limit.
  3. Redeem Feature: Winners can redeem their prizes in their DM.
  4. Redeem time limit: Each giveaway can have custom time limit to redeem prizes through bot's DM (equivalent to auto-abort time).
  5. Winner Selection: The bot randomly selects winners from the participants.
  6. Winner Announcements: The bot sends a message to the group announcing the winners.
  7. Logging: The bot logs important events like the start of the timer and the sending of the winner list.
  8. Prelim Execution: Execute a few database commands before starting the main script
  9. Testing Mode: Use the bot in a testing environment (a seperate test channel and group) to avoid spamming the main group
  10. On-Demand Abort: Abort the giveaway at any time
  11. Unused Codes: Get a list of unused codes
  12. Blacklisting: Blacklist users from participating in the giveaway

Prerequisites

  • pyrogram
  • tgcrypto (optional but recommened for faster perf.)

Installation

  1. Download the latest release zip and extract it to a folder
  2. Open the repository folder in the terminal
  3. Install the requirements: pip install -r requirements.txt
  4. Rename varfile.rename to varfile.py

Usage

  1. Configure varfile.py with values as asked inside the file.
  2. Run the script: python main.py
  3. Add the bot to the groupchat of the channel and the channel and give it messaging permissions
  4. Use /settime 24 to set giveaway time to 24 hours but you can configure it with any number you want
  5. Send the bot a giveaway post
  6. Send the bot giveaways codes (one code per line)

Commands

  • /unused: Get a list of unused codes
  • /settime <time>: Set the time limit for the giveaway
  • /ban <user_id>: Ban a user from participating in the giveaway
  • /unban <user_id>: Unban a user from participating in the giveaway
  • /abort: Abort the giveaway
  • /stats: Get the stats from Database

License

This project is licensed under the Mozilla Public License Version 2.0 - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages

  • Python 100.0%