seyfert 2.1.1-dev-12404125172.0 → 2.1.1-dev-12450598903.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/lib/commands/applications/chatcontext.d.ts +5 -5
  2. package/lib/commands/applications/entrycontext.d.ts +8 -8
  3. package/lib/commands/applications/menucontext.d.ts +10 -10
  4. package/lib/commands/handle.d.ts +1 -1
  5. package/lib/commands/optionresolver.d.ts +1 -1
  6. package/lib/common/shorters/application.d.ts +3 -2
  7. package/lib/common/shorters/bans.d.ts +3 -2
  8. package/lib/common/shorters/channels.d.ts +3 -3
  9. package/lib/common/shorters/emojis.d.ts +5 -4
  10. package/lib/common/shorters/guilds.d.ts +18 -18
  11. package/lib/common/shorters/guilds.js +2 -2
  12. package/lib/common/shorters/interaction.d.ts +6 -5
  13. package/lib/common/shorters/members.d.ts +10 -10
  14. package/lib/common/shorters/messages.d.ts +9 -8
  15. package/lib/common/shorters/roles.d.ts +7 -6
  16. package/lib/common/shorters/templates.d.ts +7 -6
  17. package/lib/common/shorters/threads.d.ts +7 -6
  18. package/lib/common/shorters/threads.js +2 -2
  19. package/lib/common/shorters/users.d.ts +5 -4
  20. package/lib/common/shorters/webhook.d.ts +9 -8
  21. package/lib/components/componentcontext.d.ts +9 -9
  22. package/lib/components/modalcontext.d.ts +9 -9
  23. package/lib/events/hooks/auto_moderation.d.ts +4 -3
  24. package/lib/events/hooks/custom.d.ts +7 -7
  25. package/lib/events/hooks/dispatch.d.ts +2 -1
  26. package/lib/events/hooks/entitlement.d.ts +4 -3
  27. package/lib/events/hooks/guild.d.ts +20 -105
  28. package/lib/events/hooks/integration.d.ts +8 -148
  29. package/lib/events/hooks/message.d.ts +3 -6
  30. package/lib/events/hooks/soundboard.d.ts +12 -115
  31. package/lib/events/hooks/thread.d.ts +3 -7
  32. package/lib/events/hooks/typing.d.ts +5 -49
  33. package/lib/structures/AutoModerationRule.d.ts +9 -8
  34. package/lib/structures/ClientUser.d.ts +3 -2
  35. package/lib/structures/Guild.d.ts +33 -38
  36. package/lib/structures/GuildBan.d.ts +5 -4
  37. package/lib/structures/GuildEmoji.d.ts +8 -7
  38. package/lib/structures/GuildMember.d.ts +17 -16
  39. package/lib/structures/GuildRole.d.ts +10 -9
  40. package/lib/structures/GuildTemplate.d.ts +12 -11
  41. package/lib/structures/Interaction.d.ts +7 -7
  42. package/lib/structures/Interaction.js +1 -1
  43. package/lib/structures/Message.d.ts +14 -14
  44. package/lib/structures/Poll.d.ts +3 -2
  45. package/lib/structures/Sticker.d.ts +8 -8
  46. package/lib/structures/User.d.ts +4 -3
  47. package/lib/structures/VoiceState.d.ts +8 -8
  48. package/lib/structures/Webhook.d.ts +8 -7
  49. package/lib/structures/channels.d.ts +27 -27
  50. package/lib/structures/channels.js +1 -1
  51. package/lib/websocket/discord/shared.d.ts +2 -0
  52. package/lib/websocket/discord/workermanager.d.ts +1 -1
  53. package/lib/websocket/discord/workermanager.js +3 -2
  54. package/package.json +4 -4
@@ -69,16 +69,16 @@ export declare class AutocompleteInteraction<FromGuild extends boolean = boolean
69
69
  reply(..._args: unknown[]): Promise<any>;
70
70
  }
