Mentionable

interface Mentionable

Implemented by types that can be rendered as a Discord mention string. Users, channels, roles, and other Discord entities implement this interface so they can be included in message content as clickable mentions.

Methods

Mentionable.toMention() → string

Returns the Discord mention syntax for this object. The format varies by entity type: - User: <@userId> - Channel: <#channelId> - Role: <@&roleId>

Returns:

A mention string suitable for embedding in message content.