A comprehensive multi-tenant Discord marketplace platform for selling digital items (gaming accounts, profiles, and more) with web dashboards, seller management, and integrated payment systems.
- Overview
- Architecture
- Features
- Prerequisites
- Installation
- Running the Application
- Configuration
- Project Structure
- API Documentation
- Troubleshooting
- Contributing
- License
Listing Bot is a complete solution for running a digital marketplace through Discord. It allows you to:
- List and sell digital items (gaming accounts, profiles, alts)
- Manage sellers with individual permissions
- Process payments and track transactions
- Provide customer support through a ticket system
- Collect and display customer reviews (vouches)
- Run a public-facing shop website
- Monitor everything through web dashboards
┌─────────────────────────────────────────────────────────────────────┐
│ Parent API (FastAPI) │
│ Port 7000 - Main Gateway │
│ • Central Discord OAuth authentication │
│ • Routes requests to individual bot instances │
│ • Manages custom domains for white-label shops │
│ • WebSocket connections for real-time logging │
└───────────────────────────────┬─────────────────────────────────────┘
│
┌───────────────────┼───────────────────┐
│ │ │
▼ ▼ ▼
┌───────────────┐ ┌───────────────┐ ┌───────────────┐
│ Bot #1 │ │ Bot #2 │ │ Bot #N │
│ (py-cord) │ │ (py-cord) │ │ (py-cord) │
│ + Quart API │ │ + Quart API │ │ + Quart API │
│ Port: Auto │ │ Port: Auto │ │ Port: Auto │
│ SQLite DB │ │ SQLite DB │ │ SQLite DB │
└───────────────┘ └───────────────┘ └───────────────┘
┌─────────────────────────────────────────────────────────────────────┐
│ Frontend Applications │
├─────────────────────────────────────────────────────────────────────┤
│ listing-bot-dashboard/ │ Bot owner control panel (React) │
│ seller_dashboard/ │ Seller management interface (React) │
│ shop-sites/ │ Public customer shop (React) │
└─────────────────────────────────────────────────────────────────────┘
| Feature | Description |
|---|---|
| Multi-Tenant Support | Run multiple independent bot instances, each with its own database |
| Item Listings | List accounts, profiles, and alt accounts with rich details |
| Ticket System | Built-in customer support with ticket creation and transcripts |
| Vouch System | Customer review and rating system |
| Seller Management | Assign seller roles with individual payment configurations |
| AI Features | AI-powered features with a monthly credit system (150 free/month) |
| Custom Domains | White-label shop support with custom domain routing |
| Payment Tracking | Track hosting payments and transaction history |
| Browser Fingerprinting | Advanced fraud detection for user authentication |
| Real-time Logging | WebSocket-based live command and data fetch logging |
| OAuth2 Authentication | Secure Discord-based authentication for all dashboards |
Before you begin, ensure you have the following installed:
- Python 3.8 or higher - Download Python
- Node.js 16 or higher - Download Node.js
- npm (comes with Node.js)
- Git - Download Git
- A Discord Account - Create Discord Account
Open a terminal and run:
python --version
node --version
npm --version
git --versionAll commands should return version numbers without errors.
git clone https://github.com/your-username/Listing-Bot.git
cd Listing-Botcd listing-bot
# Create virtual environment
python -m venv venv
# Activate it (choose your OS)
# Windows (Command Prompt):
venv\Scripts\activate.bat
# Windows (PowerShell):
.\venv\Scripts\Activate.ps1
# macOS/Linux:
source venv/bin/activatepip install -r requirements.txtCopy the example environment file and edit it with your values:
# Copy the example file
cp env.example listing-bot/.envEdit the .env file in the listing-bot/ directory with your settings:
# Discord bot token (required)
TOKEN=your_discord_bot_token_here
# Server configuration - use your server's IP address
# For local development, use 127.0.0.1
# For production, use your server's actual IP (e.g., 192.168.1.100)
SERVER_HOST=127.0.0.1
BOT_SERVICE_HOST=127.0.0.1
PARENT_API_HOST=127.0.0.1
PARENT_API_PORT=7000
# If you have a Skyblock data API running
SKYBLOCK_API_HOST=127.0.0.1
SKYBLOCK_API_PORT=3002Replace your_discord_bot_token_here with your actual Discord bot token (see Step 3).
- Go to the Discord Developer Portal
- Click "New Application"
- Enter a name for your bot and click "Create"
- In your application, go to the "Bot" tab on the left sidebar
- Click "Add Bot" and confirm
- Under "Privileged Gateway Intents", enable:
- Presence Intent
- Server Members Intent
- Message Content Intent
- Click "Reset Token" and copy your bot token
- Paste this token in your
.envfile
- Go to the "OAuth2" tab
- Under "Redirects", add your callback URL:
- For local development:
http://localhost:7000/auth/discord/callback - For production:
https://yourdomain.com/auth/discord/callback
- For local development:
- Copy your Client ID and Client Secret (you'll need these for the Parent API)
- Go to "OAuth2" → "URL Generator"
- Select scopes:
bot,applications.commands - Select bot permissions:
- Manage Roles
- Manage Channels
- Read Messages/View Channels
- Send Messages
- Manage Messages
- Embed Links
- Attach Files
- Read Message History
- Add Reactions
- Use Slash Commands
- Copy the generated URL and open it in your browser
- Select your server and authorize the bot
cd ../parent_apipip install fastapi uvicorn aiohttp httpx python-dotenvCreate a .env file in the parent_api/ directory with the following configuration:
# API Authentication
API_KEY=your_secret_api_key_here
INTERNAL_API_KEY=your_internal_api_key_here
# Server Configuration - use your server's IP address
# For local development, use 127.0.0.1
# For production, use your server's actual IP
SERVER_HOST=127.0.0.1
BOT_SERVICE_HOST=127.0.0.1
SHOP_FRONTEND_HOST=127.0.0.1
SHOP_FRONTEND_PORT=7878
# Discord OAuth2 Configuration
DISCORD_CLIENT_ID=your_discord_client_id
DISCORD_CLIENT_SECRET=your_discord_client_secret
DISCORD_REDIRECT_URI=https://yourdomain.com/auth/discord/callback
# Session Configuration
SESSION_LIFETIME_HOURS=24Generate a secure API key (you can use any random string, e.g., from https://randomkeygen.com/).
Important: Replace yourdomain.com with your actual domain or use http://127.0.0.1:7000 for local development.
Create a ports.json file in the parent_api/ directory:
{}This file will be automatically populated when bots start.
If you want to use custom domains, create custom_domains.json:
[]Each dashboard is a React application that needs to be set up separately.
cd ../listing-bot-dashboard
# Install dependencies
npm install
# For development:
npm start
# For production build:
npm run buildcd ../seller_dashboard
# Install dependencies
npm install
# For development:
npm start
# For production build:
npm run buildcd ../shop-sites
# Install dependencies
npm install
# For development:
npm start
# For production build:
npm run buildYou'll need to run multiple services. Open separate terminal windows for each:
cd listing-bot
# Activate virtual environment
# Windows:
venv\Scripts\activate
# macOS/Linux:
source venv/bin/activate
# Run the bot
python main.pycd parent_api
# Run with uvicorn
uvicorn api:app --host 0.0.0.0 --port 7000 --reloadcd listing-bot-dashboard
npm startcd shop-sites
npm startUse the provided batch file:
cd listing-bot
launch.batFor production, you should:
- Build the React apps:
npm run buildin each frontend directory - Use a process manager like PM2 or systemd
- Set up a reverse proxy (nginx/Caddy) for HTTPS
- Use environment variables for sensitive data
Example with PM2:
# Install PM2 globally
npm install -g pm2
# Start the bot
cd listing-bot
pm2 start main.py --interpreter python --name "listing-bot"
# Start the parent API
cd ../parent_api
pm2 start "uvicorn api:app --host 0.0.0.0 --port 7000" --name "parent-api"
# Serve the built React apps with a static server
cd ../shop-sites
pm2 serve build 7878 --name "shop-frontend"The bot stores configuration in SQLite database. Key settings can be configured through Discord commands:
| Command | Description |
|---|---|
/config |
View/edit bot configuration |
/setup-email |
Set owner email for payment notifications |
The bot automatically creates and migrates the SQLite database (data/bot.db). Key tables include:
accounts- Listed accountsprofiles- Listed profilesalts- Listed alt accountsconfig- Bot configuration key-value storetickets- Support ticketsvouches- Customer reviewssellers- Registered sellersauth- User authentication tokenshosting- Payment/hosting statusai_config- AI credit tracking
Ports are automatically assigned and stored in parent_api/ports.json. The bot name (directory name) maps to its assigned port:
{
"listing-bot": 3080,
"another-bot": 3081
}Listing-Bot/
├── listing-bot/ # Main Discord bot
│ ├── api/ # Quart API endpoints
│ │ ├── GET/ # GET request handlers
│ │ ├── POST/ # POST request handlers
│ │ └── templates/ # HTML templates
│ ├── bot/ # Discord bot code
│ │ ├── cogs/ # Bot command modules
│ │ ├── util/ # Utility functions
│ │ └── trolls/ # Captcha system
│ ├── data/ # Data files and database
│ ├── emojis/ # Custom emoji images
│ ├── main.py # Entry point
│ └── requirements.txt # Python dependencies
│
├── parent_api/ # Central FastAPI gateway
│ ├── api.py # Main API application
│ ├── ports.json # Bot port mappings
│ └── templates/ # HTML templates
│
├── listing-bot-dashboard/ # Bot owner dashboard (React)
│ ├── src/
│ │ ├── components/
│ │ └── pages/
│ └── package.json
│
├── seller_dashboard/ # Seller dashboard (React)
│ ├── src/
│ │ ├── components/
│ │ └── pages/
│ └── package.json
│
├── shop-sites/ # Public shop frontend (React)
│ ├── src/
│ │ ├── components/
│ │ └── pages/
│ └── package.json
│
├── UTILITY/ # Development utilities
│
└── README.md # This file
| Endpoint | Method | Description | Auth Required |
|---|---|---|---|
/auth/discord/login |
GET | Start Discord OAuth flow | No |
/auth/discord/callback |
GET | OAuth callback handler | No |
/auth/me |
GET | Get current user info | Yes |
/auth/logout |
GET | Logout user | Yes |
/dash/{bot_name} |
GET | Get bot dashboard data | Yes (Owner) |
/api/bot/{bot_name}/config |
GET/POST | Get/update bot config | Yes (Owner) |
/api/bot/{bot_name}/listed/items |
GET | Get listed items | Yes (Owner) |
/api/seller/accounts |
GET | Get seller accounts | Yes (Seller) |
/stats/{bot_name} |
GET | Get bot statistics | No |
Each bot exposes its own API on its assigned port:
| Endpoint | Method | Description |
|---|---|---|
/stats |
GET | Bot statistics |
/config |
GET/POST | Configuration |
/listed/items |
GET | All listed items |
/auth/users |
GET | Authorized users |
/seller/get/accounts |
GET | Seller's listed items |
- Check Python version: Ensure Python 3.8+ is installed
- Check virtual environment: Make sure venv is activated
- Verify token: Check that
.envcontains a valid bot token - Check intents: Ensure all privileged intents are enabled in Discord Developer Portal
- Check if bot is running: Verify the bot process is active
- Check ports.json: Ensure the bot's port is correctly registered
- Check firewall: Ensure the port isn't blocked
- Check redirect URI: Must match exactly in Discord Developer Portal
- Check client credentials: Verify Client ID and Secret in
api.py - Check cookies: Ensure cookies are enabled in your browser
- Delete and recreate: Remove
data/bot.dbto start fresh (data will be lost) - Check permissions: Ensure write access to the
data/directory
- Clear cache: Run
npm cache clean --force - Delete node_modules: Remove and reinstall:
rm -rf node_modules && npm install - Check Node version: Ensure Node.js 16+ is installed
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
<<<<<<< Updated upstream Made with care by noemt.dev
todo: api key information
these keys should be set to the same: listing-bot\api\auth_utils.py INTERNAL_API_KEY in parent_api\api.py
APP_API_KEY in parent_api\api.py (from the env) listing-bot\bot\util\attachment_handler.py
you do require a hypixel api key from their developer dashboard enter it here: listing-bot\bot\util\constants.py
seperate process info: you need to run an instance of https://github.com/noemtdotdev/skyblock-wrapper then, enter the port (and ip if you want to test locally on the same codebase) into listing-bot\bot\util\fetch.py (this also requires a hypixel api key)
the api key you use for authentication there needs to be entered in listing-bot\bot\util\fetch.py
replace ALL localhost with the actual servers ip that you are running on to make 100% sure that it runs (it should with localhost but you can never be sure enough)
Made by noemt.dev, README.md by ash
Stashed changes