SuperAPI AI Directory

discord-bot

Coding & development

View repository

Updated 10-15 19:49

About this skill

Discord Bot

Discord Bot

Automate Discord server management from chat -- send messages, moderate members, manage channels and roles, create webhooks, and handle scheduled events. Powered by ClawLink for hosted OAuth so you never handle bot tokens directly.

Setup in 3 Steps

Step 1: Install Step 2: Pair Account Step 3: Connect Discord Bot
Install Pair App-specific connection GIF coming soon
Run the install command in OpenClaw Sign in and approve the device Open the dashboard and connect Discord Bot

How It Works

┌─────────────────┐     ┌──────────────┐     ┌──────────────────┐
│   OpenClaw      │────▶│   ClawLink   │────▶│  Discord API     │
│   (User Chat)   │     │   (OAuth)    │     │                  │
└─────────────────┘     └──────────────┘     └──────────────────┘

Install

openclaw plugins install clawhub:clawlink-plugin
openclaw config set tools.alsoAllow '["clawlink-plugin"]' --strict-json
openclaw gateway restart

Quick Start

// 1. List guild channels
clawlink_call_tool({ tool: "discordbot_list_guild_channels", parameters: { guild_id: "123456789" } })

// 2. Send a message
clawlink_call_tool({ tool: "discordbot_create_message", parameters: { channel_id: "987654321", content: "Hello from OpenClaw!" } })

// 3. List guild members
clawlink_call_tool({ tool: "discordbot_list_guild_members", parameters: { guild_id: "123456789", limit: 50 } })

Authentication

ClawLink handles the full OAuth flow -- no API keys or bot tokens to manage. After pairing, connect Discord Bot at claw-link.dev/dashboard?add=discord-bot.

Connection Management

// List active connections
clawlink_list_integrations()

// Verify connection works
clawlink_call_tool({ tool: "discordbot_test_auth", parameters: {} })

// Reconnect if needed
// Visit https://claw-link.dev/dashboard?add=discord-bot

Security & Permissions

  • Read tools (list, get) are safe and require no confirmation
  • Write tools (create, update, delete) require confirmation before execution
  • High-impact tools (ban, bulk delete, prune) are destructive and irreversible
  • Bot permissions depend on the roles assigned in each guild

Tool Reference

Messaging Operations

Tool Description Mode
discordbot_create_message Send a message to a channel (text, embeds, stickers, components) Write
discordbot_update_message Edit a message previously sent by the bot Write
discordbot_delete_message Permanently delete a message Write
discordbot_list_messages Retrieve messages from a channel (newest first, paginated) Read
discordbot_get_message Retrieve a specific message by ID Read
discordbot_crosspost_message Crosspost from announcement channel to followers Write
discordbot_pin_message Pin a message in a channel (max 50 pinned) Write
discordbot_unpin_message Unpin a message from a channel Write
discordbot_list_pinned_messages List all pinned messages (up to 50) Read
discordbot_trigger_typing_indicator Show bot typing indicator (lasts 10 seconds) Write

Reaction Operations

Tool Description Mode
discordbot_add_my_message_reaction Add emoji reaction from bot to a message Write
discordbot_delete_my_message_reaction Remove bot's own reaction from a message Write
discordbot_delete_user_message_reaction Remove a specific user's reaction Write
discordbot_delete_all_message_reactions Remove all reactions from a message Write
discordbot_delete_all_message_reactions_by_emoji Remove all reactions for a specific emoji Write
discordbot_list_message_reactions_by_emoji List users who reacted with a specific emoji Read

Channel Operations

Tool Description Mode
discordbot_create_guild_channel Create a new channel (text, voice, category, etc.) Write
discordbot_update_channel Update channel settings (name, topic, permissions) Write
discordbot_delete_channel Permanently delete a channel Write
discordbot_get_channel Retrieve channel metadata by ID Read
discordbot_list_guild_channels List all channels in a guild Read
discordbot_set_channel_permission_overwrite Set permission overrides for role/user in a channel Write
discordbot_delete_channel_permission_overwrite Remove channel-specific permission overrides Write
discordbot_follow_channel Follow announcement channel to relay via webhook Write

Thread Operations