71
71
  export declare class Interaction<FromGuild extends boolean = boolean, Type extends APIInteraction = APIInteraction> extends BaseInteraction<FromGuild, Type> {
72
- fetchMessage(messageId: string): Promise<import("./Message").WebhookMessage>;
73
- fetchResponse(): Promise<import("./Message").WebhookMessage>;
72
+ fetchMessage(messageId: string): Promise<WebhookMessageStructure>;
73
+ fetchResponse(): Promise<WebhookMessageStructure>;
74
74
  write<FR extends boolean = false>(body: InteractionCreateBodyRequest, withResponse?: FR): Promise<When<FR, WebhookMessageStructure, void>>;
75
75
  modal(body: ModalCreateBodyRequest): Promise<undefined>;
76
76
  editOrReply<FR extends boolean = false>(body: InteractionCreateBodyRequest, fetchReply?: FR): Promise<When<FR, WebhookMessageStructure, void>>;
77
- editMessage(messageId: string, body: InteractionMessageUpdateBodyRequest): Promise<import("./Message").WebhookMessage>;
78
- editResponse(body: InteractionMessageUpdateBodyRequest): Promise<import("./Message").WebhookMessage>;
77
+ editMessage(messageId: string, body: InteractionMessageUpdateBodyRequest): Promise<WebhookMessageStructure>;
78
+ editResponse(body: InteractionMessageUpdateBodyRequest): Promise<WebhookMessageStructure>;
79
79
  deleteResponse(): Promise<void>;
80
80
  deleteMessage(messageId: string): Promise<void>;
81
- followup(body: MessageWebhookCreateBodyRequest): Promise<import("./Message").WebhookMessage>;
81
+ followup(body: MessageWebhookCreateBodyRequest): Promise<WebhookMessageStructure>;
82
82
  }
83
83
  export declare class ApplicationCommandInteraction<FromGuild extends boolean = boolean, Type extends APIApplicationCommandInteraction = APIApplicationCommandInteraction> extends Interaction<FromGuild, Type> {
84
84
  type: ApplicationCommandType;
@@ -178,8 +178,8 @@ export interface ModalSubmitInteraction<FromGuild extends boolean = boolean> ext
178
178
  }
