UNPKG

aifordiscord-api

Version:

An advanced npm package for Discord bots providing AI-enhanced random content, memes, jokes, and utilities with comprehensive documentation.

127 lines 3.29 kB
/** * Main AIForDiscord class - Advanced AI-enhanced Discord bot utilities */ import { AIForDiscordOptions, MemeResponse, AdviceResponse, NekoResponse, JokeResponse, NameJokeResponse, AnimeImageResponse, FactResponse, NPMResponse, QuoteResponse, DogResponse, CatResponse, TriviaResponse } from './types'; /** * AIForDiscord - Advanced AI-enhanced random content generator for Discord bots * * @example * ```typescript * import { AIForDiscord } from 'aifordiscord-api'; * * const random = new AIForDiscord({ * openaiApiKey: 'your-openai-key', * enableCache: true, * enableAI: true * }); * * // Get a meme * const meme = await random.getMeme(); * message.channel.send(meme.url); * ``` */ export declare class AIForDiscord { private cache; private rateLimiter; private aiService; private apiService; private options; /** * Create a new AIForDiscord instance * @param options Configuration options */ constructor(options?: AIForDiscordOptions); /** * Get a random meme from Reddit */ getMeme(): Promise<MemeResponse>; /** * Get random advice with optional AI enhancement */ getAdvice(): Promise<AdviceResponse>; /** * Get a random neko (cat girl) image */ getNeko(): Promise<NekoResponse>; /** * Get a random joke with optional AI enhancement */ getRandomJoke(): Promise<JokeResponse>; /** * Get a name-based joke with AI enhancement */ getNameJoke(firstName: string, lastName?: string): Promise<NameJokeResponse>; /** * Get a random anime image based on action type */ getAnimeImgURL(type: string): Promise<AnimeImageResponse>; /** * Get a random fact with optional AI enhancement */ getFact(): Promise<FactResponse>; /** * Get information about an NPM package */ getNPM(packageName: string): Promise<NPMResponse>; /** * Get a random inspirational quote */ getQuote(): Promise<QuoteResponse>; /** * Get a random dog image */ getDogImage(): Promise<DogResponse>; /** * Get a random cat image */ getCatImage(): Promise<CatResponse>; /** * Get a trivia question */ getTrivia(category?: string, difficulty?: string): Promise<TriviaResponse>; /** * Get a dad joke */ getDadJoke(): Promise<{ joke: string; }>; /** * Get a Chuck Norris joke */ getChuckNorrisJoke(): Promise<{ joke: string; }>; /** * Get a compliment */ getCompliment(): Promise<{ compliment: string; }>; /** * Get an affirmation */ getAffirmation(): Promise<{ affirmation: string; }>; /** * Get GitHub user information */ getGitHubUser(username: string): Promise<any>; /** * Generate a custom joke using AI on a specific topic */ generateCustomJoke(topic: string): Promise<string>; /** * Clear the internal cache */ clearCache(): void; /** * Get current configuration */ getConfig(): Required<AIForDiscordOptions>; /** * Check if AI features are enabled and available */ isAIEnabled(): boolean; } //# sourceMappingURL=aifordiscord.d.ts.map