Entity Info
nodeVersion
$nodeVersion
The function $nodeVersion returns the value of the bot.nodeVersion context variable supplied by the host. The engine itself does not detect any Node.js version.
Syntax
$nodeVersion
Parameters
None.
Return Value
- Type : String
- The text of the
bot.nodeVersioncontext variable as supplied by the host. v20.0.0if the host supplied none.
Behavior
- The value is returned unchanged. Because of the default, the function never returns an empty string and does not prove which runtime executes the command.
Examples
Feature Compatibility Check
$textSplit[$nodeVersion;.]
$var[major;$replaceText[$splitText[1];v;]]
$if[$var[major]>=18]
$sendMessage[✅ Your runtime supports the latest features.]
$else
$sendMessage[⚠️ Outdated runtime. Some features may be limited.]
$endif
Technical Info
$title[🛠️ Technical Environment]
$description[
**Bot :** $botName
**Node :** $botNode
**Runtime :** $nodeVersion
**Language :** $scriptLanguage
**Commands :** $commandsCount
]
Startup Log
$log[🚀 $botName started | Node: $botNode | Runtime: $nodeVersion | Lang: $scriptLanguage]
Notes
$nodeVersiontakes no argument.- For the script language, use
$scriptLanguage.
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.