@evolvejs/core
Version:
An advanced Discord API wrapper with TS and JS support
82 lines (81 loc) • 2.49 kB
TypeScript
import { Structures } from "../Structures/Structures";
import { CacheOptions, GatewayIntents, Identify } from "../Utils/Constants";
import { EvolveClient } from "./EvolveClient";
import { CacheProviders } from "../Interfaces/Interfaces";
export declare class EvolveBuilder {
private token;
shards: number;
intents: number;
private cache;
activity: typeof Identify.d.activity;
secret: string;
encoding: "etf" | "json";
client: EvolveClient;
private structure;
private typeOfclient;
private _providers;
constructor(token?: string, useDefaultSettings?: boolean);
/**
*
* @param token
* @returns The EvolveBuilder Class
*/
setToken(token: string): EvolveBuilder;
/**
*
* @param encoding
*/
setEncoding(encoding: "json" | "etf"): EvolveBuilder;
/**
*
* @param totalShards
* @note It must be greater than 0
* @returns The EvolveBuilder Class
*/
setShards(totalShards: number): EvolveBuilder;
/**
*
* @param activity
* @note The input should be the same as given in the discord api docs
* @returns The EvolveBuilder Class
*/
setActivity(activity: typeof Identify.d.activity): EvolveBuilder;
/**
*
* @param cache
* @enables The Cache Options for the library
* @returns The EvolveBuilder Client
*/
enableCache(...caches: CacheOptions[]): EvolveBuilder;
/**
*
* @param cache
* @disables The Cache Options for the Library
* @returns EvolveBuilder Class
*/
disableCache(...caches: CacheOptions[]): EvolveBuilder;
/**
*
* @param intents
* @enables The Required Intents for the Bot
* @returns EvolveBuilder Class
* @warning No intents are applied at default so you wont receive any events except some exceptions
*/
enableIntents(...intents: GatewayIntents[]): EvolveBuilder;
/**
*
* @param intents
* @disables The Intents for your bot
* @returns EvolveBuilder Class
*/
disableIntents(...intents: GatewayIntents[]): EvolveBuilder;
setSecret(clientSecret: string): EvolveBuilder;
setStructureClass(structure: Structures): EvolveBuilder;
setClientClass(client: typeof EvolveClient): EvolveBuilder;
setCacheProviders(providers: CacheProviders): EvolveBuilder;
/**
* @param none
* @returns {EvolveClient} A Initialized EvolveClient Instance
*/
build(): EvolveClient;
}