Skip to content
Math & Text randomMention

$randomMention[]

The $randomMention[] function returns the mention of a random member of the server, in <@id> format.

Syntax

$randomMention

Note: This function takes no arguments (it is an error to pass any).

Return Value

The mention <@id> of a random member of the server, or an empty string if the member list is empty.

Behavior

  • The candidates are all the members of the server returned by Discord (bots included).
  • The mention uses the member ID.

Examples

Direct mention

$randomMention, you have been chosen randomly!

Notes

  • Use $randomUserID for the bare ID of a random member.

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.