Moderation
emojiName
$emojiName
The $emojiName[] function retrieves the name of a custom emoji from its Discord ID.
Syntax
bdfd
$emojiName[emojiID]
Syntax
$emojiName[emojiID]
Parameters
| Parameter | Description |
|---|---|
emojiID |
The Discord ID of the emoji (the digits in <:name:ID>). |
Return value
- Type: String
- The name of the custom emoji.
- An empty string if the emoji does not exist or is not accessible.
Behavior
- Extracts the name from the emoji’s ID.
- Works for emojis from any server that the bot has access to.
- The ID can be extracted from a message containing the emoji.
Examples
Identification of emoji
$var[emojiID;$message[1]]
$var[name;$emojiName[$var[emojiID]]]
$if[$var[name]!=]
Emoji detected: **$var[name]** (ID: $var[emojiID])
$else
Emoji not found.
$endif
Log of emojis used
$var[id;$message[1]]
$if[$var[id]!=]
$sendMessage[$channelID[logs];📊 Emoji **$emojiName[$var[id]]** used by $userName in $channelName.]
$endif
List of emojis
$title[📋 Server Emojis]
$description[
$textSplit[$serverEmojis[,];, ]
$index. $splitText[$index] — $emojiName[$splitText[$index]]
$endTextSplit
]
$sendMessage[]
Notes
- Only works with custom emojis, not Unicode emojis.
- The emoji must be on a server that the bot has access to.
- Useful for logs and emoji usage statistics.