QuackJSUtils
Namespaces
Discord
Classes
HTML
Variables
Variables
• Variables: Record
<string
, any
> = {}
Defined in
Functions
Backup
▸ Const
Backup(file
): void
A function for generating a backup of a file.
Parameters
Name | Type | Description |
---|---|---|
|
| The file that will be backed up. |
Returns
void
Defined in
Color
▸ Const
Color(color
): number
A function for converting any color variation to an base 10 number.
Parameters
Name | Type | Description |
---|---|---|
|
| The color to be parsed. |
Returns
number
The number
version of color
.
Defined in
Debug
▸ Const
Debug(obj
, name?
): void
A function for debugging Functions or Objects
Parameters
Name | Type | Default value | Description |
---|---|---|---|
|
|
| The object/function to be tested. |
|
|
| The name of the debug call. |
Returns
void
Defined in
Emoji
▸ Const
Emoji(e
): string
A function for grabbing the id of a custom emoji.
Parameters
Name | Type | Description |
---|---|---|
|
| The emoji to be parsed. |
Returns
string
The string representation of the emoji.
Defined in
Exception
▸ Const
Exception(e
): void
A function for handling errors.
Parameters
Name | Type | Description |
---|---|---|
|
| The error to be processed. |
Returns
void
Defined in
GenerateID
▸ Const
GenerateID(length?
, base?
): string
A function for generating a random id.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
|
|
| The length for which the id will be. |
|
|
| The base for which the id will be. |
Returns
string
Returns a random id with a base of base
and length of length
.
Defined in
GetFiles
▸ Const
GetFiles(directory
): string
[]
A function for grabbing all of the files in a directory.
Parameters
Name | Type | Description |
---|---|---|
|
| The directory to be scanned. |
Returns
string
[]
All of the files' paths in a directory.
Defined in
Locale
▸ Const
Locale(): Object
A function for grabbing the language file.
Returns
Object
The locale of given location if it is created under locales.ts
.
Name | Type |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Defined in
Log
▸ Const
Log(message
, type?
): void
A function for logging a specific message.
Parameters
Name | Type | Default value | Description |
---|---|---|---|
|
|
| The message to be logged. |
|
|
| The type of log. |
Returns
void
Defined in
MS
▸ Const
MS(value
, options?
): string
Parameters
Name | Type |
---|---|
|
|
|
|
|
|
Returns
string
Defined in
▸ Const
MS(value
): number
Parameters
Name | Type |
---|---|
|
|
Returns
number
Defined in
MkDir
▸ Const
MkDir(name
): boolean
A function for creating directories.
Parameters
Name | Type | Description |
---|---|---|
|
| The name of the directory to be made. |
Returns
boolean
true
if the directory was made, false
if the directory was not made.
Defined in
PadWithZeros
▸ Const
PadWithZeros(number
, length
): string
A function for padding a number with zeros; usefully for ticketing modules.
Parameters
Name | Type | Description |
---|---|---|
|
| The number to be parsed. |
|
| The length of which the string should be. |
Returns
string
A string with the number
and the number of padded zeros in front of it.
Defined in
Random
▸ Const
Random(min
, max
): number
A function for generating a random number between min and max inclusively.
Parameters
Name | Type | Description |
---|---|---|
|
| The minimum amount the function will return. |
|
| The maximum amount the function will return. |
Returns
number
A random number between min
and max
.
Defined in
RandomizeCapitalization
▸ Const
RandomizeCapitalization(string
): string
A function for randomly capitalizing a string.
Parameters
Name | Type | Description |
---|---|---|
|
| The string to be randomly capitalized. |
Returns
string
A string with random capitalization.
Defined in
Time
▸ Const
Time(date?
): QuackJSTime
A function which returns an object containing useful time numbers and information.
Parameters
Name | Type | Description |
---|---|---|
|
| The date that will be processed. |
Returns
QuackJSTime
An object for time purposes.
Defined in
Last updated