Tool Description Mode
discordbot_create_thread Create a new thread in a channel Write
discordbot_create_thread_from_message Create thread from a specific message Write
discordbot_join_thread Join the authenticated user to a thread Write
discordbot_leave_thread Leave a thread Write
discordbot_add_thread_member Add a user to a thread Write
discordbot_delete_thread_member Remove a user from a thread Write
discordbot_get_thread_member Get a member from a thread Read
discordbot_list_thread_members List all members of a thread Read
discordbot_get_active_guild_threads List all active threads in a guild Read
discordbot_list_public_archived_threads List public archived threads Read
discordbot_list_private_archived_threads List private archived threads Read
discordbot_list_my_private_archived_threads List private archived threads you are in Read

Guild (Server) Operations

Tool Description Mode
discordbot_create_guild Create a new guild (bot must be in fewer than 10 guilds) Write
discordbot_update_guild Update guild settings (name, region, etc.) Write
discordbot_delete_guild Permanently delete a guild (owner only) Write
discordbot_get_guild Get guild details by ID Read
discordbot_get_guild_preview Get public guild preview Read
discordbot_leave_guild Bot leaves a guild (must be re-invited) Write
discordbot_get_guild_widget Get public JSON widget data Read
discordbot_get_guild_widget_png Get guild widget as PNG image Read
discordbot_get_guild_widget_settings Get widget settings Read
discordbot_update_guild_widget_settings Update widget settings Write
discordbot_get_guild_welcome_screen Get welcome screen configuration Read
discordbot_update_guild_welcome_screen Update welcome screen Write
discordbot_get_guild_vanity_url Get vanity URL invite code Read
discordbot_get_guilds_onboarding Get onboarding settings Read
discordbot_put_guilds_onboarding Configure guild onboarding flow Write
discordbot_preview_prune_guild Preview count of members to prune (does not remove) Read
discordbot_prune_guild Remove inactive members from guild Write

Member Operations

Tool Description Mode
discordbot_list_guild_members List guild members (paginated, requires GUILD_MEMBERS intent) Read
discordbot_get_guild_member Get specific member details Read
discordbot_search_guild_members Search members by username/nickname Read
discordbot_add_guild_member Add user to guild via OAuth2 token Write
discordbot_update_guild_member Update member nickname, roles, timeout, etc. Write
discordbot_update_my_guild_member Update bot's own nickname in a guild Write
discordbot_delete_guild_member Kick a member from guild Write

Role Operations

Tool Description Mode
discordbot_create_guild_role Create a new role in a guild Write
discordbot_update_guild_role Update role attributes (name, permissions, color) Write
discordbot_delete_guild_role Permanently delete a role Write
discordbot_list_guild_roles List all roles in a guild Read
discordbot_add_guild_member_role Assign a role to a member Write
discordbot_delete_guild_member_role Remove a role from a member Write

Moderation Operations

Tool Description Mode
discordbot_ban_user_from_guild Permanently ban a user from guild Write
discordbot_bulk_ban_users_from_guild Ban up to 200 users at once Write
discordbot_unban_user_from_guild Revoke a ban, allowing user to rejoin Write
discordbot_get_guild_ban Get ban details for a specific user Read
discordbot_list_guild_bans List all banned users Read
discordbot_bulk_delete_messages Delete 2-100 messages at once (must be less than 14 days old) Write
discordbot_create_auto_moderation_rule Create auto moderation rule Write
discordbot_update_auto_moderation_rule Update an auto moderation rule Write
discordbot_delete_auto_moderation_rule Delete an auto moderation rule Write
discordbot_get_auto_moderation_rule Get a specific auto moderation rule Read
discordbot_list_auto_moderation_rules List all auto moderation rules Read
discordbot_list_guild_audit_log_entries Retrieve audit log entries Read

Invite Operations

Tool Description Mode
discordbot_create_channel_invite Create invite link for a channel Write
discordbot_invite_resolve Resolve invite code to details Read
discordbot_invite_revoke Revoke an invite permanently Write
discordbot_list_channel_invites List active invites for a channel Read
discordbot_list_guild_invites List all active invites for a guild Read

Scheduled Event Operations

