@phantomguard/ikcheatniet
Version:
This is a NPM package that allows easy usage of the Ikcheatniet API.
57 lines (54 loc) • 1.49 kB
text/typescript
type IkcheatnietUser = {
entries: `${string}:${string}`[];
};
declare class IkcheatnietReputation {
private _reputation;
constructor(user: IkcheatnietUser);
private calculateReputation;
get reputation(): number;
get reputationLevel(): "Clean" | "Suspicious" | "Untrusted" | "Cheater";
}
type DiscordResponse = {
message: string;
id: string;
user: {
id: string;
username: string;
avatar: string;
discriminator: string;
global_name: string;
banner_color: string;
created_at: string;
collectibles: any;
clan: {
identity_guild_id: string;
tag: string;
};
primary_guild: {
identity_guild_id: string;
tag: string;
};
};
};
type CheaterResponse = {
message: string;
id: string;
entries: `${string}:${string}`[];
};
declare class Ikcheatniet {
private baseUrl;
private apiKey;
private cache;
private constructor();
static init(apiKey: string, baseUrl?: string, cacheTTL?: number): Ikcheatniet;
get stats(): Promise<{}>;
searchUser(discordId: string, options?: {
type: "discord";
searchType: "single";
} | {
type: "cheater";
searchType: "single" | "bulk";
}): Promise<DiscordResponse | CheaterResponse>;
getUserReputation(user: string | CheaterResponse): Promise<IkcheatnietReputation>;
}
export { Ikcheatniet as default };