UNPKG

@antibot/interactions

Version:

## 🗡️ An interactions library made for Discord interactions

40 lines 1.35 kB
import { METHOD, APPLICATION_TYPE, AUDIO_TYPE, IMAGE_TYPE, TEXT_TYPE } from './typings'; export interface IRequest { publicKey?: boolean; method: METHOD; headers: { 'Content-Type': APPLICATION_TYPE | AUDIO_TYPE | IMAGE_TYPE | TEXT_TYPE; 'User-Agent': string; Authorization: string; }; body?: Object | any; } export interface IRquestOptions { publicKey?: boolean; options: { method: METHOD; endpoint: string; contentType: APPLICATION_TYPE | AUDIO_TYPE | IMAGE_TYPE | TEXT_TYPE; }; data?: Object | void; } export interface IRequestMethodOptions { publicKey?: boolean; route: string; contentType: APPLICATION_TYPE | AUDIO_TYPE | IMAGE_TYPE | TEXT_TYPE; data?: Object | null; } export declare class RequestManager { publicKey: string; token: string; api: string; debug?: boolean; constructor(publicKey: string, token: string, api: string, debug?: boolean); GET<T>(opts: IRequestMethodOptions): Promise<T | void>; POST<T>(opts: IRequestMethodOptions): Promise<T | void>; PUT<T>(opts: IRequestMethodOptions): Promise<T | void>; PATCH<T>(opts: IRequestMethodOptions): Promise<T | void>; DELETE<T>(opts: IRequestMethodOptions): Promise<T | void>; private request; } //# sourceMappingURL=RequestManager.d.ts.map