-
Notifications
You must be signed in to change notification settings - Fork 9
/
index.d.ts
47 lines (41 loc) · 1.06 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
46
47
interface IdentifierObject {
id: string;
}
type Identifier = IdentifierObject | string;
interface Role {
color: number;
hoist: boolean;
id: string;
managed: boolean;
mentionable: boolean;
name: string;
permissions: number;
position: number;
}
interface Reward {
role: Role;
level: number;
}
interface XPInfo {
userXp: number;
levelXp: number;
totalXp: number;
}
interface User {
id: string;
level: number;
username: string;
discriminator: string;
avatarUrl: string;
messageCount: number;
tag: string;
xp: XPInfo;
rank: number;
}
export default class Mee6LevelsApi {
private static getId(guildOrUser: Identifier): string;
public static async getRoleRewards(guild: Identifier): Promise<Reward[]>;
public static async getLeaderboardPage(guild: Identifier, limit?: number, page?: number): Promise<User[]>;
public static async getLeaderboard(guild: Identifier): Promise<User[]>;
public static async getUserXp(guild: Identifier, user: Identifier): Promise<User | undefined>;
}