Problem
When discli emits message events (both listen and serve commands), it includes mentions_bot to indicate whether the bot was mentioned, but it does not include the full list of mentioned users in the event payload.
Discord's message.mentions contains all @mentioned users as full Member/User objects with .id, .name, etc. This data is available but not being forwarded.
Why this matters
Downstream consumers (like PocketPaw's Discord adapter) need user IDs to:
- Mention users in replies using
<@USER_ID> format
- Send DMs to mentioned users
- Resolve usernames to numeric IDs
Without this field, the agent has no way to look up a user's ID when someone says "mention @john" or "DM @john" -- the raw content contains <@123456> but there's no structured way to map usernames to IDs from the event data alone.
The MCP server exposes discord_member_info for this, but that's only available to MCP-capable backends. The event payload itself should carry this information since Discord already provides it.
Suggested fix
In commands/listen.py (line 68-82) and commands/serve.py (line 126-142), add a mentions field to the event data:
"mentions": [{"id": str(u.id), "name": str(u)} for u in message.mentions],
This would make the event payload look like:
{
"event": "message",
"author": "someuser#1234",
"author_id": "111222333",
"content": "hey <@444555666> can you help?",
"mentions_bot": false,
"mentions": [
{"id": "444555666", "name": "john#5678"}
]
}
Files to change
discli/commands/listen.py -- on_message handler
discli/commands/serve.py -- on_message handler
Problem
When discli emits message events (both
listenandservecommands), it includesmentions_botto indicate whether the bot was mentioned, but it does not include the full list of mentioned users in the event payload.Discord's
message.mentionscontains all@mentionedusers as fullMember/Userobjects with.id,.name, etc. This data is available but not being forwarded.Why this matters
Downstream consumers (like PocketPaw's Discord adapter) need user IDs to:
<@USER_ID>formatWithout this field, the agent has no way to look up a user's ID when someone says "mention @john" or "DM @john" -- the raw content contains
<@123456>but there's no structured way to map usernames to IDs from the event data alone.The MCP server exposes
discord_member_infofor this, but that's only available to MCP-capable backends. The event payload itself should carry this information since Discord already provides it.Suggested fix
In
commands/listen.py(line 68-82) andcommands/serve.py(line 126-142), add amentionsfield to the event data:This would make the event payload look like:
{ "event": "message", "author": "someuser#1234", "author_id": "111222333", "content": "hey <@444555666> can you help?", "mentions_bot": false, "mentions": [ {"id": "444555666", "name": "john#5678"} ] }Files to change
discli/commands/listen.py--on_messagehandlerdiscli/commands/serve.py--on_messagehandler