Discord Mention Syntax: Users, Roles, Channels and More

Every mention in Discord is a short code with an ID inside, which Discord swaps for a clickable name. Bots and webhooks write these codes directly, and once you know them you can link nearly anything in a server.

Discord · 5 min read · By Chris Lenga · Updated

Users, roles and channels

A user is <@USER_ID>, a role is <@&ROLE_ID>, and a channel is <#CHANNEL_ID>. The older <@!USER_ID> form still works but is deprecated. To get an ID, turn on Developer Mode (User Settings → Advanced), then right-click the user or channel, or the role under Server Settings → Roles, and copy its ID.

The Discord Mention Builder turns an ID into the right code, and the Discord Snowflake Decoder tells you when that user, role, or channel was created.

Slash commands

A command mention, </name:COMMAND_ID>, shows as a clickable command that fills in the message box when tapped. Subcommands go inside with a space, as in </ticket open:COMMAND_ID>. The ID belongs to the command itself; a bot gets it back from Discord when it registers its commands.

Custom emoji

A custom emoji is <:name:EMOJI_ID>, or <a:name:EMOJI_ID> when it is animated. To see the code, send a backslash before the emoji, \:name:, and Discord prints the raw code instead of the picture. Paste that code into the Discord Emoji Downloader to save the full-size image.

Who actually gets pinged

Writing a mention does not always notify anyone. @everyone and @here only ping when the sender has the Mention @everyone, @here, and All Roles permission, and a role only pings if it is set to be mentionable or the sender has that same permission. A mention inside an embed never pings at all.

Bots and webhooks can narrow it further with allowed_mentions. Sending {"parse": []} shows every mention as a name without notifying a single person.

FAQ

What is the difference between @everyone and @here?+

@everyone notifies every member who can see the channel. @here only notifies the ones who are online at that moment. Both need the same permission.

Why does a mention not turn into a name?+

Discord only resolves IDs it can match. A role or channel from another server, a deleted one, or a channel the reader cannot see shows as unknown or without access instead of a name.

Try the tools

All guides →