Skip to content

eiirn/luckeverydaybot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

79 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Cash Splash Bot 🌟

A Telegram bot that creates daily lucky draws for users. Players send stars to enter the pool, and every day at 23:59 UTC, a winner is randomly selected to receive the pooled prize (minus a small platform fee).

Features

  • πŸ’« Daily lucky draw system
  • πŸ’° User balance management
  • 🎟️ Fair random winner selection
  • πŸ“Š Transaction tracking
  • πŸ† User statistics and history
  • πŸ‘₯ Referral system
  • πŸ”„ Real-time updates with Supabase

Technology Stack

Setup

Prerequisites

  • Dart SDK
  • Supabase account and project
  • Telegram Bot Token (from @BotFather)

Environment Setup

  1. Clone the repository

    git clone https://github.com/eiirn/luckeverydaybot.git
    cd luckeverydaybot
  2. Install dependencies

    dart pub get
  3. Create a .env file in the root directory. Check the .env.sample file.

Database Setup

  1. Check the lib/models/ to create a db structure matching it.

Running the Bot

dart run bin/main.dart

Database Schema

Users Table

Tracks user information and statistics.

Transactions Table

Records all star transfers between users and the bot.

Pool Table

Manages daily pool entries and winners.

Bot Commands

  • /start - Start the bot and get a welcome message
  • /join - To join today's pool
  • /today - View today's stats (winnings, participations, etc.)
  • /help - Get help with bot usage
  • /invite - Get your referral link

How It Works

  1. Users send stars to the bot to participate in the daily pool
  2. Each star sent is recorded as a transaction
  3. At 23:59 UTC, the bot randomly selects a winner
  4. The winner receives the pool prize minus the platform fee (15%)
  5. A new pool starts for the next day

Contributing

Contributions are welcome! Please feel free to submit a Pull Request or open an issue.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • Televerse - Telegram Bot API framework for Dart
  • Supabase - Open source Firebase alternative

About

An everyday star-drawing game! The Bot will send gifts to the one winner everyday selected at 23:59 GMT!

Topics

Resources

License

Stars

Watchers

Forks

Packages