Skip to content

Commit 6e8d137

Browse files
TimeraaBas950
andcommitted
🚧 WIP
Co-authored-by: Bas950 <me@bas950.com>
1 parent 2ee62c7 commit 6e8d137

30 files changed

Lines changed: 492 additions & 55 deletions

lib/classes/Command.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import BaseClass from "./BaseClass";
22
import type { ApplicationCommandOptionData, ApplicationCommandPermissionData, Awaitable, ChatInputApplicationCommandData, CommandInteraction, Snowflake, ContextMenuInteraction } from "discord.js";
33
import type { ApplicationCommandTypes } from "discord.js/typings/enums";
4-
export default class Command extends BaseClass {
4+
export default class DiscordCommand extends BaseClass {
55
global: boolean;
66
name: string;
77
description: string;

lib/classes/Command.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/classes/Command.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/classes/DiscordCommand.d.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import BaseClass from "./BaseClass";
2+
import type { ApplicationCommandOptionData, ApplicationCommandPermissionData, Awaitable, ChatInputApplicationCommandData, CommandInteraction, Snowflake, ContextMenuInteraction } from "discord.js";
3+
import type { ApplicationCommandTypes } from "discord.js/typings/enums";
4+
export default class DiscordCommand extends BaseClass {
5+
global: boolean;
6+
name: string;
7+
description: string;
8+
defaultPermission?: boolean;
9+
type?: "CHAT_INPUT" | ApplicationCommandTypes.CHAT_INPUT;
10+
options?: ApplicationCommandOptionData[];
11+
cooldown?: number;
12+
channelAllowlist?: Snowflake[];
13+
channelDenylist?: Snowflake[];
14+
permissions?: ApplicationCommandPermissionData[];
15+
hasUserCommand?: boolean;
16+
execute: (interaction: CommandInteraction | ContextMenuInteraction) => Awaitable<void>;
17+
constructor(options: CommandOptions);
18+
}
19+
export interface CommandOptions extends ChatInputApplicationCommandData {
20+
cooldown?: number;
21+
channelAllowlist?: Snowflake[];
22+
channelDenylist?: Snowflake[];
23+
permissions?: ApplicationCommandPermissionData[];
24+
hasUserCommand?: boolean;
25+
execute(interaction: CommandInteraction | ContextMenuInteraction): Awaitable<void>;
26+
}

lib/classes/DiscordCommand.js

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/classes/DiscordCommand.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/classes/DiscordEvent.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import BaseClass from "./BaseClass";
2+
import type { Awaitable, ClientEvents } from "discord.js";
3+
export default class DiscordEvent<K extends keyof ClientEvents> extends BaseClass {
4+
event: K;
5+
listener: (...args: ClientEvents[K]) => Awaitable<void>;
6+
constructor(event: K, listener: (...args: ClientEvents[K]) => Awaitable<void>);
7+
}

lib/classes/DiscordEvent.js

Lines changed: 15 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/classes/DiscordEvent.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/classes/DiscordModule.d.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Collection } from "discord.js";
2+
import BaseClass from "./BaseClass";
3+
import DiscordCommand from "./DiscordCommand";
4+
import DiscordEvent from "./DiscordEvent";
5+
export default class DiscordModule extends BaseClass {
6+
name: string;
7+
events: Collection<string, DiscordEvent<any>>;
8+
commands: Collection<string, DiscordCommand>;
9+
modules: Collection<string, DiscordModule>;
10+
constructor(name: string);
11+
addEvents(events: [string, DiscordEvent<any>][]): void;
12+
addCommands(commands: [string, DiscordCommand][]): void;
13+
addModules(modules: [string, DiscordModule][]): void;
14+
}

0 commit comments

Comments
 (0)