import EventEmitter from 'events'; import { Snowflake } from 'discord.js'; interface StatcordOptions { client_id?: string; key: string; autopost?: boolean; baseUrl?: string; debug?: boolean; sharding?: boolean; } interface PostStats { error: boolean; message: string | ClientStats; } interface ClientStats { error: boolean; data: Array<{ time: number; servers: number; users: number; commands: string; active: string[]; custom1: string; custom2: string; memactive: number; memload: number; bandwidth: string; cpuload: number; count: number; votes: number; }>; popular: Array<{ name: string; count: number; }>; } interface BucketStats { error: boolean; data: { totalCommands: number; totalVotes: number; }; } interface UserVotesStats { error: boolean; didVote: boolean; voteCount: number; lists: string[]; data: Array<{ voteValue: number; list: string; timestamp: number; }>; } declare enum StatcordEvents { POST_STATS = "postStats", POST_COMMAND = "postCommand", POST_STATS_ERROR = "postStatsError" } /** * The Statcord class. * @since 1.0.0 * @deprecated Statcord and all related discordlabs have been discontinued. This plugin will be discontinued soon. */ declare class Statcord extends EventEmitter { private readonly options?; private activeUsers; private popularCommands; private commandsRun; private defaultHeader; private bandwidthUsage; private baseUrl; constructor(options?: StatcordOptions | undefined); /** * Post the statistics collected from the client to Statcord. * @since 1.0.0 */ postStats(): Promise; /** * Get current client statistics in Statcord. * @since 1.0.0 */ clientStats(): Promise; /** * Check everyone who has voted for the bot today. * @param days How many days back votes should be fetched for. * @since 1.0.0 */ bucketStats(days?: string): Promise; /** * Check if someone has voted for the bot today. * @param userId The ID of the user you are checking for. * @param days How many days back votes should be fetched for. * @since 1.0.0 */ userVotesStats(userId: string, days?: number): Promise; /** * Set the current bot network usage. It is reset at each statistics post. * @param usage Bandwidth usage. * @since 1.0.0 */ setBandwidthUsage(usage: string): void; postCommand(commandId: string, author: Snowflake): number; private computeMembersGuilds; private computeTotalGuilds; private getPopularCommands; private getClientId; } declare module 'discord.js' { interface ClientOptions { /** * @deprecated Statcord and all related discordlabs have been discontinued. This plugin will be discontinued soon. */ statcord?: StatcordOptions; } } export { type BucketStats, type ClientStats, type PostStats, Statcord, StatcordEvents, type StatcordOptions, type UserVotesStats };