Click the banner above to watch the setup tutorial!
Features โข Quick Start โข Configuration โข Commands โข Contributing โข Support
| Feature | Description |
|---|---|
| ๐ฐ Slot Creation | Create slots with custom durations (days/months), categories, and ping limits |
| ๐ Slot Renewal | Renew existing slots with new durations seamlessly |
| โณ Slot Extension | Extend slot duration without resetting the channel |
| ๐ Slot Transfer | Transfer slot ownership between users |
| โธ๏ธ Hold / Unhold | Temporarily freeze slots during investigations |
| ๐ซ Slot Revocation | Revoke slots with automatic role & permission cleanup |
| ๐ข Ping Management | Configurable ping counts with automatic 24-hour resets + cooldowns |
| โฐ Auto-Expiry | Background task automatically expires and locks slots hourly |
| Warn slot owners with DM notifications and tracking | |
| ๐ซ Blacklist System | Blacklist users from receiving slots with auto-revocation |
| ๐ Advanced Statistics | Detailed stats with progress bars, 24h activity, warnings, and more |
| ๐ Leaderboard | Rank slots by remaining time with medal display |
| ๐ Activity History | Track all slot actions with timestamps |
| ๐ Audit Logging | All actions logged to a dedicated channel and log file |
| ๐ง Setup Wizard | Interactive first-time configuration command |
| โก Slash Commands | Modern Discord slash commands alongside prefix commands |
| ๐ก๏ธ Role-Based Access | Staff-only commands with proper permission checks |
| Graceful error handling with cooldown support | |
| ๐ฃ Nuke Command | Clear slot channels while preserving bot embeds |
| ๐ข Announcements | Staff can send formatted announcement embeds |
| ๐ Server Info | Detailed server information display |
| โฑ๏ธ Uptime Tracking | Real-time bot uptime monitoring |
| ๐ซ Ticket System | Create support tickets with buttons, auto-transcripts on close, DM delivery |
| ๐๏ธ Redeem Codes | Generate redeemable codes that auto-create slots with set duration/pings |
- Go to the Discord Developer Portal
- Click "New Application" โ give it a name โ click "Create"
- Go to the "Bot" tab โ click "Add Bot"
- Under "Privileged Gateway Intents", enable:
- โ Presence Intent
- โ Server Members Intent
- โ Message Content Intent
- Click "Reset Token" โ copy the token (you'll need it later)
- Go to "OAuth2" โ "URL Generator"
- Select scopes:
bot,applications.commands - Select permissions:
Administrator - Copy the generated URL and open it in your browser
- Select your server and authorize
Create these in your Discord server:
- 2 Categories for slot channels (e.g., "Slots Category 1" and "Slots Category 2")
- 1 Staff Role for bot managers
- 1 Premium/Buyer Role for slot holders
- 1 Slot Role (additional role for slot holders)
- 1 Log Channel for audit logs (optional but recommended)
๐ก Tip: Enable Developer Mode in Discord (
Settings โ Advanced โ Developer Mode) to copy IDs by right-clicking.
# Clone the repository
git clone https://github.com/codewithriza/SlotBot.git
cd SlotBot
# Create a virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure the bot (see next section)
# Then run:
python3 main.pyOnce the bot is running with just the token set, use the setup wizard in Discord:
,setup
This will interactively ask you for all the IDs and save them to config.json!
Edit config.json with your values:
{
"token": "YOUR_BOT_TOKEN_HERE",
"prefix": ",",
"staffrole": 123456789,
"premiumeroleid": 123456789,
"guildid": 123456789,
"categoryid_1": 123456789,
"categoryid_2": 123456789,
"slot_role_id": 123456789,
"log_channel_id": 123456789,
"default_ping_count": 3,
"ping_reset_hours": 24
}| Key | Description | Required |
|---|---|---|
token |
Your Discord bot token | โ |
prefix |
Command prefix (default: ,) |
โ |
staffrole |
Staff role ID | โ |
premiumeroleid |
Premium/buyer role ID | โ |
guildid |
Your server ID | โ |
categoryid_1 |
First slot category ID | โ |
categoryid_2 |
Second slot category ID | โ |
slot_role_id |
Slot holder role ID | โ |
log_channel_id |
Audit log channel ID | Optional |
default_ping_count |
Default pings per slot | Optional |
ping_reset_hours |
Hours between ping resets | Optional |
ticket_category_id |
Category ID for ticket channels | Optional |
Option 1: Set in config.json (keep the file private!)
{ "token": "your_token_here" }Option 2: Environment variable (recommended for production)
export SLOTBOT_TOKEN="your_token_here"
python3 main.pyImportant
Never commit your bot token to Git! The .gitignore is configured to protect sensitive files.
| Command | Description | Example |
|---|---|---|
,create |
Create a new slot | ,create @user 7 d 3 category1 Shop |
,renew |
Renew an existing slot | ,renew @user #channel 30 d |
,extend |
Extend slot duration | ,extend @user 7 d |
,transfer |
Transfer slot ownership | ,transfer @from @to |
,revoke |
Revoke a user's slot | ,revoke @user #channel |
,hold |
Put slot on hold | ,hold |
,unhold |
Remove hold | ,unhold |
,add |
Add slot role | ,add @user |
,remove |
Remove slot role | ,remove @user |
,delete |
Delete slot channel | ,delete |
,warn |
Warn a slot owner | ,warn @user Inactive |
,blacklist |
Blacklist a user | ,blacklist @user Scammer |
,unblacklist |
Remove from blacklist | ,unblacklist @user |
,slotinfo |
View slot details | ,slotinfo #channel |
,slots |
List all slots | ,slots |
,announce |
Send announcement | ,announce Sale today! |
,setup |
Setup wizard | ,setup |
,ticket |
Send ticket panel with button | ,ticket |
,closeticket |
Close current ticket | ,closeticket |
,createredeem |
Create a redeem code | ,createredeem 7 d 3 category1 1 |
,redeems |
List all redeem codes | ,redeems |
,deleteredeem |
Delete a redeem code | ,deleteredeem CODE |
| Command | Description | Example |
|---|---|---|
,ping |
Ping in your slot | ,ping everyone |
,nuke |
Clear slot messages | ,nuke |
,myslot |
View your slot | ,myslot |
,stats |
Bot statistics | ,stats |
,uptime |
Bot uptime | ,uptime |
,serverinfo |
Server information | ,serverinfo |
,leaderboard |
Slot leaderboard | ,leaderboard |
,history |
Recent activity | ,history |
,redeem |
Redeem a code for a slot | ,redeem XXXX-XXXX-XXXX |
| Command | Description |
|---|---|
/ping |
Check bot latency |
/slotinfo |
View slot information |
/stats |
View bot statistics |
/myslot |
View your slot |
/serverinfo |
Server information |
/leaderboard |
Slot leaderboard |
SlotBot/
โโโ main.py # Main bot file with all commands
โโโ config.json # Bot configuration
โโโ data.json # Slot expiry data
โโโ pingcount.json # Ping count tracking
โโโ blacklist.json # Blacklisted users
โโโ history.json # Action history log
โโโ tickets.json # Open ticket tracking
โโโ redeems.json # Redeem codes storage
โโโ slotbot.log # Runtime log file
โโโ requirements.txt # Python dependencies
โโโ .gitignore # Git ignore rules
โโโ .env.example # Environment variable template
โโโ CONTRIBUTING.md # Contribution guidelines
โโโ LICENSE # MIT License
โโโ README.md # This file
โโโ image/
โโโ banner.png # Project banner
โโโ slotbotthumbnail.png
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโ
โ Staff runs โโโโโโถโ Bot validates โโโโโโถโ Channel created โ
โ ,create โ โ & checks blacklistโ โ with permissions โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโ
โ Roles assigned โ
โ Rules posted โ
โ Info embed sent โ
โ History logged โ
โโโโโโโโโโโโโโโโโโโโ
โ
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Background Tasks Run โ
โ โข Expire check (1hr) โ
โ โข Ping reset (24hr) โ
โ โข Auto role cleanup โ
โ โข Audit log updates โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Note
The bot needs Administrator permissions and should be positioned above the slot roles in the role hierarchy.
Tip
Use the ,setup command for easy first-time configuration instead of manually editing config.json.
Tip
Set up a dedicated log channel to track all slot actions with timestamps.
Warning
Create two separate categories in your Discord server before running the bot.
Caution
Users with 3+ warnings should be reviewed for potential slot revocation.
Contributions are welcome! Please read our Contributing Guide for details.
If you find this project useful, please consider giving it a star on GitHub! ๐