-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCommand.js
41 lines (39 loc) · 1.69 KB
/
Command.js
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
class Command {
/**
* @param {{run: (ctx: import("./Ctx")) => Promise<void> | void, name: string, aliases?: string[], category?: string, description?: string, usage?: string[], enabled: boolean, nsfw?: boolean, cooldown?: Number, permissions?: { developerOnly?: Boolean, ownerOnly?: Boolean, moderatorRole?: Boolean, member?: { channel?: import("discord.js").PermissionString[], guild?: import("discord.js").PermissionString[] }, bot?: { channel?: import("discord.js").PermissionString[], guild?: import("discord.js").PermissionString[] } }, subCommands?: [{run: (ctx: import("./Ctx")) => Promise<void> | void, rawName: string, name?: string, aliases?: string[], description?: string, usage?: string[]}], settings?: {[key: any]}}} param0
*/
constructor({
name = "empty",
aliases = [],
category = "Other",
description = "No desc.",
usage = [],
enabled = true,
nsfw = false,
cooldown = 5,
permissions = {
developerOnly: false,
ownerOnly: false,
moderatorRole: false,
member: { channel: [], guild: [] },
bot: { channel: [], guild: [] }
},
subCommands = [],
settings = {},
run
}) {
this.name = name;
this.aliases = aliases;
this.category = category;
this.description = description;
this.usage = usage;
this.enabled = enabled;
this.nsfw = nsfw;
this.cooldown = cooldown;
this.permissions = permissions;
this.subCommands = subCommands;
this.settings = settings;
this.run = run;
}
}
module.exports = Command;