179
179
  export declare class ModalSubmitInteraction<FromGuild extends boolean = boolean> extends BaseInteraction<FromGuild> {
180
180
  data: ObjectToLower<APIModalSubmission>;
181
- update<WR extends boolean = false>(data: ComponentInteractionMessageUpdate, withResponse?: WR): Promise<When<WR, import("./Message").WebhookMessage, undefined>>;
182
- deferUpdate<WR extends boolean = false>(withResponse?: WR): Promise<When<WR, import("./Message").WebhookMessage, undefined>>;
181
+ update<WR extends boolean = false>(data: ComponentInteractionMessageUpdate, withResponse?: WR): Promise<When<WR, WebhookMessageStructure, undefined>>;
182
+ deferUpdate<WR extends boolean = false>(withResponse?: WR): Promise<When<WR, WebhookMessageStructure, undefined>>;
183
183
  get customId(): string;
184
184
  get components(): {
185
185
  components: {
@@ -253,7 +253,7 @@ class Interaction extends BaseInteraction {
253
253
  fetchResponse() {
254
254
  return this.fetchMessage('@original');
255
255
  }
256
- async write(body, withResponse) {
256
+ write(body, withResponse) {
257
257
  return this.reply({
258
258
  type: types_1.InteractionResponseType.ChannelMessageWithSource,
259
259
  data: body,
@@ -1,6 +1,6 @@
1
- import { Embed } from '..';
1
+ import { type AllChannels, Embed } from '..';
2
2
  import type { ListenerOptions } from '../builders';
3
- import { type GuildMemberStructure, type PollStructure, type UserStructure } from '../client/transformers';
3
+ import { type GuildMemberStructure, type GuildStructure, type MessageStructure, type PollStructure, type UserStructure, type WebhookMessageStructure, type WebhookStructure } from '../client/transformers';
4
4
  import type { UsingClient } from '../commands';
5
5
  import { type ObjectToLower } from '../common';
6
6
  import type { EmojiResolvable } from '../common/types/resolvables';
@@ -27,11 +27,11 @@ export interface BaseMessage extends DiscordBase, ObjectToLower<Omit<MessageData
27
27
  export declare class BaseMessage extends DiscordBase {
28
28
  embeds: InMessageEmbed[];
29
29
  constructor(client: UsingClient, data: MessageData);
30
- get user(): import("./User").User;
30
+ get user(): UserStructure;
31
31
  createComponentCollector(options?: ListenerOptions): import("../components/handler").CreateComponentCollectorResult;
32
32
  get url(): `https://discord.com/channels/${string}/${string}/${string}`;
33
- guild(force?: boolean): Promise<import("./Guild").Guild<"api"> | undefined>;
34
- channel(force?: boolean): Promise<import("./channels").AllChannels>;
33
+ guild(force?: boolean): Promise<GuildStructure<'api'> | undefined>;
34
+ channel(force?: boolean): Promise<AllChannels>;
35
35
  react(emoji: EmojiResolvable): Promise<void>;
36
36
  private patch;
37
37
  }
@@ -39,12 +39,12 @@ export interface Message extends BaseMessage, ObjectToLower<Omit<MessageData, 't
39
39
  }
40
40
  export declare class Message extends BaseMessage {
41
41
  constructor(client: UsingClient, data: MessageData);
42
- fetch(force?: boolean): Promise<Message>;
43
- reply(body: Omit<MessageCreateBodyRequest, 'message_reference'>, fail?: boolean): Promise<Message>;
44
- edit(body: MessageUpdateBodyRequest): Promise<Message>;
45
- write(body: MessageCreateBodyRequest): Promise<Message>;
42
+ fetch(force?: boolean): Promise<MessageStructure>;
43
+ reply(body: Omit<MessageCreateBodyRequest, 'message_reference'>, fail?: boolean): Promise<MessageStructure>;
44
+ edit(body: MessageUpdateBodyRequest): Promise<MessageStructure>;
45
+ write(body: MessageCreateBodyRequest): Promise<MessageStructure>;
46
46
  delete(reason?: string): Promise<void>;
47
- crosspost(reason?: string): Promise<Message>;
47
+ crosspost(reason?: string): Promise<MessageStructure>;
48
48
  }
49
49
  export type EditMessageWebhook = Omit<MessageWebhookMethodEditParams, 'messageId'>['body'] & Pick<MessageWebhookMethodEditParams, 'query'>;
50
50
  export type WriteMessageWebhook = MessageWebhookMethodWriteParams['body'] & Pick<MessageWebhookMethodWriteParams, 'query'>;
@@ -52,10 +52,10 @@ export declare class WebhookMessage extends BaseMessage {
52
52
  readonly webhookId: string;
53
53
  readonly webhookToken: string;
54
54
  constructor(client: UsingClient, data: MessageData, webhookId: string, webhookToken: string);
55
- fetchWebhook(): Promise<import("./Webhook").Webhook>;
56
- fetch(): Promise<WebhookMessage>;
57
- edit(body: EditMessageWebhook): Promise<WebhookMessage>;
58
- write(body: WriteMessageWebhook): Promise<WebhookMessage | null>;
55
+ fetchWebhook(): Promise<WebhookStructure>;
56
+ fetch(): Promise<WebhookMessageStructure>;
57
+ edit(body: EditMessageWebhook): Promise<WebhookMessageStructure>;
58
+ write(body: WriteMessageWebhook): Promise<WebhookMessageStructure | null>;
59
59
  delete(reason?: string): Promise<never>;
60
60
  }
61
61
  export declare class InMessageEmbed {
@@ -1,4 +1,5 @@
1
1
  import type { ValidAnswerId } from '../api/Routes/channels';
2
+ import type { MessageStructure, UserStructure } from '../client/transformers';
2
3
  import type { UsingClient } from '../commands';
3
4
  import { type ObjectToLower } from '../common';
4
5
  import type { APIPoll } from '../types';
@@ -11,6 +12,6 @@ export declare class Poll extends Base {
11
12
  constructor(client: UsingClient, data: APIPoll, channelId: string, messageId: string);
12
13
  get expiryTimestamp(): number;
13
14
  get expiryAt(): Date;
14
- end(): Promise<import("./Message").Message>;
15
- getAnswerVoters(id: ValidAnswerId): Promise<import("./User").User[]>;
15
+ end(): Promise<MessageStructure>;
16
+ getAnswerVoters(id: ValidAnswerId): Promise<UserStructure[]>;
16
17
  }
@@ -1,4 +1,4 @@
1
- import type { RawFile, UsingClient } from '..';
1
+ import type { GuildStructure, RawFile, StickerStructure, UsingClient } from '..';
2
2
  import type { Attachment, AttachmentBuilder } from '../builders';
3
3
  import { type UserStructure } from '../client/transformers';
4
4
  import type { MethodContext, ObjectToLower } from '../common';
@@ -9,17 +9,17 @@ export interface Sticker extends DiscordBase, ObjectToLower<Omit<APISticker, 'us
9
9
  export declare class Sticker extends DiscordBase {
10
10
  user?: UserStructure;
11
11
  constructor(client: UsingClient, data: APISticker);
12
- guild(force?: boolean): Promise<import("./Guild").Guild<"api"> | undefined>;
13
- edit(body: RESTPatchAPIGuildStickerJSONBody, reason?: string): Promise<Sticker | undefined>;
14
- fetch(force?: boolean): Promise<Sticker | undefined>;
12
+ guild(force?: boolean): Promise<GuildStructure<'api'> | undefined>;
13
+ edit(body: RESTPatchAPIGuildStickerJSONBody, reason?: string): Promise<StickerStructure | undefined>;
14
+ fetch(force?: boolean): Promise<StickerStructure | undefined>;
15
15
  delete(reason?: string): Promise<void>;
16
16
  static methods({ client, guildId }: MethodContext<{
17
17
  guildId: string;
18
18
  }>): {
19
- list: () => Promise<Sticker[]>;
20
- create: (payload: CreateStickerBodyRequest, reason?: string) => Promise<Sticker>;
21
- edit: (stickerId: string, body: RESTPatchAPIGuildStickerJSONBody, reason?: string) => Promise<Sticker>;
22
- fetch: (stickerId: string, force?: boolean) => Promise<Sticker>;
19
+ list: () => Promise<StickerStructure[]>;
20
+ create: (payload: CreateStickerBodyRequest, reason?: string) => Promise<StickerStructure>;
21
+ edit: (stickerId: string, body: RESTPatchAPIGuildStickerJSONBody, reason?: string) => Promise<StickerStructure>;
22
+ fetch: (stickerId: string, force?: boolean) => Promise<StickerStructure>;
23
23
  delete: (stickerId: string, reason?: string) => Promise<void>;
24
24
  };
25
25
  }
@@ -1,3 +1,4 @@
1
+ import type { DMChannelStructure, MessageStructure, UserStructure } from '../client';
1
2
  import { type MessageCreateBodyRequest, type ObjectToLower } from '../common';
2
3
  import type { ImageOptions } from '../common/types/options';
3
4
  import type { APIUser } from '../types';
@@ -10,12 +11,12 @@ export declare class User extends DiscordBase<APIUser> {
10
11
  /**
11
12
  * Fetch user
12
13
  */
13
- fetch(force?: boolean): Promise<User>;
14
+ fetch(force?: boolean): Promise<UserStructure>;
14
15
  /**
15
16
  * Open a DM with the user
16
17
  */
17
- dm(force?: boolean): Promise<import("./channels").DMChannel>;
18
- write(body: MessageCreateBodyRequest): Promise<import("./Message").Message>;
18
+ dm(force?: boolean): Promise<DMChannelStructure>;
19
+ write(body: MessageCreateBodyRequest): Promise<MessageStructure>;
19
20
  defaultAvatarURL(): string;
20
21
  avatarURL(options?: ImageOptions): string;
21
22
  avatarDecorationURL(options?: ImageOptions): string | undefined;
@@ -1,4 +1,4 @@
1
- import type { UsingClient } from '../';
1
+ import type { UserStructure, UsingClient, VoiceStateStructure } from '../';
2
2
  import type { VoiceStateResource } from '../cache/resources/voice-states';
3
3
  import { type GuildMemberStructure } from '../client/transformers';
4
4
  import type { ObjectToLower } from '../common';
@@ -11,14 +11,14 @@ export declare class VoiceState extends Base {
11
11
  protected withMember?: GuildMemberStructure;
12
12
  constructor(client: UsingClient, data: APIVoiceState);
13
13
  get isMuted(): boolean;
14
- member(force?: boolean): Promise<import("./GuildMember").GuildMember>;
15
- user(force?: boolean): Promise<import("./User").User>;
14
+ member(force?: boolean): Promise<GuildMemberStructure>;
15
+ user(force?: boolean): Promise<UserStructure>;
16
16
  channel(force?: boolean): Promise<AllGuildVoiceChannels | undefined>;
17
- setMute(mute?: boolean, reason?: string): Promise<import("./GuildMember").GuildMember>;
18
- setDeaf(deaf?: boolean, reason?: string): Promise<import("./GuildMember").GuildMember>;
17
+ setMute(mute?: boolean, reason?: string): Promise<GuildMemberStructure>;
18
+ setDeaf(deaf?: boolean, reason?: string): Promise<GuildMemberStructure>;
19
19
  setSuppress(suppress?: boolean): Promise<void>;
20
20
  requestSpeak(date?: string | Date): Promise<undefined>;
21
- disconnect(reason?: string): Promise<import("./GuildMember").GuildMember>;
22
- fetch(force?: boolean): Promise<VoiceState>;
23
- setChannel(channel_id: null | string, reason?: string): Promise<import("./GuildMember").GuildMember>;
21
+ disconnect(reason?: string): Promise<GuildMemberStructure>;
22
+ fetch(force?: boolean): Promise<VoiceStateStructure>;
23
+ setChannel(channel_id: null | string, reason?: string): Promise<GuildMemberStructure>;
24
24
  }
@@ -1,10 +1,11 @@
1
- import { type AnonymousGuildStructure, type UserStructure } from '../client/transformers';
1
+ import { type AnonymousGuildStructure, type GuildStructure, type UserStructure, type WebhookMessageStructure, type WebhookStructure } from '../client/transformers';
2
2
  import type { UsingClient } from '../commands';
3
3
  import type { ImageOptions, MessageWebhookCreateBodyRequest, MessageWebhookPayload, MessageWebhookUpdateBodyRequest, MethodContext, ObjectToLower } from '../common';
4
4
  /**
5
5
  * Represents a Discord webhook.
6
6
  */
7
7
  import type { APIWebhook, RESTGetAPIWebhookWithTokenMessageQuery, RESTPatchAPIWebhookJSONBody, RESTPatchAPIWebhookWithTokenJSONBody, RESTPostAPIWebhookWithTokenQuery } from '../types';
8
+ import type { AllChannels } from './channels';
8
9
  import { DiscordBase } from './extra/DiscordBase';
9
10
  export interface Webhook extends DiscordBase, ObjectToLower<Omit<APIWebhook, 'user' | 'source_guild'>> {
10
11
  }
@@ -29,13 +30,13 @@ export declare class Webhook extends DiscordBase {
29
30
  * @param force Whether to force fetching the guild even if it's already cached.
30
31
  * @returns A promise that resolves to the guild associated with the webhook, or undefined if not applicable.
31
32
  */
32
- guild(force?: boolean): Promise<import("./Guild").Guild<"api"> | undefined>;
33
+ guild(force?: boolean): Promise<GuildStructure<'api'> | undefined>;
33
34
  /**
34
35
  * Fetches the channel associated with the webhook.
35
36
  * @param force Whether to force fetching the channel even if it's already cached.
36
37
  * @returns A promise that resolves to the channel associated with the webhook, or undefined if not applicable.
37
38
  */
38
- channel(force?: boolean): Promise<import("./channels").BaseChannel<import("../types").ChannelType> | import("./channels").DMChannel | import("./channels").CategoryChannel | undefined>;
39
+ channel(force?: boolean): Promise<AllChannels | undefined>;
39
40
  /**
40
41
  * Retrieves the avatar URL of the webhook.
41
42
  * @param options The image options for the avatar.
@@ -46,14 +47,14 @@ export declare class Webhook extends DiscordBase {
46
47
  * Fetches the webhook data from the Discord API.
47
48
  * @returns A promise that resolves to the fetched webhook data.
48
49
  */
49
- fetch(): Promise<Webhook>;
50
+ fetch(): Promise<WebhookStructure>;
50
51
  /**
51
52
  * Edits the webhook.
52
53
  * @param body The new webhook data.
53
54
  * @param reason The reason for editing the webhook.
54
55
  * @returns A promise that resolves when the webhook is successfully edited.
55
56
  */
56
- edit(body: RESTPatchAPIWebhookJSONBody | RESTPatchAPIWebhookWithTokenJSONBody, reason?: string): Promise<Webhook>;
57
+ edit(body: RESTPatchAPIWebhookJSONBody | RESTPatchAPIWebhookWithTokenJSONBody, reason?: string): Promise<WebhookStructure>;
57
58
  /**
58
59
  * Deletes the webhook.
59
60
  * @param reason The reason for deleting the webhook.
@@ -68,9 +69,9 @@ export declare class Webhook extends DiscordBase {
68
69
  webhookToken: string;
69
70
  }>): {
70
71
  /** Writes a message through the webhook. */
71
- write: (payload: MessageWebhookMethodWriteParams) => Promise<import("./Message").WebhookMessage | null>;
72
+ write: (payload: MessageWebhookMethodWriteParams) => Promise<WebhookMessageStructure | null>;
72
73
  /** Edits a message sent through the webhook. */
73
- edit: (payload: MessageWebhookMethodEditParams) => Promise<import("./Message").WebhookMessage>;
74
+ edit: (payload: MessageWebhookMethodEditParams) => Promise<WebhookMessageStructure>;
74
75
  /** Deletes a message sent through the webhook. */
75
76
  delete: (messageId: string, reason?: string) => Promise<never>;
76
77
  };
@@ -1,6 +1,6 @@
1
1
  import { Collection, type RawFile, type ReturnCache } from '..';
2
2
  import type { Overwrites } from '../cache/resources/overwrites';
3
- import { type BaseChannelStructure, type BaseGuildChannelStructure, type CategoryChannelStructure, type DMChannelStructure, type DirectoryChannelStructure, type ForumChannelStructure, type MediaChannelStructure, type NewsChannelStructure, type StageChannelStructure, type TextGuildChannelStructure, type ThreadChannelStructure, type VoiceChannelStructure, type VoiceStateStructure } from '../client';
3
+ import { type BaseChannelStructure, type BaseGuildChannelStructure, type CategoryChannelStructure, type DMChannelStructure, type DirectoryChannelStructure, type ForumChannelStructure, type GuildMemberStructure, type GuildStructure, type MediaChannelStructure, type MessageStructure, type NewsChannelStructure, type StageChannelStructure, type TextGuildChannelStructure, type ThreadChannelStructure, type UserStructure, type VoiceChannelStructure, type VoiceStateStructure, type WebhookStructure } from '../client';
4
4
  import type { UsingClient } from '../commands';
5
5
  import { type EmojiResolvable, type MessageCreateBodyRequest, type MessageUpdateBodyRequest, type MethodContext, type ObjectToLower, type StringToNumber, type ToClass } from '../common';
6
6
  import { type APIChannelBase, type APIDMChannel, type APIGuildCategoryChannel, type APIGuildChannel, type APIGuildForumChannel, type APIGuildForumDefaultReactionEmoji, type APIGuildForumTag, type APIGuildMediaChannel, type APIGuildStageVoiceChannel, type APIGuildVoiceChannel, type APINewsChannel, type APITextChannel, type APIThreadChannel, ChannelType, type RESTGetAPIChannelMessageReactionUsersQuery, type RESTGetAPIChannelMessagesQuery, type RESTPatchAPIChannelJSONBody, type RESTPatchAPIGuildChannelPositionsJSONBody, type RESTPostAPIChannelWebhookJSONBody, type RESTPostAPIGuildChannelJSONBody, type RESTPostAPIGuildForumThreadsJSONBody, type SortOrderType, type ThreadAutoArchiveDuration, VideoQualityMode } from '../types';
@@ -92,7 +92,7 @@ export declare class BaseGuildChannel extends BaseChannel<ChannelType> {
92
92
  guildId: string;
93
93
  } | undefined;
94
94
  }>;
95
- guild(force?: boolean): Promise<import("./Guild").Guild<"api">>;
95
+ guild(force?: boolean): Promise<GuildStructure<'api'>>;
96
96
  get url(): string;
97
97
  setPosition(position: number, reason?: string): Promise<this>;
98
98
  setName(name: string, reason?: string): Promise<this>;
@@ -105,48 +105,48 @@ export interface MessagesMethods extends BaseNoEditableChannel<ChannelType> {
105
105
  export declare class MessagesMethods extends DiscordBase {
106
106
  typing(): Promise<void>;
107
107
  messages: {
108
- write: (body: MessageCreateBodyRequest) => Promise<import("./Message").Message>;
109
- edit: (messageId: string, body: MessageUpdateBodyRequest) => Promise<import("./Message").Message>;
110
- crosspost: (messageId: string, reason?: string) => Promise<import("./Message").Message>;
108
+ write: (body: MessageCreateBodyRequest) => Promise<MessageStructure>;
109
+ edit: (messageId: string, body: MessageUpdateBodyRequest) => Promise<MessageStructure>;
110
+ crosspost: (messageId: string, reason?: string) => Promise<MessageStructure>;
111
111
  delete: (messageId: string, reason?: string) => Promise<void>;
112
- fetch: (messageId: string, force?: boolean) => Promise<import("./Message").Message>;
112
+ fetch: (messageId: string, force?: boolean) => Promise<MessageStructure>;
113
113
  purge: (messages: string[], reason?: string) => Promise<void | undefined>;
114
- list: (fetchOptions: RESTGetAPIChannelMessagesQuery) => Promise<import("./Message").Message[]>;
114
+ list: (fetchOptions: RESTGetAPIChannelMessagesQuery) => Promise<MessageStructure[]>;
115
115
  };
116
116
  pins: {
117
- fetch: () => Promise<import("./Message").Message[]>;
117
+ fetch: () => Promise<MessageStructure[]>;
118
118
  set: (messageId: string, reason?: string) => Promise<never>;
119
119
  delete: (messageId: string, reason?: string) => Promise<never>;
120
120
  };
121
121
  reactions: {
122
122
  add: (messageId: string, emoji: EmojiResolvable) => Promise<void>;
123
123
  delete: (messageId: string, emoji: EmojiResolvable, userId?: string) => Promise<void>;
124
- fetch: (messageId: string, emoji: EmojiResolvable, query?: RESTGetAPIChannelMessageReactionUsersQuery) => Promise<import("./User").User[]>;
124
+ fetch: (messageId: string, emoji: EmojiResolvable, query?: RESTGetAPIChannelMessageReactionUsersQuery) => Promise<UserStructure[]>;
125
125
  purge: (messageId: string, emoji?: EmojiResolvable) => Promise<void>;
126
126
  };
127
127
  static messages(ctx: MethodContext<{
128
128
  channelId: string;
129
129
  }>): {
130
- write: (body: MessageCreateBodyRequest) => Promise<import("./Message").Message>;
131
- edit: (messageId: string, body: MessageUpdateBodyRequest) => Promise<import("./Message").Message>;
132
- crosspost: (messageId: string, reason?: string) => Promise<import("./Message").Message>;
130
+ write: (body: MessageCreateBodyRequest) => Promise<MessageStructure>;
131
+ edit: (messageId: string, body: MessageUpdateBodyRequest) => Promise<MessageStructure>;
132
+ crosspost: (messageId: string, reason?: string) => Promise<MessageStructure>;
133
133
  delete: (messageId: string, reason?: string) => Promise<void>;
134
- fetch: (messageId: string, force?: boolean) => Promise<import("./Message").Message>;
134
+ fetch: (messageId: string, force?: boolean) => Promise<MessageStructure>;
135
135
  purge: (messages: string[], reason?: string) => Promise<void | undefined>;
136
- list: (fetchOptions: RESTGetAPIChannelMessagesQuery) => Promise<import("./Message").Message[]>;
136
+ list: (fetchOptions: RESTGetAPIChannelMessagesQuery) => Promise<MessageStructure[]>;
137
137
  };
138
138
  static reactions(ctx: MethodContext<{
139
139
  channelId: string;
140
140
  }>): {
141
141
  add: (messageId: string, emoji: EmojiResolvable) => Promise<void>;
142
142
  delete: (messageId: string, emoji: EmojiResolvable, userId?: string) => Promise<void>;
143
- fetch: (messageId: string, emoji: EmojiResolvable, query?: RESTGetAPIChannelMessageReactionUsersQuery) => Promise<import("./User").User[]>;
143
+ fetch: (messageId: string, emoji: EmojiResolvable, query?: RESTGetAPIChannelMessageReactionUsersQuery) => Promise<UserStructure[]>;
144
144
  purge: (messageId: string, emoji?: EmojiResolvable) => Promise<void>;
145
145
  };
146
146
  static pins(ctx: MethodContext<{
147
147
  channelId: string;
148
148
  }>): {
149
- fetch: () => Promise<import("./Message").Message[]>;
149
+ fetch: () => Promise<MessageStructure[]>;
150
150
  set: (messageId: string, reason?: string) => Promise<never>;
151
151
  delete: (messageId: string, reason?: string) => Promise<never>;
152
152
  };
@@ -170,7 +170,7 @@ export declare class ThreadOnlyMethods extends DiscordBase {
170
170
  setReactionEmoji(emoji: APIGuildForumDefaultReactionEmoji, reason?: string): Promise<this>;
171
171
  setSortOrder(sort: SortOrderType, reason?: string): Promise<this>;
172
172
  setThreadRateLimit(rate: number, reason?: string): Promise<this>;
173
- thread(body: RESTPostAPIGuildForumThreadsJSONBody, reason?: string): Promise<ThreadChannel>;
173
+ thread(body: RESTPostAPIGuildForumThreadsJSONBody, reason?: string): Promise<ThreadChannelStructure>;
174
174
  }
175
175
  export interface VoiceChannelMethods extends BaseChannel<ChannelType> {
176
176
  guildId?: string;
@@ -180,30 +180,30 @@ export declare class VoiceChannelMethods extends DiscordBase {
180
180
  setUserLimit(user_limit: number | null, reason?: string): Promise<this>;
181
181
  setRTC(rtc_region: string | null, reason?: string): Promise<this>;
182
182
  setVideoQuality(quality: keyof typeof VideoQualityMode, reason?: string): Promise<this>;
183
- setVoiceState(status?: string | null): Promise<never>;
183
+ setVoiceStatus(status?: string | null): Promise<never>;
184
184
  states(): ReturnCache<VoiceStateStructure[]>;
185
- members(force?: boolean): Promise<Collection<string, GuildMember>>;
185
+ members(force?: boolean): Promise<Collection<string, GuildMemberStructure>>;
186
186
  }
187
187
  export declare class WebhookGuildMethods extends DiscordBase {
188
188
  webhooks: {
189
- list: () => Promise<import("./Webhook").Webhook[]>;
189
+ list: () => Promise<WebhookStructure[]>;
190
190
  };
191
191
  static guild(ctx: MethodContext<{
192
192
  guildId: string;
193
193
  }>): {
194
- list: () => Promise<import("./Webhook").Webhook[]>;
194
+ list: () => Promise<WebhookStructure[]>;
195
195
  };
196
196
  }
197
197
  export declare class WebhookChannelMethods extends DiscordBase {
198
198
  webhooks: {
199
- list: () => Promise<import("./Webhook").Webhook[]>;
200
- create: (body: RESTPostAPIChannelWebhookJSONBody) => Promise<import("./Webhook").Webhook>;
199
+ list: () => Promise<WebhookStructure[]>;
200
+ create: (body: RESTPostAPIChannelWebhookJSONBody) => Promise<WebhookStructure>;
201
201
  };
202
202
  static channel(ctx: MethodContext<{
203
203
  channelId: string;
204
204
  }>): {
205
- list: () => Promise<import("./Webhook").Webhook[]>;
206
- create: (body: RESTPostAPIChannelWebhookJSONBody) => Promise<import("./Webhook").Webhook>;
205
+ list: () => Promise<WebhookStructure[]>;
206
+ create: (body: RESTPostAPIChannelWebhookJSONBody) => Promise<WebhookStructure>;
207
207
  };
208
208
  }
209
209
  export interface TextGuildChannel extends ObjectToLower<Omit<APITextChannel, 'type' | 'permission_overwrites'>>, BaseGuildChannel, TextBaseGuildChannel, WebhookChannelMethods {
@@ -242,8 +242,8 @@ export declare class ThreadChannel extends BaseChannel<ChannelType.PublicThread
242
242
  parentId: string;
243
243
  type: ChannelType.PublicThread | ChannelType.AnnouncementThread | ChannelType.PrivateThread;
244
244
  webhooks: {
245
- list: () => Promise<import("./Webhook").Webhook[]>;
246
- create: (body: RESTPostAPIChannelWebhookJSONBody) => Promise<import("./Webhook").Webhook>;
245
+ list: () => Promise<WebhookStructure[]>;
246
+ create: (body: RESTPostAPIChannelWebhookJSONBody) => Promise<WebhookStructure>;
247
247
  };
248
248
  join(): Promise<this>;
249
249
  leave(): Promise<this>;
@@ -291,7 +291,7 @@ class VoiceChannelMethods extends DiscordBase_1.DiscordBase {
291
291
  setVideoQuality(quality, reason) {
292
292
  return this.edit({ video_quality_mode: types_1.VideoQualityMode[quality] }, reason);
293
293
  }
294
- setVoiceState(status = null) {
294
+ setVoiceStatus(status = null) {
295
295
  return this.client.channels.setVoiceStatus(this.id, status);
296
296
  }
297
297
  states() {
@@ -1,3 +1,4 @@
1
+ import type { InternalRuntimeConfig, InternalRuntimeConfigHTTP } from '../../client/base';
1
2
  import type { Awaitable, DeepPartial, Logger } from '../../common';
2
3
  import type { APIGatewayBotInfo, GatewayDispatchPayload, GatewayIntentBits, GatewayPresenceUpdateData } from '../../types';
3
4
  import type { IdentifyProperties } from '../constants';
@@ -56,6 +57,7 @@ export interface WorkerManagerOptions extends Omit<ShardManagerOptions, 'handleP
56
57
  handlePayload?(shardId: number, workerId: number, packet: GatewayDispatchPayload): any;
57
58
  handleWorkerMessage?(message: WorkerMessages): any;
58
59
  properties?: DeepPartial<NonNullable<ShardManagerOptions['properties']>>;
60
+ getRC?(): Awaitable<InternalRuntimeConfig | InternalRuntimeConfigHTTP>;
59
61
  }
60
62
  export interface ShardData {
61
63
  /** resume seq to resume connections */
@@ -19,7 +19,7 @@ export declare class WorkerManager extends Map<number, (ClusterWorker | WorkerTh
19
19
  shardEnd: number;
20
20
  shardsPerWorker: number;
21
21
  }, logger?: Logger): number[][];
22
- options: PickPartial<Required<WorkerManagerOptions>, 'adapter' | 'handleWorkerMessage' | 'handlePayload'>;
22
+ options: PickPartial<Required<WorkerManagerOptions>, 'adapter' | 'handleWorkerMessage' | 'handlePayload' | 'getRC'>;
23
23
  debugger?: Logger;
24
24
  connectQueue: ConnectQueue;
25
25
  workerQueue: (() => void)[];
@@ -480,8 +480,9 @@ class WorkerManager extends Map {
480
480
  return Promise.all(promises);
481
481
  }
482
482
  async start() {
483
- const rc = await base_1.BaseClient.prototype.getRC();
484
- this.options.debug ||= rc.debug;
483
+ const rc = (await this.options.getRC?.()) ??
484
+ (await base_1.BaseClient.prototype.getRC());
485
+ this.options.debug ||= rc.debug ?? false;
485
486
  this.options.intents ||= rc.intents ?? 0;
486
487
  this.options.token ??= rc.token;
487
488
  this.rest ??= new __1.ApiHandler({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "seyfert",
3
- "version": "2.1.1-dev-12404125172.0",
3
+ "version": "2.1.1-dev-12450598903.0",
4
4
  "description": "The most advanced framework for discord bots",
5
5
  "main": "./lib/index.js",
6
6
  "module": "./lib/index.js",
@@ -22,11 +22,11 @@
22
22
  "license": "MIT",
23
23
  "devDependencies": {
24
24
  "@biomejs/biome": "1.9.4",
25
- "@commitlint/cli": "^19.6.0",
25
+ "@commitlint/cli": "^19.6.1",
26
26
  "@commitlint/config-conventional": "^19.6.0",
27
- "@types/node": "^22.10.1",
27
+ "@types/node": "^22.10.2",
28
28
  "husky": "^9.1.7",
29
- "lint-staged": "^15.2.10",
29
+ "lint-staged": "^15.2.11",
30
30
  "typescript": "^5.7.2",
31
31
  "vitest": "^2.1.8"
32
32
  },