-
Notifications
You must be signed in to change notification settings - Fork 1
/
types.d.ts
54 lines (48 loc) · 1.34 KB
/
types.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
import type { ChatInputCommandInteraction, Client, Collection, SlashCommandBuilder } from "discord.js"
import Enmap from "enmap"
import RE2 from "re2"
export type Level = {
id: string,
xp: number
}
export type LevelRole = {
id: string,
level: number
}
export type Warn = {
user: string,
mod: string,
reason: string,
date: number
}
export type Settings = {
prefix: string,
logChannel: string,
verifyRole: string,
jailRole: string,
modRoles: string[],
logFlags: number,
badWords: string[],
badNames: string[][],
antiSpam: boolean,
jailedUsers: string[],
levelSystem: boolean,
levelRoles: LevelRole[],
levels: Level[],
warns: Warn[]
};
export type Command = {
commands: SlashCommandBuilder[],
run: (client: ClientExt, intr: ChatInputCommandInteraction, guildSettings: Settings) => void
buttonPress: (client: ClientExt, intr: ChatInputCommandInteraction, guildSettings: Settings) => void
};
export interface ClientExt extends Client {
guildSettings: Enmap<string, Settings>,
badWords: Collection<string, RE2[]>,
badNames: Collection<string, [RE2, string][]>,
commands: { [key: string]: Command },
loadCommands: () => void,
loadEvents: () => void,
regenWordRegex: (guildID: string) => void,
regenNameRegex: (guildID: string) => void
};