Integrate WidgetBot Discord chat widgets directly into your FeatherPanel installation. This plugin adds a floating Discord chat widget that allows users to interact with your Discord server without leaving the panel.
- Discord Chat Integration: Embed a live Discord chat widget using WidgetBot Crate
- Automatic Injection: WidgetBot automatically appears on all FeatherPanel pages (desktop only)
- Customizable: Configure button color, position, and notification settings
- Public API: Access WidgetBot configuration via public API endpoints
- Embed Support: Generate standalone embed pages for external use
- Smart Positioning: Automatically positioned to avoid collisions with other UI elements (like FeatherAI agent)
- Install the plugin through the FeatherPanel plugin manager
- Navigate to Plugins → WidgetBot in the admin panel
- Configure your Discord server and channel IDs
-
Server ID: Your Discord server ID
- To get your server ID, enable Developer Mode in Discord, right-click your server, and select "Copy Server ID"
- Make sure to invite the WidgetBot bot first: https://add.widgetbot.io/
-
Channel ID: The Discord channel ID you want to display by default
- Enable Developer Mode, right-click the channel, and select "Copy Channel ID"
- Crate Button Color: Hex color code for the WidgetBot button (e.g.,
#5865F2for Discord blue) - Crate Vertical Location: Position vertically -
top,bottom, or a pixel number - Crate Horizontal Location: Position horizontally -
left,right, or a pixel number - Enable Crate Notifications: Toggle message notifications (
trueorfalse)
Once configured, the WidgetBot Crate widget will automatically:
- Load on all FeatherPanel pages (desktop viewports only)
- Display as a floating button in the bottom-left corner (by default, positioned 150px from bottom to avoid UI collisions)
- Open a Discord chat widget when clicked
- Show your configured Discord server and channel
GET /api/public/widgetbot/config
Returns the WidgetBot configuration as JSON (no authentication required):
{
"success": true,
"data": {
"server_id": "299881420891881473",
"channel_id": "355719584830980096",
"crate_options": {
"color": "#5865F2",
"location": ["bottom", "left"],
"notifications": true
}
}
}GET /widgetbot/embed
Returns a standalone HTML page with the WidgetBot embed. Perfect for use in iframes on external sites:
<iframe
src="https://your-panel-domain.com/widgetbot/embed"
width="800"
height="600"
style="border:none;"
>
</iframe>The plugin automatically injects the WidgetBot Crate script and initializes it with your configuration:
// Automatically loaded on all pages
<script
src="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3"
async
defer
></script>;
// Initialized with your settings
new Crate({
server: "YOUR_SERVER_ID",
channel: "YOUR_CHANNEL_ID",
location: [150, "left"], // Positioned higher to avoid UI collisions
// ... other options from your configuration
});The WidgetBot Crate instance is available globally as window.WidgetBotCrate, allowing you to control it via JavaScript:
// Toggle the widget
window.WidgetBotCrate.toggle();
// Navigate to a different channel
window.WidgetBotCrate.navigate("CHANNEL_ID");
// Show a notification
window.WidgetBotCrate.notify("Hello from FeatherPanel!");
// Update options
window.WidgetBotCrate.setOptions({
color: "#22c55e",
location: ["top", "right"],
});The WidgetBot Crate button can be styled using CSS. The button is rendered in a shadow DOM, but you can target it using WidgetBot's CSS injection feature via the configuration options.
- Check Configuration: Ensure both
server_idandchannel_idare set in plugin settings - Bot Invitation: Make sure you've invited the WidgetBot bot to your Discord server: https://add.widgetbot.io/
- Desktop Only: The widget only appears on desktop viewports (width ≥ 1024px)
- Browser Console: Check the browser console for any JavaScript errors
If you see "No configuration provided" message:
- Go to Plugins → WidgetBot in the admin panel
- Fill in the required
server_idandchannel_idfields - Save the configuration
- Refresh the page
widgetbot/
├── WidgetBot.php # Main plugin class
├── conf.yml # Plugin configuration schema
├── Controllers/
│ └── WidgetBotController.php # API controllers
├── Routes/
│ └── widgetbot.php # Route definitions
├── Frontend/
│ ├── index.js # Frontend JavaScript (Crate integration)
│ ├── index.css # Plugin styles
│ └── sidebar.json # Sidebar configuration
└── README.md # This file
- PHP with PDO extension
- FeatherPanel v2
- Valid Discord server and channel IDs
- WidgetBot bot invited to your Discord server
For WidgetBot-specific issues, visit:
For plugin-specific issues, check the FeatherPanel logs or contact the plugin author.
MIT License - See the main FeatherPanel license for details.
- NaysKUtzu - Initial development
Note: This plugin uses the official WidgetBot Crate library. Make sure to comply with WidgetBot's terms of service when using this integration.