seyfert 2.1.1-dev-12418439067.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.
- package/lib/commands/applications/chatcontext.d.ts +5 -5
- package/lib/commands/applications/entrycontext.d.ts +8 -8
- package/lib/commands/applications/menucontext.d.ts +10 -10
- package/lib/commands/handle.d.ts +1 -1
- package/lib/commands/optionresolver.d.ts +1 -1
- package/lib/common/shorters/application.d.ts +3 -2
- package/lib/common/shorters/bans.d.ts +3 -2
- package/lib/common/shorters/channels.d.ts +3 -3
- package/lib/common/shorters/emojis.d.ts +5 -4
- package/lib/common/shorters/guilds.d.ts +18 -18
- package/lib/common/shorters/guilds.js +2 -2
- package/lib/common/shorters/interaction.d.ts +6 -5
- package/lib/common/shorters/members.d.ts +10 -10
- package/lib/common/shorters/messages.d.ts +9 -8
- package/lib/common/shorters/roles.d.ts +7 -6
- package/lib/common/shorters/templates.d.ts +7 -6
- package/lib/common/shorters/threads.d.ts +7 -6
- package/lib/common/shorters/threads.js +2 -2
- package/lib/common/shorters/users.d.ts +5 -4
- package/lib/common/shorters/webhook.d.ts +9 -8
- package/lib/components/componentcontext.d.ts +9 -9
- package/lib/components/modalcontext.d.ts +9 -9
- package/lib/events/hooks/auto_moderation.d.ts +4 -3
- package/lib/events/hooks/custom.d.ts +7 -7
- package/lib/events/hooks/dispatch.d.ts +2 -1
- package/lib/events/hooks/entitlement.d.ts +4 -3
- package/lib/events/hooks/guild.d.ts +20 -105
- package/lib/events/hooks/integration.d.ts +8 -148
- package/lib/events/hooks/message.d.ts +3 -6
- package/lib/events/hooks/soundboard.d.ts +12 -115
- package/lib/events/hooks/thread.d.ts +3 -7
- package/lib/events/hooks/typing.d.ts +5 -49
- package/lib/structures/AutoModerationRule.d.ts +9 -8
- package/lib/structures/ClientUser.d.ts +3 -2
- package/lib/structures/Guild.d.ts +33 -38
- package/lib/structures/GuildBan.d.ts +5 -4
- package/lib/structures/GuildEmoji.d.ts +8 -7
- package/lib/structures/GuildMember.d.ts +17 -16
- package/lib/structures/GuildRole.d.ts +10 -9
- package/lib/structures/GuildTemplate.d.ts +12 -11
- package/lib/structures/Interaction.d.ts +7 -7
- package/lib/structures/Interaction.js +1 -1
- package/lib/structures/Message.d.ts +14 -14
- package/lib/structures/Poll.d.ts +3 -2
- package/lib/structures/Sticker.d.ts +8 -8
- package/lib/structures/User.d.ts +4 -3
- package/lib/structures/VoiceState.d.ts +8 -8
- package/lib/structures/Webhook.d.ts +8 -7
- package/lib/structures/channels.d.ts +27 -27
- package/lib/structures/channels.js +1 -1
- 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<
|
|
73
|
-
fetchResponse(): Promise<
|
|
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<
|
|
78
|
-
editResponse(body: InteractionMessageUpdateBodyRequest): Promise<
|
|
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<
|
|
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,
|
|
182
|
-
deferUpdate<WR extends boolean = false>(withResponse?: WR): Promise<When<WR,
|
|
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
|
-
|
|
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():
|
|
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<
|
|
34
|
-
channel(force?: boolean): Promise<
|
|
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<
|
|
43
|
-
reply(body: Omit<MessageCreateBodyRequest, 'message_reference'>, fail?: boolean): Promise<
|
|
44
|
-
edit(body: MessageUpdateBodyRequest): Promise<
|
|
45
|
-
write(body: MessageCreateBodyRequest): Promise<
|
|
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<
|
|
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<
|
|
56
|
-
fetch(): Promise<
|
|
57
|
-
edit(body: EditMessageWebhook): Promise<
|
|
58
|
-
write(body: WriteMessageWebhook): Promise<
|
|
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 {
|
package/lib/structures/Poll.d.ts
CHANGED
|
@@ -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<
|
|
15
|
-
getAnswerVoters(id: ValidAnswerId): Promise<
|
|
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<
|
|
13
|
-
edit(body: RESTPatchAPIGuildStickerJSONBody, reason?: string): Promise<
|
|
14
|
-
fetch(force?: boolean): Promise<
|
|
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<
|
|
20
|
-
create: (payload: CreateStickerBodyRequest, reason?: string) => Promise<
|
|
21
|
-
edit: (stickerId: string, body: RESTPatchAPIGuildStickerJSONBody, reason?: string) => Promise<
|
|
22
|
-
fetch: (stickerId: string, force?: boolean) => Promise<
|
|
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
|
}
|
package/lib/structures/User.d.ts
CHANGED
|
@@ -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<
|
|
14
|
+
fetch(force?: boolean): Promise<UserStructure>;
|
|
14
15
|
/**
|
|
15
16
|
* Open a DM with the user
|
|
16
17
|
*/
|
|
17
|
-
dm(force?: boolean): Promise<
|
|
18
|
-
write(body: MessageCreateBodyRequest): Promise<
|
|
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<
|
|
15
|
-
user(force?: boolean): Promise<
|
|
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<
|
|
18
|
-
setDeaf(deaf?: boolean, reason?: string): Promise<
|
|
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<
|
|
22
|
-
fetch(force?: boolean): Promise<
|
|
23
|
-
setChannel(channel_id: null | string, reason?: string): Promise<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
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<
|
|
72
|
+
write: (payload: MessageWebhookMethodWriteParams) => Promise<WebhookMessageStructure | null>;
|
|
72
73
|
/** Edits a message sent through the webhook. */
|
|
73
|
-
edit: (payload: MessageWebhookMethodEditParams) => Promise<
|
|
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<
|
|
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<
|
|
109
|
-
edit: (messageId: string, body: MessageUpdateBodyRequest) => Promise<
|
|
110
|
-
crosspost: (messageId: string, reason?: string) => Promise<
|
|
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<
|
|
112
|
+
fetch: (messageId: string, force?: boolean) => Promise<MessageStructure>;
|
|
113
113
|
purge: (messages: string[], reason?: string) => Promise<void | undefined>;
|
|
114
|
-
list: (fetchOptions: RESTGetAPIChannelMessagesQuery) => Promise<
|
|
114
|
+
list: (fetchOptions: RESTGetAPIChannelMessagesQuery) => Promise<MessageStructure[]>;
|
|
115
115
|
};
|
|
116
116
|
pins: {
|
|
117
|
-
fetch: () => Promise<
|
|
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<
|
|
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<
|
|
131
|
-
edit: (messageId: string, body: MessageUpdateBodyRequest) => Promise<
|
|
132
|
-
crosspost: (messageId: string, reason?: string) => Promise<
|
|
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<
|
|
134
|
+
fetch: (messageId: string, force?: boolean) => Promise<MessageStructure>;
|
|
135
135
|
purge: (messages: string[], reason?: string) => Promise<void | undefined>;
|
|
136
|
-
list: (fetchOptions: RESTGetAPIChannelMessagesQuery) => Promise<
|
|
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<
|
|
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<
|
|
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<
|
|
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
|
-
|
|
183
|
+
setVoiceStatus(status?: string | null): Promise<never>;
|
|
184
184
|
states(): ReturnCache<VoiceStateStructure[]>;
|
|
185
|
-
members(force?: boolean): Promise<Collection<string,
|
|
185
|
+
members(force?: boolean): Promise<Collection<string, GuildMemberStructure>>;
|
|
186
186
|
}
|
|
187
187
|
export declare class WebhookGuildMethods extends DiscordBase {
|
|
188
188
|
webhooks: {
|
|
189
|
-
list: () => Promise<
|
|
189
|
+
list: () => Promise<WebhookStructure[]>;
|
|
190
190
|
};
|
|
191
191
|
static guild(ctx: MethodContext<{
|
|
192
192
|
guildId: string;
|
|
193
193
|
}>): {
|
|
194
|
-
list: () => Promise<
|
|
194
|
+
list: () => Promise<WebhookStructure[]>;
|
|
195
195
|
};
|
|
196
196
|
}
|
|
197
197
|
export declare class WebhookChannelMethods extends DiscordBase {
|
|
198
198
|
webhooks: {
|
|
199
|
-
list: () => Promise<
|
|
200
|
-
create: (body: RESTPostAPIChannelWebhookJSONBody) => Promise<
|
|
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<
|
|
206
|
-
create: (body: RESTPostAPIChannelWebhookJSONBody) => Promise<
|
|
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<
|
|
246
|
-
create: (body: RESTPostAPIChannelWebhookJSONBody) => Promise<
|
|
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
|
-
|
|
294
|
+
setVoiceStatus(status = null) {
|
|
295
295
|
return this.client.channels.setVoiceStatus(this.id, status);
|
|
296
296
|
}
|
|
297
297
|
states() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "seyfert",
|
|
3
|
-
"version": "2.1.1-dev-
|
|
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.
|
|
25
|
+
"@commitlint/cli": "^19.6.1",
|
|
26
26
|
"@commitlint/config-conventional": "^19.6.0",
|
|
27
|
-
"@types/node": "^22.10.
|
|
27
|
+
"@types/node": "^22.10.2",
|
|
28
28
|
"husky": "^9.1.7",
|
|
29
|
-
"lint-staged": "^15.2.
|
|
29
|
+
"lint-staged": "^15.2.11",
|
|
30
30
|
"typescript": "^5.7.2",
|
|
31
31
|
"vitest": "^2.1.8"
|
|
32
32
|
},
|