Class: RequestHandler
Represents the class that manages handlers for endpoints.
Hierarchy
EventEmitter
↳
RequestHandler
Constructors
constructor
• new RequestHandler(options?
)
Parameters
Name | Type |
---|---|
options? | RequestHandlerOptions |
Defined in
Properties
emit
• emit: <K>(event
: K
, ...args
: IRestEvents
[K
]) => boolean
& <S>(event
: Exclude
<S
, keyof IRestEvents
>, ...args
: any
[]) => boolean
Defined in
off
• off: <K>(event
: K
, listener
: (...args
: IRestEvents
[K
]) => void
) => RequestHandler
& <S>(event
: Exclude
<S
, keyof IRestEvents
>, listener
: (...args
: any
[]) => void
) => RequestHandler
Defined in
on
• on: <K>(event
: K
, listener
: (...args
: IRestEvents
[K
]) => void
) => RequestHandler
& <S>(event
: Exclude
<S
, keyof IRestEvents
>, listener
: (...args
: any
[]) => void
) => RequestHandler
Defined in
once
• once: <K>(event
: K
, listener
: (...args
: IRestEvents
[K
]) => void
) => RequestHandler
& <S>(event
: Exclude
<S
, keyof IRestEvents
>, listener
: (...args
: any
[]) => void
) => RequestHandler
Defined in
removeAllListeners
• removeAllListeners: <K>(event?
: K
) => RequestHandler
& <S>(event?
: Exclude
<S
, keyof IRestEvents
>) => RequestHandler
Defined in
Methods
setKeys
▸ setKeys(keys
): RequestHandler
Parameters
Name | Type |
---|---|
keys | string [] |
Returns
Defined in
request
▸ request<T
>(path
, options?
): Promise
<Result
<T
>>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
path | string |
options | RequestOptions |
Returns
Promise
<Result
<T
>>
Defined in
rawRequest
▸ rawRequest<T
>(path
, options?
): Promise
<T
>
Type parameters
Name |
---|
T |
Parameters
Name | Type |
---|---|
path | string |
options | RequestOptions |
Returns
Promise
<T
>
Defined in
init
▸ init(options
): Promise
<string
[]>
Parameters
Name | Type |
---|---|
options | LoginOptions |
Returns
Promise
<string
[]>
Defined in
Events
debug
• debug: string
Emitted for general debugging information.
Defined in
error
• error: string
Emitted when the client encounters an error.
Defined in
rateLimited
• rateLimited: string
Emitted when the client is rate limited.