Skip to content

MentionFormatter

A utility module that helps mention users, roles and channels in messages.

Methods



MentionUser(userId)

Returns a string containing a user mention.

Parameters

  • userId : string - The id of the user to mention.




MentionRole(roleId)

Returns a string containing a role mention.

Parameters

  • roleId : string - The id of the role to mention.




MentionChannel(channelId)

Returns a string containing a channel mention.

Parameters

  • channelId : string - The id of the channel to mention.