Async method that has a single parameter and does not return a value.
Type of the value provided.
Value that the method takes in.
Async method that transforms a value.
Input value's type.
Value to be transformed.
Output value's type.
Async method that defines a set of criteria and determines whether the specified value meets those criteria.
Type of the value to compare.
Value to compare against within this method.
A promise that returns true
if value meets criteria defined within this method, otherwise false
.
Async method that returns a single value.
Type of the value that will be returned.
Value.
Trivial method containing logic.
Encapsulates a method that has a single parameter and does not return a value.
Type of the value provided.
Value that the method takes in.
A value which must be able to be serialized via JSON.
A value which must be able to be serialized via JSON.
Method that transforms a value.
Input value's type.
Output value's type.
Value to be transformed.
Some extra info alongside the GuildMember, like info that is extracted from roles.
Represents the method that defines a set of criteria and determines whether the specified value meets those criteria.
Type of the value to compare.
Value to compare against within this method.
true
if value meets criteria defined within this method, otherwise false
.
Represents a method that returns a single value.
Type of the value that will be returned.
Value.
Check if arrays are fully equal.
Type of values stored in the arrays.
Left array.
Right array.
Calls a given function and returns it's result. This is pretty useful for an array of methods.
i.e. [doThing1, doThing2.bind(this), () => doThing3()].forEach(execute);
(usually with a more dynamic list)
Type that will be returned from provider, could be void.
Method that will return a value (or void).
The result of the method.
Gets some extra info for this user.
Member to get extra info for.
Gets the path to the media directory.
The path to media directory.
Chooses a random files from a directory (with optional regex pattern), throws error if no files exist.
Folder path to search through for random file.
Filter for which files to return.
The found file path, if it exists.
Takes in an array of arrays and tries to find a unique value from as many arrays as possible, prioritizing keeping earlier values without falling back to {@link defaultValuesToUse}. This function is a bit hard to describe, but you can look in the tests for examples.
!(DANGER) This method is very expensive, I'm sure it could be better optimized to use more memory, !(DANGER) but I only plan on using it for small arrays, be careful!
Types of values in the sub arrays.
Arrays to flatten into unique values.
Values to use if it is not possible to find a value for output array.
If false
, places undefined
into output array when no other value can be found.
If true
, will just return current array, this is usually more useful if you have {@link defaultValuesToUse}
has all expected values and want to stop once those run out.
Insert a value into a sorted array without having to fully re-sort.
Array to add item into.
Item to add into the array.
Method that converts the item into a sortable index (number).
Will get an array of non duplicate colors, attempting to prioritize early indices and prefer using colors in provided array. See getUniques and it's tests for more info. If a sub array is out of colors, will see if a previous array is willing to switch colors so both can be valid. If not possible, will chose a random color instead. If there are no more colors left, will delete the rest of the array.
Array of Colors to ensure there are no duplicates, each sub array representing an acceptable color for use in array. If none are left in array, a random color will be chosen instead.
An array of unique Colors, best matching possible.
Takes a method and returns a memoized version of it.
Method to memoize.
The method with memoization.
No operation, a method that does nothing. More useful than you would think, especially for testing.
Function that returns given value.
Type of object that is passed in and returned.
Value to return.
Provided value.
Wraps an value and returns it when the returned method is called.
Type that will be returned from provider.
Value to return.
Provider which returns the given value.
Gets a random number from zero (inclusive) to max (exclusive).
Max number exclusive.
Get a random element from given array.
Type of values in array.
Array to select from.
Randomize array in-place using Durstenfeld shuffle algorithm
Type of values stored in the array.
Array to shuffle. Happens in place, so clone if you don't want to lose original order.
Removes quotes from a message (lines that begin with >
). This is useful for making sure not to double execute commands within a quote.
Message to remove quotes from (lines that begin with >
).
The given message without quotes.
Async trivial method containing logic.