Tool Description Mode
discordbot_create_guild_scheduled_event Create a scheduled event Write
discordbot_update_guild_scheduled_event Update a scheduled event Write
discordbot_delete_guild_scheduled_event Delete a scheduled event Write
discordbot_get_guild_scheduled_event Get a specific scheduled event Read
discordbot_list_guild_scheduled_events List scheduled events in a guild Read
discordbot_list_guild_scheduled_event_users List users interested in an event Read

Emoji & Sticker Operations

Tool Description Mode
discordbot_create_guild_emoji Create custom emoji in guild Write
discordbot_update_guild_emoji Update emoji name and role restrictions Write
discordbot_delete_guild_emoji Delete custom emoji Write
discordbot_get_guild_emoji Get specific emoji details Read
discordbot_list_guild_emojis List all custom emojis in guild Read
discordbot_create_guild_sticker Upload a new sticker (max 512KB) Write
discordbot_update_guild_sticker Update sticker name, description, tags Write
discordbot_delete_guild_sticker Delete custom sticker Write
discordbot_get_guild_sticker Get specific sticker details Read
discordbot_list_guild_stickers List all custom stickers Read
discordbot_get_sticker Get sticker by ID Read
discordbot_list_sticker_packs List available Nitro sticker packs Read

Webhook Operations

Tool Description Mode
discordbot_create_webhook Create a webhook in a channel Write
discordbot_execute_webhook Execute webhook to send messages/embeds Write
discordbot_execute_slack_compatible_webhook Send via Slack-compatible webhook Write
discordbot_execute_github_compatible_webhook Send via GitHub-compatible webhook Write
discordbot_update_webhook Update webhook properties Write
discordbot_update_webhook_by_token Update webhook without bot auth Write
discordbot_delete_webhook Delete a webhook by ID Write
discordbot_delete_webhook_by_token Delete webhook without bot auth Write
discordbot_get_webhook Get webhook details by ID Read
discordbot_get_webhook_by_token Get webhook without bot auth Read
discordbot_list_channel_webhooks List webhooks in a channel Read
discordbot_get_guild_webhooks List all webhooks in a guild Read
discordbot_update_webhook_message Update a webhook-sent message Write
discordbot_delete_webhook_message Delete a webhook-sent message Write
discordbot_get_webhook_message Get a webhook-sent message Read
discordbot_update_original_webhook_message Update original webhook/interaction message Write
discordbot_delete_original_webhook_message Delete original webhook/interaction message Write
discordbot_get_original_webhook_message Get original webhook/interaction message Read

Application Command Operations

Tool Description Mode
discordbot_create_application_command Create global application command Write
discordbot_update_application_command Update global application command Write
discordbot_delete_application_command Delete global application command Write
discordbot_get_application_command Get specific global command Read
discordbot_list_application_commands List all global commands Read
discordbot_create_guild_application_command Create guild-specific command Write
discordbot_update_guild_application_command Update guild-specific command Write
discordbot_delete_guild_application_command Delete guild-specific command Write
discordbot_get_guild_application_command Get guild-specific command Read
discordbot_list_guild_application_commands List guild-specific commands Read
discordbot_get_guild_application_command_permissions Get command permissions in guild Read
discordbot_list_guild_application_command_permissions List all command permissions in guild Read
discordbot_create_interaction_response Respond to an interaction (slash command, component) Write

Template Operations

Tool Description Mode
discordbot_create_guild_template Create template from existing guild Write
discordbot_create_guild_from_template Create guild from a template Write
discordbot_update_guild_template Update template name/description Write
discordbot_sync_guild_template Sync template with source guild Write
discordbot_delete_guild_template Delete a guild template Write
discordbot_get_guild_template Get template details by code Read
discordbot_list_guild_templates List all guild templates Read

DM & Group DM Operations

Tool Description Mode
discordbot_create_dm Create or retrieve a DM channel Write
discordbot_add_group_dm_user Add user to group DM Write
discordbot_delete_group_dm_user Remove user from group DM Write

Voice & Stage Operations

Tool Description Mode
discordbot_create_stage_instance Create Stage instance for live audio event Write
discordbot_update_self_voice_state Update bot's voice state in stage channel Write
discordbot_update_voice_state Update another user's voice state in stage Write
discordbot_delete_stage_instance Delete active Stage instance Write
discordbot_get_stage_instance Get active Stage instance Read
discordbot_list_voice_regions List available voice regions Read
discordbot_list_guild_voice_regions List voice regions for a guild Read

