Bug: Discord plugin permission requests cannot be approved from Discord
Plugin: discord@claude-plugins-official v0.0.4
Summary
When Claude triggers a permission request (e.g. for the reply tool), the server sends a Discord DM with Allow/Deny buttons. However, approving from Discord has no effect — only the CLI prompt works.
Root Cause (two issues)
1. No interactionCreate handler
server.ts sends Discord messages with button components:
new ButtonBuilder().setCustomId(`perm:allow:${request_id}`) ...
new ButtonBuilder().setCustomId(`perm:deny:${request_id}`) ...
But there is no client.on('interactionCreate', ...) handler anywhere in the file. Button clicks are silently ignored.
2. request_id is never shown to the user
The message content is just 🔐 Permission: <tool_name>. The request_id is only embedded in the button customId, never visible to the user — making the text-based yes XXXXX path impossible too.
Expected Behavior
Clicking Allow or Deny in Discord should approve or deny the permission request.
Suggested Fix
Add an interactionCreate handler that:
- Checks if the interaction is a button with
customIdmatchingperm:allow:*orperm:deny:* - Extracts the
request_id - Emits
notifications/claude/channel/permissionwith the appropriate behavior - Acknowledges the interaction
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