A fully automated role-based subscription management bot for Discord.
Handles subscriptions, expirations, renewals, notifications, charts, and diagnostics — all from slash commands.
- 🤝 Support Server: discord.gg/mFEehCPKEW
- 📺 YouTube: @cn_nexus
- 💖 Donate: PayPal
- 📋 Changelog: CHANGELOG.md
- 🔒 Security Policy: SECURITY.md
- Download the project in Visual Studio Code, open a terminal via ``CTRL + SHIFT + ``` and run:
npm install
- Fill in config.json with your credentials.
- Start the bot:
node index.js
If you use hosting:
- Upload the project as
.zipand extract it. - Fill in config.json.
- Run the bot from your hosting panel.
If you need help, join the support server.
💳 Subscription Management
- Full lifecycle tracking: active → expired → cancelled.
- Create, renew, cancel, and search subscriptions with a custom ID system.
- Edit any subscription field (email, password, note, end date, status) without deleting it.
📬 Smart Notifications
- DM alerts at configurable stages: 7, 3, and 1 day before expiry.
- Scheduled reminders stored in the database and delivered automatically via cron.
- Owner alerts when a user's DM fails.
📊 Charts & Statistics
/stats— comprehensive database dashboard./chart— 4 visual types: status bar, status donut, plans bar, services bar, and monthly timeline.- Rendered server-side with
@napi-rs/canvas— no external service required.
🔍 Search & Edit
/search— find any subscription bycustomId,userId,email,planName, orserviceType./edit— update fields on an existing subscription with old→new change tracking in the log.
🔬 Diagnostics
/test— instant health report: WS ping, MongoDB state, config validation, uptime, and memory.
🔒 Security & Permissions
- Owner-only access for all admin commands.
- Configurable log channels via
/setlog.
📁 Configuration
config.jsonfor credentials;setting.jsonfor behaviour, names, descriptions, and emoji palette.- Per-command enable/disable toggle via
/enable.
🕒 Auto Expiry System
- Daily midnight cron + configurable interval (default every 12 h).
- Marks expired subscriptions automatically and notifies owners.
- Hourly cron for scheduled reminder delivery.
| Command | Description | Access |
|---|---|---|
/subscribe |
Create a new subscription | 🔑 Admin |
/unsubscribe |
Cancel a subscription by custom ID | 🔑 Admin |
/renew |
Renew an existing subscription | 🔑 Admin |
/subscriptions |
Paginated list of all subscriptions with filters | 🔑 Admin |
/info |
View a user's own subscription details | 🌐 Public |
/search |
Search by ID, email, user, plan, or service type | 🔑 Admin |
/edit |
Edit email, password, note, end date, or status | 🔑 Admin |
| Command | Description | Access |
|---|---|---|
/check |
Manually run subscription expiry check | 🔑 Admin |
/remind |
Send immediate or scheduled reminder to a user | 🔑 Admin |
/announce |
Broadcast a message to all active subscribers | 🔑 Admin |
| Command | Description | Access |
|---|---|---|
/stats |
Full database statistics dashboard | 🔑 Admin |
/chart |
Generate bar, donut, or timeline charts | 🔑 Admin |
| Command | Description | Access |
|---|---|---|
/clearexpired |
Bulk delete all expired subscription records | 🔑 Admin |
/setlog |
Configure log channels | 🔑 Admin |
/enable |
Toggle any command on or off | 🔑 Admin |
/owner_add |
Add a user to the owner list | 🔑 Admin |
/owner_remove |
Remove a user from the owner list | 🔑 Admin |
/plan_add / /plan_remove |
Manage available subscription plans | 🔑 Admin |
/type_add / /type_remove |
Manage available service types | 🔑 Admin |
/help |
Paginated command reference | 🌐 Public |
/test |
Bot diagnostics (ping, DB, config validation) | 🔑 Admin |
- © 2025 Code Nexus. All rights reserved.