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
file
string
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
color
string
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
obj
Object
| Function
undefined
The object/function to be tested.
name
string
'none'
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
e
string
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
e
Error
The error to be processed.
Returns
void
Defined in
GenerateID
â–¸ Const
GenerateID(length?
, base?
): string
A function for generating a random id.
Parameters
length
number
8
The length for which the id will be.
base
number
16
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
directory
string
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
.
commands
Object
commands.errors
Object
commands.errors.creation
string
commands.errors.execution
string
commands.errors.names
string
discord
Object
discord.errors
Object
discord.errors.category
string
discord.errors.channel
string
discord.errors.emoji
string
discord.errors.role
string
utils
Object
utils.errors
Object
utils.errors.error
string
utils.success
Object
utils.success.backup
string
Defined in
Log
â–¸ Const
Log(message
, type?
): void
A function for logging a specific message.
Parameters
message
string
undefined
The message to be logged.
type
"i"
| "e"
| "s"
| "w"
| "d"
'i'
The type of log.
Returns
void
Defined in
MS
â–¸ Const
MS(value
, options?
): string
Parameters
value
number
options?
Object
options.long
boolean
Returns
string
Defined in
â–¸ Const
MS(value
): number
Parameters
value
string
Returns
number
Defined in
MkDir
â–¸ Const
MkDir(name
): boolean
A function for creating directories.
Parameters
name
string
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
number
number
The number to be parsed.
length
number
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
min
number
The minimum amount the function will return.
max
number
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
string
string
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
date
Date
The date that will be processed.
Returns
QuackJSTime
An object for time purposes.
Defined in
Last updated