Skip to content
Multi-use utilities usable in any JavaScript written program or Discord bot πŸŽ‰
JavaScript TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci
.github
.vscode
src
tests
.all-contributorsrc
.gitignore
CONTRIBUTING.md
LICENSE
README.md
package-lock.json
package.json
tsconfig.json

README.md

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!

You can’t perform that action at this time.