Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@robinbraemer
Copy link
Member

Integrate WidgetBot Discord to embed live chat directly on the VitePress website, enhancing user engagement by allowing interaction without leaving the page.


📋 Setup Instructions

What is WidgetBot?

WidgetBot replaces your simple Discord link button with a fully embedded Discord chat widget. Users can now interact with your Discord community directly from the website without leaving the page!

⚡ Quick Setup (5 minutes)

Step 1: Enable Discord Developer Mode

  • Open Discord → User Settings → Advanced → Enable "Developer Mode"

Step 2: Get Your Discord IDs

  • Right-click your Discord server → Copy ID (this is your serverId)
  • Right-click the channel you want to embed → Copy ID (this is your channelId)

Step 3: Add WidgetBot Bot to Your Server

Step 4: Update Configuration

Edit .web/docs/.vitepress/widgetbot.config.ts:

export const widgetBotConfig = {
  serverId: 'YOUR_SERVER_ID_HERE',     // ← Replace with your server ID
  channelId: 'YOUR_CHANNEL_ID_HERE',   // ← Replace with your channel ID
  color: '#646cff',
  position: ['bottom', 'right'] as [string, string],
};

Step 5: Test It

cd .web
pnpm install
pnpm dev

Look for the Discord icon in the bottom-right corner! Click it to see your embedded Discord chat.


🎨 Features

For Your Visitors

  • 💬 Live Discord chat embedded directly in the website
  • 🔔 Notification indicators when new messages arrive
  • 📖 Read messages without logging in
  • ✍️ Log in with Discord to participate
  • 📱 Works on mobile and desktop

For You

  • ✅ No backend required - fully client-side
  • ✅ Uses your existing Discord infrastructure
  • ✅ Free to use
  • ✅ Matches your theme colors automatically
  • ✅ Zero additional dependencies

🎯 Recommended Channel Setup

  1. Create a dedicated channel like #website-chat or #support
  2. Make it public so website visitors can see it
  3. Pin a welcome message for Discord users
  4. Ensure you have active moderators
  5. Consider this channel as your public-facing support channel

📚 Full Documentation

Complete setup guide with troubleshooting, customization options, and best practices is available in:
.web/WIDGETBOT_SETUP.md


✅ Build Tested

The integration has been tested and builds successfully:

✓ building client + server bundles...
✓ rendering pages...
✓ generating sitemap...
build complete in 18.07s.

🔧 Customization Examples

Change widget position:

position: ['bottom', 'left']   // Bottom-left
position: ['top', 'right']     // Top-right

Change widget color:

color: '#5865F2'  // Discord brand color
color: '#YOUR_BRAND_COLOR'  // Your custom color

📞 Support Resources


The widget is now integrated and ready to use once you configure your Discord server and channel IDs! 🚀


Open in Cursor Open in Web

@cursor
Copy link

cursor bot commented Oct 9, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 9, 2025

Deploying gate-minekube with  Cloudflare Pages  Cloudflare Pages

Latest commit: b5dfa56
Status: ✅  Deploy successful!
Preview URL: https://50412606.gate-minekube.pages.dev
Branch Preview URL: https://cursor-integrate-widgetbot-d.gate-minekube.pages.dev

View logs

- Added a new Discord community section to the LandingAfter component, featuring an embedded Discord widget for community engagement.
- Removed the WidgetBot component and its related configuration files, streamlining the integration process.
- Updated VitePress configuration to support the new widget and adjusted component imports accordingly.
…tats integration

- Deleted the WidgetBot setup guide to streamline documentation.
- Updated the LandingAfter component to dynamically display community statistics for Discord members and GitHub stars.
- Introduced a shared communityStats object for better data management across components.
@robinbraemer robinbraemer marked this pull request as ready for review October 24, 2025 09:59
@robinbraemer robinbraemer merged commit 0476abb into master Oct 24, 2025
7 checks passed
@robinbraemer robinbraemer deleted the cursor/integrate-widgetbot-discord-into-vitepress-website-fc07 branch October 24, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants