You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature Request: Auto-resolve Discord user mentions from <@id> to @username
Problem
When a Discord user sends a message like @username message, the bot receives <@USER_ID> message in the content field. While Discord API provides resolved user data in the mentions array, OpenClaw currently passes the raw <@id> format to the LLM, making it hard for agents to understand who is being mentioned.
Feature Request: Auto-resolve Discord user mentions from
<@id>to@usernameProblem
When a Discord user sends a message like
@username message, the bot receives<@USER_ID> messagein thecontentfield. While Discord API provides resolved user data in thementionsarray, OpenClaw currently passes the raw<@id>format to the LLM, making it hard for agents to understand who is being mentioned.Current Behavior
{ "content": "<@USER_ID_PLACEHOLDER> hello", "mentions": [{ "id": "USER_ID_PLACEHOLDER", "username": "username", "global_name": "Display Name" }] }LLM receives:
<@USER_ID_PLACEHOLDER> helloDesired Behavior
LLM should receive:
@Display Name hello(usingglobal_nameorusername)Proposed Solution
Add a Discord message preprocessor that:
mentions,mention_roles, andmention_channelsarrays<@id>,<@&role_id>, and<#channel_id>with human-readable namesExample mapping:
<@USER_ID>→@DisplayName<@&ROLE_ID>→@RoleName<#CHANNEL_ID>→#channel-nameUse Cases
Workaround
Currently, we have to manually configure user ID mappings in each agent's SOUL.md:
This is tedious and error-prone when adding new users or agents.
Related Issues