forked from UnbelievaBoat/unb-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
45 lines (33 loc) · 1.22 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
declare module 'unb-api' {
export const version: string;
export class Client {
public constructor(token: string, options?: Options);
public token: string;
public baseURL: string;
public version: string;
public maxRetries: Number;
public getUserBalance(guild_id: string, user_id: string): Promise<User>;
public setUserBalance(guild_id: string, user_id: string, balance: Balance): Promise<User>;
public editUserBalance(guild_id: string, user_id: string, balance: Balance): Promise<User>;
public getGuildLeaderboard(guild_id: string, query?: Object): Promise<User[]> | Promise<{ users: User[], totalPages: Number }>;
private _request(method: string, endpoint: string, data?: object): Promise<any>;
}
export class User {
public constructor(data: object);
public rank: number;
public user_id: string;
public cash: number;
public bank: number;
public total: number;
private rawData: object;
}
export type Balance = {
cash?: number,
bank?: number
}
export type Options = {
baseURL?: string;
version?: number;
maxRetries?: Number;
}
}