bot-utils
TypeScript icon, indicating that this package has built-in type declarations

1.4.2 • Public • Published

Bot-Utils

NPM

npm version Downloads CircleCI semantic-release All Contributors

Easy to use utilities for JavaScript written Discord bots. Or you can use them any Javascript program...

For the version using classes visit here Don't do this right now... It's way behind and not working correctly.

Contributing

If you wish to contribute to bot-utils continued development make sure to take a look at this file.

Method Documentation

Method Extends Description
Array.shuffle() Array Shuffles the attached array
Array.random() Array Picks a random item from the attached array
Object.isArray() Object Returns whether or not the attached object is actually an array
snowflake(snowflake) N/A Returns the date of given snowflake
cpuUsage() N/A Returns the CPU usage for the time when it was called
randColor() N/A Returns a random # prefixed Hex colour code
randInt(min, max) N/A Returns a random integer from a range of mid to max
randAlphaNum(len) N/A Returns a random alphanumeric
round(number, decimal-place) N/A Returns a the given number rounded to the given decimal-place
hasNumber(string) N/A Returns a boolean based on whether the supplied string contains a number or not
isNumber(input) N/A Returns a boolean based on whether the supplied input is a number or not
uptime() N/A Returns process uptime formatted into a human readable string

Contributors ✨

Thanks goes to these wonderful people (emoji key):

Axel Greavette
Axel Greavette

🚇 ⚠️ 📖 💻
jerskisnow
jerskisnow

💻 📖

This project follows the all-contributors specification. Contributions of any kind welcome!

Package Sidebar

Install

npm i bot-utils

Weekly Downloads

55

Version

1.4.2

License

MIT

Unpacked Size

24.7 kB

Total Files

23

Last publish

Collaborators

  • axelgreavette