Function Variables

View a list of all current function variables

Functions allow you to use advanced methods to retrieve a value, this can be calculations, getting the time, or many other things. Below you can see a full list of functions you can use with BotWiz!

Spaces are not allowed in functions. They are only allowed inside the strings (characters enclosed in quotation marks).

FunctionExample UsageUse Case

{func_randomPosition}

{func_randomPosition[array]}

Gets a random value at a position in an array

{func_getFirst}

{func_getFirst[array]}

Gets the first value from an array

{func_getLast}

{func_getLast[array]}

Gets the last value from an array

{func_getMedian}

{func_getMedian[array]}

Gets the centermost item from the array

{func_getSum}

{func_getSum[number_array]}

Calculates the value of the the provided array of numbers

{func_appendToString}

{func_appendToString[array]}

Converts the array into a string form

{func_concat}

{func_concat[array, array]}

Combines the two provided arrays

{func_isNaN}

{func_isNaN[number / string]}

Checks to see if the provided number/string is NaN (Not a Number)

{func_lowest}

{func_lowest[array]}

Gets the lowest value from an array

{func_greatest}

{func_greatest[array]}

Gets the greatest value from an array

{func_toUnixFromISO}

{func_toUnixFromISO[ISO]}

Converts ISO to UNIX format

{func_toISOFromUnix}

{func_toISOFromUnix[UNIX]}

Converts UNIX to ISO format

{func_atPosition}

{func_atPosition[array, number]}

Retrieves a value from the specified index in an array

{func_addTime}

{func_addTime[date,number,s/m/h/d/w/m/y]}

Adds a set amount of time to a provided date

{func_charLength}

{func_charLength[string]}

Gets the total character count for the provided string

{func_randomGuild}

{func_randomGuild}

Gets a random guilds ID the bot is a member of

{func_hexToDecimal}

{func_hexToDecimal[HEX]}

Converts HEX to a decimal value

{func_rgbaToDecimal}

{func_rgbaToDecimal[DESC]}

Converts decimal to a HEX value

{func_hslToDecimal}

{func_hslToDecimal[hsl]}

Converts HSL to a decimal value

{func_regex}

{func_regex[regex,matchValue, true]}

Performs a regex action on the provided string. The third boolean option is whether or not to return the result or not. If set to false, which by default, it is, it will only return true or false. If set to true, it will return the matched text, or null if no matches were found.

{func_randomEmoji}

{func_randomEmoji}

Gets a random emoji from the guild the interaction was created in

{func_channelTypeCount}

{func_channelTypeCount[type]}

Returns the total count of channels with the specified type for the guild the interaction was created in

{func_randomQuote}

{func_randomQuote}

Gets a random quote

{func_randomJSON}

{func_randomJSON}

Gets random mock JSON data

{func_randomNumber}

{func_randomNumber[0,100]}

Retrieves a random number between the starting number and ending number provided

{func_randomString}

{func_randomString[10]}

Returns a random string for the provided length

{func_randomImgUrl}

{func_randomImgUrl}

Returns a random image URL

{func_randomMember}

{func_randomMember}

Retrieves a random member ID from the guild the interaction was created in

{func_randomUser}

{func_randomUser}

Returns a random USER ID from the guild the interaction was created in

{func_randomRole}

{func_randomRole}

Returns a random role ID from the guild the interaction was created in

{func_randomChannel}

{func_randomChannel}

Returns a random channel from the guild ID the interaction was created in

{func_relativeTimestamp}

{func_relativeTimestamp}

Returns a relative formatted UNIX timestamp for the current time

{func_timestamp}

{func_timestamp}

Returns a timestamp for the current time

{func_unixTimestamp}

{func_unixTimestamp}

Returns a UNIX timestamp for the current time

{func_length}

{func_length[array]}

Gets the length for the provided array

{func_toLowerCase}

{func_toLowerCase[string]}

Converts the provided string to lowercase

{func_toUpperCase}

{func_toUpperCase[string]}

Converts the provided string to uppercase

{func_trim}

{func_trim[string]}

Remove whitespaces from both ends of a string

{func_replace}

{func_replace[string,string,replacewith]}

Replace specific phrase in a string with the provided value

{func_substring}

{func_substring[target,start,end]}

Get the value from a start and end index

{func_split

{func_split[string,string,index]}

Splits the string at the provided character, and returns the value at the provided index

{func_join}

{func_join[array]}

Takes an array, and converts it to a string

{func_reverseString}

{func_reverseString[string]}

Reverses the value of a string

{func_reverse}

{func_reverseString[array]}

Reverses the value of an array

{func_sortString}

{func_sortString[string]}

Sorts the string by order (eg. bca >> abc, 220 >> 022, etc)

{func_sort}

{func_sort[array]}

Sorts the array, from a lessen then to greater then order

{func_reverseSortString}

{func_reverseSortString[string]}

Sorts the string by reverse order (eg. bca << abc, 220 << 022, etc)

{func_reverseSort}

{func_reverseSort[array]}

Sorts the array, from a greater then to lesser then order

{func_shuffle}

{func_shuffle[array]}

Accepts an array, and randomizes the order of them

{func_shuffleString}

{func_shuffleString[string]}

Accepts a string, and randomizes the order of it

{func_createInvite}

{func_createInvite[channelID]}

Create an invite to the channel specificed

{func_formatArray}

{func_formatArray[ARRAY,REPLACEMENT,AFTER,INLINE]}

Format an array. AFTER and INLINE are bools.

Some function variables have been merged into the Function block.

Last updated