Skip to content

Commit 093a1e2

Browse files
committed
🏷️ Fix wrong type
1 parent 4e8b654 commit 093a1e2

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "discord-module-loader",
33
"description": "A package that lets you load events and commands easily and fast.",
4-
"version": "1.2.0",
4+
"version": "1.2.1",
55
"main": "lib/index.js",
66
"repository": "https://github.com/Recodive/Discord-Module-Loader",
77
"author": "Timeraa <[email protected]>",

src/classes/DiscordCommand.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default class DiscordCommand extends BaseClass {
2727
| CommandInteraction
2828
| ContextMenuInteraction
2929
| AutocompleteInteraction
30-
) => () => any;
30+
) => Awaitable<any>;
3131

3232
constructor(options: CommandOptions) {
3333
super();
@@ -55,5 +55,5 @@ export interface CommandOptions extends ChatInputApplicationCommandData {
5555
| CommandInteraction
5656
| ContextMenuInteraction
5757
| AutocompleteInteraction
58-
): () => any;
58+
): Awaitable<any>;
5959
}

src/classes/DiscordEvent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default class DiscordEvent<
88
guildId?: string;
99
constructor(
1010
public event: K,
11-
public listener: (...args: ClientEvents[K]) => () => any
11+
public listener: (...args: ClientEvents[K]) => Awaitable<any>
1212
) {
1313
super();
1414
}

src/classes/DiscordGuild.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Collection } from "discord.js";
1+
import { Awaitable, Collection } from "discord.js";
22

33
import type DiscordCommand from "./DiscordCommand";
44
import type DiscordEvent from "./DiscordEvent";
@@ -13,7 +13,7 @@ export default class DiscordGuild {
1313
modules = new Collection<string, DiscordModule>();
1414
constructor(
1515
public id: Snowflake,
16-
public callback?: () => any,
16+
public callback?: Awaitable<any>,
1717
options?: { disabled: boolean }
1818
) {
1919
if (options?.disabled) this.disable();

src/classes/DiscordModule.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Collection } from "discord.js";
1+
import { Awaitable, Collection } from "discord.js";
22

33
import type DiscordCommand from "./DiscordCommand";
44
import type DiscordEvent from "./DiscordEvent";
@@ -11,7 +11,7 @@ export default class DiscordModule {
1111

1212
constructor(
1313
public name: string,
14-
public callback?: () => any,
14+
public callback?: Awaitable<any>,
1515
options?: { disabled: boolean }
1616
) {
1717
if (options?.disabled) this.disable();

0 commit comments

Comments
 (0)