Discord Admin Plugin
Full Discord server administration suite for OpenClaw. Manage roles, moderate users, configure channels, handle invites and webhooks, and query audit logs — all through a single unified tool.
What it does
Registers a discord_admin tool that exposes 22 administrative actions for Discord servers. The plugin connects its own Discord.js client using your bot token and provides structured JSON responses for every operation.
Features
- Role Management — Create, edit, and delete roles with color, hoist, mentionable, and permission options
- Moderation — Kick, ban, unban, timeout, untimeout, and warn users (warnings sent via DM embed)
- Channel Admin — Lock, unlock, clone, set slowmode, and make channels private with role-based access
- Bulk Delete — Purge up to 100 messages from a channel
- Invites — Create, list, and delete server invites with max age/uses/temporary options
- Webhooks — Create, list, and delete webhooks by channel or guild
- Server Info — Fetch guild metadata including member count, boost level, channel/role counts
- Audit Log — Query audit log entries with optional action type filter
- Member List — List members with optional role filter
- Nickname Management — Set or clear member nicknames
Setup
Install the plugin and its dependencies:
clawhub install discord-admin-plugin
cd ~/.openclaw/skills/discord-admin-plugin && npm install
Configure your Discord bot token in your OpenClaw config (this is the only credential required — it is read from channels.discord.token and never sent anywhere except the Discord gateway):
{
"channels": {
"discord": {
"token": "YOUR_BOT_TOKEN"
}
}
}
Ensure your bot has the required gateway intents enabled in the Discord Developer Portal:
- Guilds
- Guild Members (privileged)
- Guild Moderation
- Guild Messages
- Guild Invites
- Guild Webhooks
Restart your gateway: openclaw gateway restart
Credentials & Permissions
This plugin requires a Discord bot token (channels.discord.token in OpenClaw config). The token is used exclusively to connect to the Discord gateway — it is never transmitted to any other endpoint.
Required bot permissions: Manage Roles, Kick Members, Ban Members, Moderate Members, Manage Channels, Manage Messages, Create Instant Invite, Manage Webhooks, View Audit Log, Manage Nicknames.
Required privileged intents: Guild Members (for member listing, kicks, timeouts, nickname changes).
Use a bot token with the minimum permissions your use case needs. Avoid using a full-admin token if you only need a subset of actions.
Actions
| Action |
Description |
role-create |
Create a new role |
role-edit |
Edit an existing role |
role-delete |
Delete a role |
kick |
Kick a member |
ban |
Ban a user |
unban |
Unban a user |
timeout |
Timeout a member (up to 28 days) |
untimeout |
Remove a timeout |
warn |
Send a warning DM embed |
bulk-delete |
Purge 2-100 messages |
channel-clone |
Clone a channel |
channel-lock |
Deny SendMessages for @everyone |
channel-unlock |
Reset SendMessages for @everyone |
channel-slowmode |
Set slowmode (0-21600s) |
channel-private |
Hide channel, grant to specific roles |
invite-create |
Create an invite |
invite-list |
List server invites |
invite-delete |
Delete an invite |
webhook-create |
Create a webhook |
webhook-list |
List webhooks |
webhook-delete |
Delete a webhook |
server-info |
Get server metadata |
audit-log |
Query audit log |
member-list |
List members |
nickname-set |
Set a member's nickname |
1---2name: discord-admin3description: Full Discord server administration suite for OpenClaw — roles, moderation, channels, invites, webhooks, audit log, and member management.4---56# Discord Admin Plugin78Full Discord server administration suite for OpenClaw. Manage roles, moderate users, configure channels, handle invites and webhooks, and query audit logs — all through a single unified tool.910## What it does1112Registers a `discord_admin` tool that exposes 22 administrative actions for Discord servers. The plugin connects its own Discord.js client using your bot token and provides structured JSON responses for every operation.1314## Features1516- **Role Management** — Create, edit, and delete roles with color, hoist, mentionable, and permission options17- **Moderation** — Kick, ban, unban, timeout, untimeout, and warn users (warnings sent via DM embed)18- **Channel Admin** — Lock, unlock, clone, set slowmode, and make channels private with role-based access19- **Bulk Delete** — Purge up to 100 messages from a channel20- **Invites** — Create, list, and delete server invites with max age/uses/temporary options21- **Webhooks** — Create, list, and delete webhooks by channel or guild22- **Server Info** — Fetch guild metadata including member count, boost level, channel/role counts23- **Audit Log** — Query audit log entries with optional action type filter24- **Member List** — List members with optional role filter25- **Nickname Management** — Set or clear member nicknames2627## Setup28291. Install the plugin and its dependencies:30 ```31 clawhub install discord-admin-plugin32 cd ~/.openclaw/skills/discord-admin-plugin && npm install33 ```34352. Configure your Discord bot token in your OpenClaw config (this is the only credential required — it is read from `channels.discord.token` and never sent anywhere except the Discord gateway):36 ```json37 {38 "channels": {39 "discord": {40 "token": "YOUR_BOT_TOKEN"41 }42 }43 }44 ```45463. Ensure your bot has the required gateway intents enabled in the Discord Developer Portal:47 - Guilds48 - Guild Members (privileged)49 - Guild Moderation50 - Guild Messages51 - Guild Invites52 - Guild Webhooks53544. Restart your gateway: `openclaw gateway restart`5556## Credentials & Permissions5758This plugin requires a **Discord bot token** (`channels.discord.token` in OpenClaw config). The token is used exclusively to connect to the Discord gateway — it is never transmitted to any other endpoint.5960**Required bot permissions:** Manage Roles, Kick Members, Ban Members, Moderate Members, Manage Channels, Manage Messages, Create Instant Invite, Manage Webhooks, View Audit Log, Manage Nicknames.6162**Required privileged intents:** Guild Members (for member listing, kicks, timeouts, nickname changes).6364Use a bot token with the minimum permissions your use case needs. Avoid using a full-admin token if you only need a subset of actions.6566## Actions6768| Action | Description |69|--------|-------------|70| `role-create` | Create a new role |71| `role-edit` | Edit an existing role |72| `role-delete` | Delete a role |73| `kick` | Kick a member |74| `ban` | Ban a user |75| `unban` | Unban a user |76| `timeout` | Timeout a member (up to 28 days) |77| `untimeout` | Remove a timeout |78| `warn` | Send a warning DM embed |79| `bulk-delete` | Purge 2-100 messages |80| `channel-clone` | Clone a channel |81| `channel-lock` | Deny SendMessages for @everyone |82| `channel-unlock` | Reset SendMessages for @everyone |83| `channel-slowmode` | Set slowmode (0-21600s) |84| `channel-private` | Hide channel, grant to specific roles |85| `invite-create` | Create an invite |86| `invite-list` | List server invites |87| `invite-delete` | Delete an invite |88| `webhook-create` | Create a webhook |89| `webhook-list` | List webhooks |90| `webhook-delete` | Delete a webhook |91| `server-info` | Get server metadata |92| `audit-log` | Query audit log |93| `member-list` | List members |94| `nickname-set` | Set a member's nickname |