- ✅ Create/close tickets with auto-categorization (support, purchase, bug, refund)
- ✅ NEW: Assign tickets to specific support staff
- ✅ Auto-close after 15 minutes of inactivity
- ✅ DM notifications when staff replies or closes ticket
- ✅ Per-staff statistics and overall performance metrics
- ✅ Full logging to configured channel
- ✅ Product catalog with dropdown select menu
- ✅ Per-user shopping cart
- ✅ NEW: Complete checkout with VietQR payment QR codes
- ✅ Auto-updating embed when stock changes
- ✅ Restock notifications to dedicated channel
- ✅ Full logging of all shop activities
- ✅ VietQR Integration - Auto-generate QR codes for Vietnamese banks
- ✅ Order Management - Track all orders with status (pending/completed/failed/cancelled)
- ✅ Payment Confirmation - Support staff confirm payments with button click
- ✅ Auto Notifications - Ping support and DM customer when payment confirmed
- ✅ Fallback to manual payment if VietQR not configured
- ✅ Personal Vouchers - Each user has their own unique vouchers
- ✅ Percentage or Fixed Discount - Flexible discount types
- ✅ Usage Limits - Control how many times vouchers can be used
- ✅ Expiration Dates - Set voucher expiry
- ✅ Min/Max Purchase - Minimum purchase amount and maximum discount cap
- ✅ Auto-Apply - Automatically apply during checkout
- ✅ Bundle Products - Create combos with multiple products
- ✅ Percentage Discounts - Set discount percentage for combos
- ✅ Stock Management - Track combo stock separately
- ✅ Price Comparison - Show original vs combo price
- ✅ Role-Based Notifications - Ping specific role for announcements
- ✅ New Product Announcements - Notify customers about new products
- ✅ Flash Sales - Create flash sale announcements with duration
- ✅ Rich Embeds - Professional-looking announcements
- ✅ Real-time product updates using MongoDB Change Streams (with polling fallback)
- ✅ Comprehensive order history for customers
- ✅ Support performance tracking
- ✅ Auto-restock notifications
- ✅ Complete audit logging
- Python 3.10+
- Discord Bot with appropriate intents enabled (Members, Messages, Guilds)
- MongoDB (Atlas or self-hosted)
- Replica Set recommended for Change Streams
- Polling fallback available for standalone instances
# Install dependencies
pip install -r requirements.txtCopy .env.example to .env and fill in your values:
DISCORD_TOKEN=
MONGO_URI=
MONGO_DB=
# VietQR/Payment
VIETQR_BANK_ID=970422
VIETQR_ACCOUNT_NO=your_account_number
VIETQR_ACCOUNT_NAME=YOUR NAME
VIETQR_TEMPLATE_ID=compact
# Payment Webhook (auto-detect payment)
PAYMENT_WEBHOOK_ENABLED=false
PAYMENT_WEBHOOK_SECRET=your_webhook_secret_key
PAYMENT_WEBHOOK_PORT=8080
PAYMENT_WEBHOOK_URL="http://localhost:8080/webhook/payment"
# Optional: Default guild for quicker initial setup (not working)
DEFAULT_GUILD_ID=
python migrate.pypython test_imports.pypython test_webhook.pypython bot.py/setup
ticket_category: Select category for tickets
support_role: Select support staff role
shop_channel: Select shop display channel
restock_channel: Select restock notification channel
logs_channel: Select audit log channel
/shop_setup
This creates the shop message with product dropdown and buttons.
/announce_role_set @CustomerRole
Set the role to ping for announcements.
/product_add "Product Name" "Description" 100000 50
Add products to your shop (price in VND, stock quantity).
- FEATURES.md - Complete feature documentation with examples
- QUICKSTART.md - Quick reference guide for all commands
- CHANGELOG.md - Detailed changelog of all updates
/ticket <subject> # Create support ticket
/checkout [voucher] # Checkout cart with optional voucher
/order_history # View order history
/order_detail <order_id> # View specific order details
/voucher_list # View your available vouchers
/combo_list # View available combos
/ticket_assign @staff # Assign ticket to staff member
/ticket_close [reason] # Close current ticket
/ticket_stats # View ticket statistics
- Payment Confirmation Button in order tickets
# Product Management
/product_add name desc price stock
/product_stock name new_stock
/product_toggle name true/false
/product_restock name +amount
# Voucher Management
/voucher_create @user type value [options]
/voucher_deactivate code
# Combo Management
/combo_create name desc "prod1,prod2" discount% stock
/combo_toggle name active
/combo_stock name stock
# Announcements
/announce_new_product product message
/announce_flash_sale title desc minutes
- Customer adds products to cart
- Customer runs
/checkout [voucher] - Bot generates QR code with VietQR API
- Bot creates order + ticket with invoice embed
- Customer scans QR and transfers money
- Support staff verifies payment
- Support clicks "✅ Xác nhận đã thanh toán" button
- Bot updates order status and notifies everyone
- Support delivers product/key
- Support closes ticket
- Personal vouchers - Each user gets unique vouchers
- Flexible discounts - Percentage or fixed amount
- Smart validation - Automatic checks for expiry, usage limits, minimum purchase
- Seamless integration - Just add voucher code during checkout
- Bundle products - Group multiple products together
- Attractive pricing - Show savings vs buying individually
- Independent stock - Track combo availability separately
config- Bot configurationtickets- Support ticketsproducts- Product catalogcarts- User shopping cartsorders- Order history and trackingvouchers- Personal discount voucherscombos- Product combo bundleslogs- System audit logs
- ✅ Role-based permission checks
- ✅ Personal voucher system (no sharing)
- ✅ Order access control (owner or support only)
- ✅ Payment confirmation requires support role
- ✅ Input validation on all user inputs
- ✅ Proper error handling throughout
Perfect for:
- Discord server shops
- Gaming communities selling items/keys
- Digital product sales
- Service-based businesses
- Community fundraising
- Event ticket sales
- Review CHANGELOG.md for version history
- 16 new files created
- 5 existing files updated
- 15+ new commands added
- 3 new database collections
- 8 major features implemented
✨ 8 Major New Features:
- Ticket assignment system
- VietQR payment integration
- Complete order management
- Personal voucher system
- Combo & discount system
- Announcement system
- Enhanced restock notifications
- Payment confirmation workflow
See CHANGELOG.md for complete details.
This project is created for educational and commercial use.
Built with:
- discord.py - Discord API wrapper
- pymongo - MongoDB driver
- VietQR - Vietnamese QR payment standard
Made with ❤️ for Lime Store Version 2.0.0 - Complete E-Commerce Solution