-
Notifications
You must be signed in to change notification settings - Fork 61
/
index.d.ts
72 lines (63 loc) · 1.76 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
import { Bot } from "./handlers/Client.js";
import {
ApplicationCommandNonOptions,
CommandInteraction,
ContextMenuCommandInteraction,
InteractionReplyOptions,
Message,
UserContextMenuCommandInteraction,
InteractionResponse,
ApplicationCommandDataResolvable,
PermissionResolvable,
} from "discord.js/typings";
interface McommandOptions {
client?: Bot;
message?: Message;
args?: string[];
prefix?: string;
}
export interface Mcommand {
name: string;
description: string;
userPermissions: PermissionResolvable[];
botPermissions: PermissionResolvable[];
category: string;
owneronly: boolean;
run: (options: McommandOptions) => {};
}
interface ScommandOptions {
client?: Bot;
interaction?: CommandInteraction;
}
export interface CustomSCommand {
name: string;
description: string;
userPermissions: PermissionResolvable[];
botPermissions: PermissionResolvable[];
category: string;
type: number;
options?: ApplicationCommandNonOptions[];
run: (options: ScommandOptions) => {};
}
type Scommand = ApplicationCommandDataResolvable & CustomSCommand;
export interface CMcommand {
name: string;
category: string;
type: number;
run: (client: Bot, interaction: ContextMenuCommandInteraction) => {};
}
export interface CUcommand {
name: string;
category: string;
type: number;
run: (client: Bot, interaction: UserContextMenuCommandInteraction) => {};
}
export type send = (
interactionOrMessage: CommandInteraction | Message,
options: InteractionReplyOptions
) => Promise<Message | InteractionResponse>;
export type SendEmbedFunction = (
interaction: CommandInteraction,
data: string,
ephemeral?: boolean
) => Promise<Message | InteractionResponse>;