$ram
$ram
will return the RAM usage of your bot.
Usage
$ram[type?]
Parameters
Field | Type | Description | Required |
---|---|---|---|
type | string | type of memory to return | false |
Available types:
- rss
- heapTotal
- heapUsed
Available Types
Type | |
---|---|
rss | Resident Set Size, is the amount of space occupied in the main memory device (that is a subset of the total allocated memory) for the process, including all C++ and JavaScript objects and code |
heapTotal | With simple words, total space allocated in memory for objects, string and closures for example |
heapUsed | Amount of used heap |
arrayBuffers | Ammount of allocated memory for ArrayBuffers and SharedArrayBuffers, including all Node.js Buffers |
external | Memory usage of C++ objects bound to JavaScript objects managed by V8 |
For better understanding of types, refer to Node.js Documentation
Example(s)
This will return the RAM usage and the available amount of RAM:
1client.command({2 name: "ram",3 code: `4 I'm currently using \`$ramMB\` out of \`$maxRamMB\`!5 `6});