Integration & Misc Operations

Tool Description Mode
discordbot_list_guild_integrations List guild integrations Read
discordbot_delete_guild_integration Delete a guild integration Write
discordbot_get_gateway Get WebSocket URL for Gateway Read
discordbot_get_bot_gateway Get Gateway URL with shard info Read
discordbot_get_application Get application details by ID Read
discordbot_get_my_application Get current authenticated application Read
discordbot_update_application Update application settings Write
discordbot_update_my_application Update current application via @me Write
discordbot_get_my_oauth2_application Get OAuth2 application info Read
discordbot_get_application_role_connections_metadata Get role connection metadata Read
discordbot_get_application_user_role_connection Get user role connection Read
discordbot_update_application_user_role_connection Update user role connection Write
discordbot_get_user Get public user info by ID Read
discordbot_update_my_user Update bot username and avatar Write
discordbot_get_public_keys Get OAuth2 public keys (JWK format) Read
discordbot_test_auth Validate bot token (diagnostic) Read

Code Examples

Example 1: Send and manage messages

// Send a message with embed
await clawlink_call_tool({
  tool: "discordbot_create_message",
  parameters: {
    channel_id: "123456789",
    content: "Deployment complete!",
    embeds: [{ title: "Status", description: "All systems green" }]
  }
});

// Edit the message
await clawlink_call_tool({
  tool: "discordbot_update_message",
  parameters: {
    channel_id: "123456789",
    message_id: "987654321",
    content: "Updated: All systems operational"
  }
});

Example 2: Moderate a guild

// Search for a member
const member = await clawlink_call_tool({
  tool: "discordbot_search_guild_members",
  parameters: { guild_id: "111111", query: "username" }
});

// Assign a role
await clawlink_call_tool({
  tool: "discordbot_add_guild_member_role",
  parameters: { guild_id: "111111", user_id: "222222", role_id: "333333" }
});

Example 3: Create scheduled events

await clawlink_call_tool({
  tool: "discordbot_create_guild_scheduled_event",
  parameters: {
    guild_id: "111111",
    name: "Weekly Team Sync",
    scheduled_start_time: "2026-06-15T10:00:00Z",
    entity_type: 2,
    channel_id: "444444",
    description: "Weekly team synchronization meeting"
  }
});

Example 4: Webhook message delivery

// Create a webhook
const webhook = await clawlink_call_tool({
  tool: "discordbot_create_webhook",
  parameters: { channel_id: "123456789", name: "Deploy Bot" }
});

// Execute the webhook
await clawlink_call_tool({
  tool: "discordbot_execute_webhook",
  parameters: {
    webhook_id: webhook.id,
    webhook_token: webhook.token,
    content: "New release deployed to production!"
  }
});

Discovery Workflow

  1. Call clawlink_list_integrations to confirm discord-bot is connected.
  2. Call clawlink_list_tools --integration discord-bot to see the live catalog.
  3. Use clawlink_search_tools({ query: "message", integration: "discord-bot" }) to find specific tools.

Execution Workflow

READ (safe):     list_messages → get_channel → list_guild_members
WRITE (confirm): create_message → update_channel → create_webhook
DELETE (high):   delete_message → ban_user → bulk_delete_messages

Notes

  • Bot must be a member of a guild to operate on it
  • Global application commands take up to 1 hour to propagate
  • Bulk delete messages must be less than 14 days old
  • The bot can only edit its own messages

Error Handling

Status / Error Meaning
401 Unauthorized Invalid or expired bot token -- run discordbot_test_auth
403 Forbidden Missing permissions -- check bot role hierarchy
404 Not Found Channel/guild/message ID does not exist
429 Rate Limited Too many requests -- apply exponential backoff
50001 Missing Access Bot lacks required permission for this action

Troubleshooting

Tools Not Visible

  • Start a fresh OpenClaw chat to reload plugin catalog
  • Call clawlink_list_integrations to confirm pairing

Invalid Tool Call

  • Verify the bot is a member of the target guild
  • Check that channel IDs are numeric strings, not names
  • Use discordbot_test_auth to validate the bot token

Resources


Powered by ClawLink -- an integration hub for OpenClaw

ClawLink Logo