-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.d.ts
107 lines (88 loc) · 1.95 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
import { Message, Client } from 'discord.js'
type HexColorString = `#${string}` | string
export type connectOptions = {
notify?: boolean
}
export declare function connect(
db: string,
options?: connectOptions
): Promise<any>
export declare function addLevel(
message: Message,
userID: string,
guildID: string,
level: number
): Promise<any>
export declare function addXP(
message: Message,
userID: string,
guildID: string,
xp: number
): Promise<any>
export type chartsOptions = {
position?: string
background?: HexColorString
type?: 'bar' | 'line' | 'radar' | 'doughnut' | 'polarArea'
}
export declare function charts(
message: Message,
options?: chartsOptions
): Promise<any>
export declare function create(userID: string, guildID: string): Promise<any>
export declare function fetch(userID: string, guildID: string): Promise<any>
export declare function leaderboard(
userID: string,
guildID: string,
limit?: number
): Promise<any>
export declare function lvlRole(
message: Message,
userID: string,
guildID: string
): Promise<any>
export type rankOptions = {
slash?: boolean
background?: string
color?: HexColorString
}
export declare function rank(
message: Message,
userID: string,
guildID: string,
options?: rankOptions
): Promise<any>
export declare function reset(userID: string, guildID: string): Promise<any>
export type lvladdOptions = {
level: string
role: string
}
export type lvlremoveOptions = {
level: string
}
export declare function setLevel(
message: Message,
userID: string,
guildID: string,
level: number
): Promise<any>
export declare function setXP(
userID: string,
guildID: string,
xp: number
): Promise<any>
/** For levelUp event */
export type Data = {
xp: string
level: number
userID: string
guildID: string
}
export type Role = {
lvl: string
role: string
}
declare module 'discord.js' {
export interface ClientEvents {
levelUp: [Message, Data, Role]
}
}