Utils#

Utils for the package itself

Constructor#

new Utils()#

Methods#

(async) DiscordRequest(client, endpoint, options, headers, formData)#

Do Request to Discord

Parameters:
NameTypeDefaultDescription
clientObject

The Client that makes the request

endpointstring

The endpoint to request from

optionsObject

The fetch options

headersobject

The headers to send

formDatabooleanfalse

if the body requires data or not

checkURL(url, attachment)#

Check if the input is an url

Parameters:
NameTypeDefaultDescription
urlstring

The string to check

attachmentBooleanfalse

boolean if it can be an attachment

resolveColor(color)#

Resolve a color by the input

Parameters:
NameTypeDescription
colorstring | number

The input to resolve the color