A high-performance, resilient bot that bridges Whop Chats with Discord Webhooks in real-time.
| Feature | Description |
|---|---|
| ⚡ Real-Time Polling | Monitors Whop chats with a customizable 3-second heartbeat. |
| 🛡️ Smart Deduplication | Uses persistent state (.message-state.json) to guarantee 0% message duplication. |
| 🖼️ Rich Media Support | Automatically detects and renders images in Discord embeds. |
| 🚦 Rate Limit Control | Intelligent 500ms throttling queue to respect Discord API limits. |
| 🔐 Secure Config | Enterprise-grade configuration using .env variables. |
Source: Whop Chat The bot captures every user interaction, including text repeats and images.
Destination: Discord Channel Messages arrive instantly, reflecting the exact state of the source.
- Node.js (v16 or higher)
- NPM or Yarn
git clone https://github.com/Jaycee1996/Whop-and-Discord-Realtime-Message-Bot.git
cd Whop-and-Discord-Realtime-Message-Bot
npm installCreate a .env file in the root directory:
# 🔑 Whop Configuration
WHOP_API_KEY=apik_your_app_key_here
WHOP_CHANNEL_ID=chat_feed_your_feed_id_here
# 🔗 Discord Configuration
DISCORD_WEBHOOK_URL=https://discord.com/api/webhooks/your_webhook_urlTip: You can find the
WHOP_CHANNEL_IDby inspecting the Network tab in your browser while viewing the chat (look forchat_feed_...).
# Development Mode
npm run dev
# Production Mode
npm startThe system consists of three core modules:
whopMessages.ts: Handles authentication and fetches generic messages from the Whop GraphQL API.discordWebhook.ts: Manages the webhook payload construction and enforces the 500ms delay.index.ts: Orchestrates the polling loop and manages the lifecycle/graceful shutdowns.
Contributions are welcome! Please open an issue or submit a pull request for any improvements.
This project is licensed under the MIT License.

