UNPKG

@neoxr/wb

Version:

A simple and easy-to-use WhatsApp bot module built on top of Baileys. Designed for effortless integration and quick setup.

99 lines (98 loc) 4.51 kB
import { Options, KeyType, DataObject, ConversionTuple } from './types'; declare class Function { delay: (time: number) => Promise<unknown>; createThumb: (input: string | Buffer, width?: number) => Promise<Buffer>; downScale: (input: string | Buffer, scale?: number) => Promise<Buffer>; isUrl: (url: string) => boolean; fetchJson: (url: string, options?: any) => Promise<any>; fetchBuffer: (file: string | Buffer, options?: any) => Promise<Buffer | { status: boolean; msg: string; }>; fetchAsBuffer: (source: string) => Promise<Buffer | null>; fetchAsJSON: (source: string) => Promise<any>; fetchAsText: (source: string) => Promise<string | null>; fetchAsBlob: (source: string) => Promise<Blob | null>; parseCookie: (file: string, options?: any) => Promise<any>; toMp3: (inputFile: string) => Promise<Buffer>; metaAudio: (source: string | Buffer, tags?: any) => Promise<any>; texted: (type: string, text: string) => string; example: (isPrefix: string, command: string, args: string) => string; igFixed: (url: string) => string; ttFixed: (url: string) => string; toTime: (ms: number) => string; readTime: (ms: number) => { days: number; hours: number; minutes: number; seconds: number; }; filename: (extension: string) => string; uuid: () => string; random: (list: any[]) => any; randomInt: (min: number, max: number) => number; formatter: (integer: number | bigint) => string; formatNumber: (integer: number | bigint) => string; h2k: (num: number | bigint) => string; formatSize: (size: number) => string; getSize: (str: string | number) => Promise<string>; getFile: (source: string | Buffer, filename?: string, options?: any) => Promise<any>; color: (text: string, color?: string) => string; mtype: (data: any) => string; sizeLimit: (str: string, max: number) => { oversize: boolean; }; generateLink: (text: string) => string[] | null; debounce: (fn: () => void, delay: number) => () => void; reload: (file: string, delay?: number) => void; updateFile: (file: string) => void; noSuffix: (str: string) => string; jsonFormat: (obj: any) => string; ucword: (str: string) => string; arrayJoin: (arr: any[]) => any[]; removeItem: (arr: any[], value: any) => any[]; hitstat: (cmd: string, who: string, options?: any) => void; socmed: (url: string) => boolean; matcher: (string: string, array: any[], options: any) => any[]; toDate: (ms: number) => string; timeFormat: (value: number) => string; timeAgo: (timestamp: number) => string; switcher: (status: boolean, isTrue: string, isFalse: string) => string; makeId: (length: number) => string; timeReverse: (duration: number) => string; matchPattern: (name: string, patterns: string[]) => boolean; checkFilesAndFoldersAsync(dir: string, wordList: string[], folderList: string[], options?: Options): Promise<boolean>; askForm(questions: string[]): Promise<Record<string, string>>; greeting: () => string; jsonRandom: (file: string) => any; level: (xp: number, multiplier?: number) => [number, number, number, number]; leveling: (xp: number, multiplier: number, def?: number) => any; role: (level: number) => string; filter: (text: string) => string; randomString: (len: number, charSet?: string) => string; removeEmojis: (string: string) => string; reSize: (buffer: Buffer, x: number, z: number) => Promise<Buffer>; detectStyledAlphabet: (str: string) => string[]; Styles: (text: string, style?: number) => string; logFile: (log: string, filename?: string) => void; getEmoji: (str: string) => string[] | null; isEmojiPrefix: (str: string) => boolean; getDevice: (id: string) => string; indexify: (conversions: ConversionTuple[]) => Map<KeyType, DataObject>[]; isPortInUse: (host?: any) => Promise<unknown>; maskNumber: (phoneNumber: number | string, maskChar?: string) => string; maskIp: (str: string, maskChar?: string) => string; makeMD5: (text: string) => string; toMs: (time: any) => number; pagination: (array: any, page?: number, limit?: number) => { page: number; limit: number; total: any; totalPages: number; nextPage: number | null; prevPage: number | null; data: any; }; } declare const _default: Function; export default _default;