| any;
+export type InteractionHandlerFunction = (context: Context, payload: P) => Promise | any;
+
+export type HandlerWithoutContext = EventHandlerFunction;
+export type HanderWithContext = InteractionHandlerFunction | CommandHandlerFunction | CommandHandler;
+
+export type Handler = InteractionHandlerFunction | InteractionHandlerFunction | EventHandlerFunction | CommandHandlerFunction | CommandHandler;
\ No newline at end of file
diff --git a/src/types/index.ts b/src/types/index.ts
deleted file mode 100644
index 3a4ef41..0000000
--- a/src/types/index.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export * from './common';
-export * from './command';
-export * from './slash_command';
-export * from './handler';
-export * from './interaction';
diff --git a/src/types/interaction.ts b/src/types/interaction.ts
deleted file mode 100644
index 4f4c2b1..0000000
--- a/src/types/interaction.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Client } from '..';
-import { InteractionContext } from '../lib';
-
-export abstract class Interaction {
- abstract custom_id: string | string[];
- abstract execute: InteractionFunction;
-}
-
-export type InteractionFunction = (client: Client, context: InteractionContext, data: Record) => void;
-
-export enum InteractionResponseType {
- Pong = 1,
- Reply = 4,
- DeferredReply = 5,
- DeferredUpdateMessage = 6,
- UpdateMessage = 7,
- AutocompleteResult = 8,
- Modal = 9
-}
diff --git a/src/types/member.ts b/src/types/member.ts
new file mode 100644
index 0000000..ea8a01e
--- /dev/null
+++ b/src/types/member.ts
@@ -0,0 +1,33 @@
+export class Member {
+ user: any;
+ roles: string[];
+ premium_since: string | null;
+ pending: boolean;
+ nick: string | null;
+ mute: boolean;
+ joined_at: string;
+ flags: number;
+ deaf: boolean;
+ communication_disabled_until: string | null;
+ banner: string | null;
+ avatar: string | null;
+
+ constructor(data: any) {
+ this.user = data.user;
+ this.roles = data.roles;
+ this.premium_since = data.premium_since;
+ this.pending = data.pending;
+ this.nick = data.nick;
+ this.mute = data.mute;
+ this.joined_at = data.joined_at;
+ this.flags = data.flags;
+ this.deaf = data.deaf;
+ this.communication_disabled_until = data.communication_disabled_until;
+ this.banner = data.banner;
+ this.avatar = data.avatar;
+ }
+
+ static fromAPIResponse(data: any): Member {
+ return new Member(data);
+ }
+}
\ No newline at end of file
diff --git a/src/types/message.ts b/src/types/message.ts
new file mode 100644
index 0000000..878bb97
--- /dev/null
+++ b/src/types/message.ts
@@ -0,0 +1,277 @@
+import { exists, isNil } from '../utils';
+import { GatewayObject } from './base';
+import { fromDiscord, Trait, type Expectation, type Expects } from './common';
+import type { Embed } from './embed';
+import type { Guild } from './guild';
+import { type DiscordUser, User } from './user';
+
+export type Component = Partial