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.
- 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/lib/websocket/discord/shared.d.ts +2 -0
- package/lib/websocket/discord/workermanager.d.ts +1 -1
- package/lib/websocket/discord/workermanager.js +3 -2
- package/package.json +4 -4
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { GuildMemberStructure, GuildStructure, InteractionGuildMemberStructure, MessageStructure, OptionResolverStructure, WebhookMessageStructure } from '../../client/transformers';
|
|
1
|
+
import type { ReturnCache } from '../..';
|
|
2
|
+
import type { GuildMemberStructure, GuildStructure, InteractionGuildMemberStructure, MessageStructure, OptionResolverStructure, UserStructure, WebhookMessageStructure } from '../../client/transformers';
|
|
3
3
|
import type { If, MakeRequired, UnionToTuple, When } from '../../common';
|
|
4
4
|
import type { InteractionCreateBodyRequest, InteractionMessageUpdateBodyRequest } from '../../common/types/write';
|
|
5
|
-
import { ChatInputCommandInteraction } from '../../structures';
|
|
5
|
+
import { type AllChannels, ChatInputCommandInteraction } from '../../structures';
|
|
6
6
|
import { BaseContext } from '../basecontext';
|
|
7
7
|
import type { RegisteredMiddlewares } from '../decorators';
|
|
8
8
|
import type { Command, ContextOptions, OptionsRecord, SubCommand } from './chat';
|
|
9
|
-
import type { CommandMetadata, ExtendContext, GlobalMetadata, UsingClient } from './shared';
|
|
9
|
+
import type { CommandMetadata, ExtendContext, GlobalMetadata, InferWithPrefix, UsingClient } from './shared';
|
|
10
10
|
export interface CommandContext<T extends OptionsRecord = {}, M extends keyof RegisteredMiddlewares = never> extends BaseContext, ExtendContext {
|
|
11
11
|
}
|
|
12
12
|
export declare class CommandContext<T extends OptionsRecord = {}, M extends keyof RegisteredMiddlewares = never> extends BaseContext {
|
|
@@ -40,7 +40,7 @@ export declare class CommandContext<T extends OptionsRecord = {}, M extends keyo
|
|
|
40
40
|
guild(mode?: 'cache'): ReturnCache<GuildStructure<'cached'> | undefined>;
|
|
41
41
|
get guildId(): string | undefined;
|
|
42
42
|
get channelId(): string;
|
|
43
|
-
get author():
|
|
43
|
+
get author(): UserStructure;
|
|
44
44
|
get member(): If<InferWithPrefix, GuildMemberStructure | InteractionGuildMemberStructure | undefined, InteractionGuildMemberStructure | undefined>;
|
|
45
45
|
isChat(): this is CommandContext<T, M>;
|
|
46
46
|
inGuild(): this is GuildCommandContext<T, M>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReturnCache } from '../..';
|
|
2
|
-
import type { GuildMemberStructure, GuildStructure } from '../../client/transformers';
|
|
3
|
-
import type { InteractionCreateBodyRequest, InteractionMessageUpdateBodyRequest, MakeRequired, ModalCreateBodyRequest, UnionToTuple } from '../../common';
|
|
2
|
+
import type { GuildMemberStructure, GuildStructure, InteractionGuildMemberStructure, UserStructure, WebhookMessageStructure } from '../../client/transformers';
|
|
3
|
+
import type { InteractionCreateBodyRequest, InteractionMessageUpdateBodyRequest, MakeRequired, ModalCreateBodyRequest, UnionToTuple, When } from '../../common';
|
|
4
4
|
import type { AllChannels, EntryPointInteraction } from '../../structures';
|
|
5
5
|
import { BaseContext } from '../basecontext';
|
|
6
6
|
import type { RegisteredMiddlewares } from '../decorators';
|
|
@@ -20,12 +20,12 @@ export declare class EntryPointContext<M extends keyof RegisteredMiddlewares = n
|
|
|
20
20
|
get(locale?: string): import("./shared").DefaultLocale;
|
|
21
21
|
};
|
|
22
22
|
get fullCommandName(): string;
|
|
23
|
-
write<WR extends boolean = false>(body: InteractionCreateBodyRequest, withResponse?: WR): Promise<
|
|
23
|
+
write<WR extends boolean = false>(body: InteractionCreateBodyRequest, withResponse?: WR): Promise<When<WR, WebhookMessageStructure, void>>;
|
|
24
24
|
modal(body: ModalCreateBodyRequest): Promise<undefined>;
|
|
25
|
-
deferReply<WR extends boolean = false>(ephemeral?: boolean, withResponse?: WR): Promise<
|
|
26
|
-
editResponse(body: InteractionMessageUpdateBodyRequest): Promise<
|
|
25
|
+
deferReply<WR extends boolean = false>(ephemeral?: boolean, withResponse?: WR): Promise<When<WR, WebhookMessageStructure, undefined>>;
|
|
26
|
+
editResponse(body: InteractionMessageUpdateBodyRequest): Promise<WebhookMessageStructure>;
|
|
27
27
|
deleteResponse(): Promise<void>;
|
|
28
|
-
editOrReply<WR extends boolean = false>(body: InteractionCreateBodyRequest | InteractionMessageUpdateBodyRequest, withResponse?: WR): Promise<
|
|
28
|
+
editOrReply<WR extends boolean = false>(body: InteractionCreateBodyRequest | InteractionMessageUpdateBodyRequest, withResponse?: WR): Promise<When<WR, WebhookMessageStructure, void>>;
|
|
29
29
|
fetchResponse(): Promise<import("../..").WebhookMessage>;
|
|
30
30
|
channel(mode?: 'rest' | 'flow'): Promise<AllChannels>;
|
|
31
31
|
channel(mode?: 'cache'): ReturnCache<AllChannels>;
|
|
@@ -35,8 +35,8 @@ export declare class EntryPointContext<M extends keyof RegisteredMiddlewares = n
|
|
|
35
35
|
guild(mode?: 'cache'): ReturnCache<GuildStructure<'cached'> | undefined>;
|
|
36
36
|
get guildId(): string | undefined;
|
|
37
37
|
get channelId(): string;
|
|
38
|
-
get author():
|
|
39
|
-
get member():
|
|
38
|
+
get author(): UserStructure;
|
|
39
|
+
get member(): InteractionGuildMemberStructure | undefined;
|
|
40
40
|
isEntryPoint(): this is EntryPointContext<M>;
|
|
41
41
|
inGuild(): this is GuildEntryPointContext<M>;
|
|
42
42
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ContextMenuCommand, ReturnCache } from '../..';
|
|
2
|
-
import { type GuildMemberStructure, type GuildStructure, type MessageStructure, type UserStructure } from '../../client/transformers';
|
|
3
|
-
import { type InteractionCreateBodyRequest, type InteractionMessageUpdateBodyRequest, type MakeRequired, type ModalCreateBodyRequest, type UnionToTuple } from '../../common';
|
|
1
|
+
import type { ContextMenuCommand, InteractionGuildMemberStructure, ReturnCache } from '../..';
|
|
2
|
+
import { type GuildMemberStructure, type GuildStructure, type MessageStructure, type UserStructure, type WebhookMessageStructure } from '../../client/transformers';
|
|
3
|
+
import { type InteractionCreateBodyRequest, type InteractionMessageUpdateBodyRequest, type MakeRequired, type ModalCreateBodyRequest, type UnionToTuple, type When } from '../../common';
|
|
4
4
|
import type { AllChannels, MessageCommandInteraction, UserCommandInteraction } from '../../structures';
|
|
5
5
|
import { BaseContext } from '../basecontext';
|
|
6
6
|
import type { RegisteredMiddlewares } from '../decorators';
|
|
@@ -21,13 +21,13 @@ export declare class MenuCommandContext<T extends MessageCommandInteraction | Us
|
|
|
21
21
|
get(locale?: string): import("./shared").DefaultLocale;
|
|
22
22
|
};
|
|
23
23
|
get fullCommandName(): string;
|
|
24
|
-
write<WR extends boolean = false>(body: InteractionCreateBodyRequest, withResponse?: WR): Promise<
|
|
24
|
+
write<WR extends boolean = false>(body: InteractionCreateBodyRequest, withResponse?: WR): Promise<When<WR, WebhookMessageStructure, void>>;
|
|
25
25
|
modal(body: ModalCreateBodyRequest): Promise<undefined>;
|
|
26
|
-
deferReply<WR extends boolean = false>(ephemeral?: boolean, withResponse?: WR): Promise<
|
|
27
|
-
editResponse(body: InteractionMessageUpdateBodyRequest): Promise<
|
|
26
|
+
deferReply<WR extends boolean = false>(ephemeral?: boolean, withResponse?: WR): Promise<When<WR, WebhookMessageStructure, undefined>>;
|
|
27
|
+
editResponse(body: InteractionMessageUpdateBodyRequest): Promise<WebhookMessageStructure>;
|
|
28
28
|
deleteResponse(): Promise<void>;
|
|
29
|
-
editOrReply<WR extends boolean = false>(body: InteractionCreateBodyRequest | InteractionMessageUpdateBodyRequest, withResponse?: WR): Promise<
|
|
30
|
-
fetchResponse(): Promise<
|
|
29
|
+
editOrReply<WR extends boolean = false>(body: InteractionCreateBodyRequest | InteractionMessageUpdateBodyRequest, withResponse?: WR): Promise<When<WR, WebhookMessageStructure, void>>;
|
|
30
|
+
fetchResponse(): Promise<WebhookMessageStructure>;
|
|
31
31
|
channel(mode?: 'rest' | 'flow'): Promise<AllChannels>;
|
|
32
32
|
channel(mode?: 'cache'): ReturnCache<AllChannels>;
|
|
33
33
|
me(mode?: 'rest' | 'flow'): Promise<GuildMemberStructure>;
|
|
@@ -36,8 +36,8 @@ export declare class MenuCommandContext<T extends MessageCommandInteraction | Us
|
|
|
36
36
|
guild(mode?: 'cache'): ReturnCache<GuildStructure<'cached'> | undefined>;
|
|
37
37
|
get guildId(): string | undefined;
|
|
38
38
|
get channelId(): string;
|
|
39
|
-
get author():
|
|
40
|
-
get member():
|
|
39
|
+
get author(): UserStructure;
|
|
40
|
+
get member(): InteractionGuildMemberStructure | undefined;
|
|
41
41
|
isMenu(): this is MenuCommandContext<UserCommandInteraction | MessageCommandInteraction>;
|
|
42
42
|
isMenuUser(): this is MenuCommandContext<UserCommandInteraction>;
|
|
43
43
|
isMenuMessage(): this is MenuCommandContext<MessageCommandInteraction>;
|
package/lib/commands/handle.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare class HandleCommand {
|
|
|
30
30
|
argsContent?: string;
|
|
31
31
|
};
|
|
32
32
|
getCommandFromContent(commandRaw: string[]): CommandFromContent;
|
|
33
|
-
makeResolver(...args: Parameters<(typeof Transformers)['OptionResolver']>):
|
|
33
|
+
makeResolver(...args: Parameters<(typeof Transformers)['OptionResolver']>): OptionResolverStructure;
|
|
34
34
|
getParentMessageCommand(rawParentName: string): Command | ContextMenuCommand | undefined;
|
|
35
35
|
getCommand<T extends Command | ContextMenuCommand | EntryPointCommand>(data: {
|
|
36
36
|
guild_id?: string;
|
|
@@ -31,7 +31,7 @@ export declare class OptionResolver {
|
|
|
31
31
|
getGroup(): string | null;
|
|
32
32
|
get(name: string): OptionResolved | undefined;
|
|
33
33
|
getHoisted(name: string): OptionResolved | undefined;
|
|
34
|
-
getValue(name: string):
|
|
34
|
+
getValue(name: string): AllChannels | Attachment | boolean | number | string | UserStructure | GuildMemberStructure | InteractionGuildMemberStructure | GuildRoleStructure | undefined;
|
|
35
35
|
private getTypedOption;
|
|
36
36
|
getChannel(name: string, required?: true): AllChannels;
|
|
37
37
|
getString(name: string, required?: true): string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type EntitlementStructure } from '../../client';
|
|
1
2
|
import type { RESTGetAPIEntitlementsQuery, RESTPostAPIApplicationEmojiJSONBody, RESTPostAPIEntitlementBody } from '../../types';
|
|
2
3
|
import { BaseShorter } from './base';
|
|
3
4
|
export declare class ApplicationShorter extends BaseShorter {
|
|
@@ -27,7 +28,7 @@ export declare class ApplicationShorter extends BaseShorter {
|
|
|
27
28
|
* @param applicationId The ID of the application.
|
|
28
29
|
* @param [query] The query parameters.
|
|
29
30
|
*/
|
|
30
|
-
listEntitlements(applicationId: string, query?: RESTGetAPIEntitlementsQuery): Promise<
|
|
31
|
+
listEntitlements(applicationId: string, query?: RESTGetAPIEntitlementsQuery): Promise<EntitlementStructure[]>;
|
|
31
32
|
/**
|
|
32
33
|
* Consumes an entitlement for the application.
|
|
33
34
|
* @param applicationId The ID of the application.
|
|
@@ -39,7 +40,7 @@ export declare class ApplicationShorter extends BaseShorter {
|
|
|
39
40
|
* @param applicationId The ID of the application.
|
|
40
41
|
* @param body The body of the request.
|
|
41
42
|
*/
|
|
42
|
-
createTestEntitlement(applicationId: string, body: RESTPostAPIEntitlementBody): Promise<
|
|
43
|
+
createTestEntitlement(applicationId: string, body: RESTPostAPIEntitlementBody): Promise<EntitlementStructure>;
|
|
43
44
|
/**
|
|
44
45
|
* Deletes a test entitlement for the application.
|
|
45
46
|
* @param applicationId The ID of the application.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type GuildBanStructure } from '../../client/transformers';
|
|
1
2
|
import type { RESTGetAPIGuildBansQuery, RESTPostAPIGuildBulkBanJSONBody, RESTPutAPIGuildBanJSONBody } from '../../types';
|
|
2
3
|
import { BaseShorter } from './base';
|
|
3
4
|
export declare class BanShorter extends BaseShorter {
|
|
@@ -30,7 +31,7 @@ export declare class BanShorter extends BaseShorter {
|
|
|
30
31
|
* @param force Whether to force fetching the ban from the API even if it exists in the cache.
|
|
31
32
|
* @returns A Promise that resolves to the fetched ban.
|
|
32
33
|
*/
|
|
33
|
-
fetch(guildId: string, userId: string, force?: boolean): Promise<
|
|
34
|
+
fetch(guildId: string, userId: string, force?: boolean): Promise<GuildBanStructure>;
|
|
34
35
|
/**
|
|
35
36
|
* Lists bans in the guild based on the provided query.
|
|
36
37
|
* @param guildId The ID of the guild.
|
|
@@ -38,5 +39,5 @@ export declare class BanShorter extends BaseShorter {
|
|
|
38
39
|
* @param force Whether to force listing bans from the API even if they exist in the cache.
|
|
39
40
|
* @returns A Promise that resolves to an array of listed bans.
|
|
40
41
|
*/
|
|
41
|
-
list(guildId: string, query?: RESTGetAPIGuildBansQuery, force?: boolean): Promise<
|
|
42
|
+
list(guildId: string, query?: RESTGetAPIGuildBansQuery, force?: boolean): Promise<GuildBanStructure[]>;
|
|
42
43
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type MessageStructure } from '../../client/transformers';
|
|
1
|
+
import { type MessageStructure, type ThreadChannelStructure } from '../../client/transformers';
|
|
2
2
|
import { type AllChannels, type GuildMember, type GuildRole } from '../../structures';
|
|
3
3
|
import { PermissionsBitField } from '../../structures/extra/Permissions';
|
|
4
4
|
import type { APIChannel, RESTGetAPIChannelMessagesQuery, RESTPatchAPIChannelJSONBody, RESTPostAPIChannelThreadsJSONBody, RESTPostAPIGuildForumThreadsJSONBody } from '../../types';
|
|
@@ -56,7 +56,7 @@ export declare class ChannelShorter extends BaseShorter {
|
|
|
56
56
|
* @param reason The reason for unpinning the message.
|
|
57
57
|
* @returns A promise that resolves when the thread is succesfully created.
|
|
58
58
|
*/
|
|
59
|
-
thread(channelId: string, body: RESTPostAPIChannelThreadsJSONBody | RESTPostAPIGuildForumThreadsJSONBody, reason?: string): Promise<
|
|
59
|
+
thread(channelId: string, body: RESTPostAPIChannelThreadsJSONBody | RESTPostAPIGuildForumThreadsJSONBody, reason?: string): Promise<ThreadChannelStructure>;
|
|
60
60
|
memberPermissions(channelId: string, member: GuildMember, checkAdmin?: boolean): Promise<PermissionsBitField>;
|
|
61
61
|
overwritesFor(channelId: string, member: GuildMember): Promise<{
|
|
62
62
|
everyone: {
|
|
@@ -82,7 +82,7 @@ export declare class ChannelShorter extends BaseShorter {
|
|
|
82
82
|
} | undefined;
|
|
83
83
|
}>;
|
|
84
84
|
rolePermissions(channelId: string, role: GuildRole, checkAdmin?: boolean): Promise<PermissionsBitField>;
|
|
85
|
-
fetchMessages(channelId: string, query?: RESTGetAPIChannelMessagesQuery): Promise<
|
|
85
|
+
fetchMessages(channelId: string, query?: RESTGetAPIChannelMessagesQuery): Promise<MessageStructure[]>;
|
|
86
86
|
setVoiceStatus(channelId: string, status?: string | null): Promise<never>;
|
|
87
87
|
}
|
|
88
88
|
export type ChannelShorterOptionalParams = Partial<{
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type GuildEmojiStructure } from '../../client/transformers';
|
|
1
2
|
import type { RESTPatchAPIGuildEmojiJSONBody, RESTPostAPIGuildEmojiJSONBody } from '../../types';
|
|
2
3
|
import type { ImageResolvable } from '../types/resolvables';
|
|
3
4
|
import type { OmitInsert } from '../types/util';
|
|
@@ -9,7 +10,7 @@ export declare class EmojiShorter extends BaseShorter {
|
|
|
9
10
|
* @param force Whether to force fetching emojis from the API even if they exist in the cache.
|
|
10
11
|
* @returns A Promise that resolves to an array of emojis.
|
|
11
12
|
*/
|
|
12
|
-
list(guildId: string, force?: boolean): Promise<
|
|
13
|
+
list(guildId: string, force?: boolean): Promise<GuildEmojiStructure[]>;
|
|
13
14
|
/**
|
|
14
15
|
* Creates a new emoji in the guild.
|
|
15
16
|
* @param guildId The ID of the guild.
|
|
@@ -18,7 +19,7 @@ export declare class EmojiShorter extends BaseShorter {
|
|
|
18
19
|
*/
|
|
19
20
|
create(guildId: string, body: OmitInsert<RESTPostAPIGuildEmojiJSONBody, 'image', {
|
|
20
21
|
image: ImageResolvable;
|
|
21
|
-
}>): Promise<
|
|
22
|
+
}>): Promise<GuildEmojiStructure>;
|
|
22
23
|
/**
|
|
23
24
|
* Fetches an emoji by its ID.
|
|
24
25
|
* @param guildId The ID of the guild.
|
|
@@ -26,7 +27,7 @@ export declare class EmojiShorter extends BaseShorter {
|
|
|
26
27
|
* @param force Whether to force fetching the emoji from the API even if it exists in the cache.
|
|
27
28
|
* @returns A Promise that resolves to the fetched emoji.
|
|
28
29
|
*/
|
|
29
|
-
fetch(guildId: string, emojiId: string, force?: boolean): Promise<
|
|
30
|
+
fetch(guildId: string, emojiId: string, force?: boolean): Promise<GuildEmojiStructure>;
|
|
30
31
|
/**
|
|
31
32
|
* Deletes an emoji from the guild.
|
|
32
33
|
* @param guildId The ID of the guild.
|
|
@@ -42,5 +43,5 @@ export declare class EmojiShorter extends BaseShorter {
|
|
|
42
43
|
* @param reason The reason for editing the emoji.
|
|
43
44
|
* @returns A Promise that resolves to the edited emoji.
|
|
44
45
|
*/
|
|
45
|
-
edit(guildId: string, emojiId: string, body: RESTPatchAPIGuildEmojiJSONBody, reason?: string): Promise<
|
|
46
|
+
edit(guildId: string, emojiId: string, body: RESTPatchAPIGuildEmojiJSONBody, reason?: string): Promise<GuildEmojiStructure>;
|
|
46
47
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type GuildStructure } from '../../client/transformers';
|
|
2
|
-
import { type CreateStickerBodyRequest, Guild
|
|
1
|
+
import { type AnonymousGuildStructure, type AutoModerationRuleStructure, type GuildMemberStructure, type GuildStructure, type StickerStructure } from '../../client/transformers';
|
|
2
|
+
import { type AllChannels, type CreateStickerBodyRequest, Guild } from '../../structures';
|
|
3
3
|
import type { GuildWidgetStyle, RESTGetAPICurrentUserGuildsQuery, RESTPatchAPIAutoModerationRuleJSONBody, RESTPatchAPIChannelJSONBody, RESTPatchAPIGuildChannelPositionsJSONBody, RESTPatchAPIGuildJSONBody, RESTPatchAPIGuildStickerJSONBody, RESTPostAPIAutoModerationRuleJSONBody, RESTPostAPIGuildChannelJSONBody, RESTPostAPIGuildsJSONBody } from '../../types';
|
|
4
4
|
import { BaseShorter } from './base';
|
|
5
5
|
export declare class GuildShorter extends BaseShorter {
|
|
@@ -15,7 +15,7 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
15
15
|
* @param force Whether to force fetching the guild from the API even if it exists in the cache.
|
|
16
16
|
* @returns A Promise that resolves to the fetched guild.
|
|
17
17
|
*/
|
|
18
|
-
fetch(id: string, force?: boolean): Promise<
|
|
18
|
+
fetch(id: string, force?: boolean): Promise<GuildStructure<'api'>>;
|
|
19
19
|
raw(id: string, force?: boolean): Promise<import("../../types").APIGuild>;
|
|
20
20
|
/**
|
|
21
21
|
* Generates the widget URL for the guild.
|
|
@@ -25,8 +25,8 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
25
25
|
*/
|
|
26
26
|
widgetURL(id: string, style?: GuildWidgetStyle): Promise<import("../../types").APIGuildWidgetSettings>;
|
|
27
27
|
edit(guildId: string, body: RESTPatchAPIGuildJSONBody, reason?: string): Promise<Guild<"api">>;
|
|
28
|
-
list(query?: RESTGetAPICurrentUserGuildsQuery): Promise<
|
|
29
|
-
fetchSelf(id: string, force?: boolean): Promise<
|
|
28
|
+
list(query?: RESTGetAPICurrentUserGuildsQuery): Promise<AnonymousGuildStructure[]>;
|
|
29
|
+
fetchSelf(id: string, force?: boolean): Promise<GuildMemberStructure>;
|
|
30
30
|
leave(id: string): Promise<void | undefined>;
|
|
31
31
|
/**
|
|
32
32
|
* Provides access to channel-related functionality in a guild.
|
|
@@ -38,7 +38,7 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
38
38
|
* @param force Whether to force fetching channels from the API even if they exist in the cache.
|
|
39
39
|
* @returns A Promise that resolves to an array of channels.
|
|
40
40
|
*/
|
|
41
|
-
list: (guildId: string, force?: boolean) => Promise<
|
|
41
|
+
list: (guildId: string, force?: boolean) => Promise<AllChannels[]>;
|
|
42
42
|
/**
|
|
43
43
|
* Fetches a channel by its ID.
|
|
44
44
|
* @param guildId The ID of the guild.
|
|
@@ -46,14 +46,14 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
46
46
|
* @param force Whether to force fetching the channel from the API even if it exists in the cache.
|
|
47
47
|
* @returns A Promise that resolves to the fetched channel.
|
|
48
48
|
*/
|
|
49
|
-
fetch: (guildId: string, channelId: string, force?: boolean) => Promise<
|
|
49
|
+
fetch: (guildId: string, channelId: string, force?: boolean) => Promise<AllChannels>;
|
|
50
50
|
/**
|
|
51
51
|
* Creates a new channel in the guild.
|
|
52
52
|
* @param guildId The ID of the guild.
|
|
53
53
|
* @param body The data for creating the channel.
|
|
54
54
|
* @returns A Promise that resolves to the created channel.
|
|
55
55
|
*/
|
|
56
|
-
create: (guildId: string, body: RESTPostAPIGuildChannelJSONBody) => Promise<
|
|
56
|
+
create: (guildId: string, body: RESTPostAPIGuildChannelJSONBody) => Promise<AllChannels>;
|
|
57
57
|
/**
|
|
58
58
|
* Deletes a channel from the guild.
|
|
59
59
|
* @param guildId The ID of the guild.
|
|
@@ -61,7 +61,7 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
61
61
|
* @param reason The reason for deleting the channel.
|
|
62
62
|
* @returns A Promise that resolves to the deleted channel.
|
|
63
63
|
*/
|
|
64
|
-
delete: (guildId: string, channelId: string, reason?: string) => Promise<
|
|
64
|
+
delete: (guildId: string, channelId: string, reason?: string) => Promise<AllChannels>;
|
|
65
65
|
/**
|
|
66
66
|
* Edits a channel in the guild.
|
|
67
67
|
* @param guildchannelId The ID of the guild.
|
|
@@ -70,7 +70,7 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
70
70
|
* @param reason The reason for editing the channel.
|
|
71
71
|
* @returns A Promise that resolves to the edited channel.
|
|
72
72
|
*/
|
|
73
|
-
edit: (guildchannelId: string, channelId: string, body: RESTPatchAPIChannelJSONBody, reason?: string) => Promise<
|
|
73
|
+
edit: (guildchannelId: string, channelId: string, body: RESTPatchAPIChannelJSONBody, reason?: string) => Promise<AllChannels>;
|
|
74
74
|
/**
|
|
75
75
|
* Edits the positions of channels in the guild.
|
|
76
76
|
* @param guildId The ID of the guild.
|
|
@@ -88,14 +88,14 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
88
88
|
* @param guildId The ID of the guild.
|
|
89
89
|
* @returns A Promise that resolves to an array of auto-moderation rules.
|
|
90
90
|
*/
|
|
91
|
-
list: (guildId: string) => Promise<
|
|
91
|
+
list: (guildId: string) => Promise<AutoModerationRuleStructure[]>;
|
|
92
92
|
/**
|
|
93
93
|
* Creates a new auto-moderation rule in the guild.
|
|
94
94
|
* @param guildId The ID of the guild.
|
|
95
95
|
* @param body The data for creating the auto-moderation rule.
|
|
96
96
|
* @returns A Promise that resolves to the created auto-moderation rule.
|
|
97
97
|
*/
|
|
98
|
-
create: (guildId: string, body: RESTPostAPIAutoModerationRuleJSONBody) => Promise<
|
|
98
|
+
create: (guildId: string, body: RESTPostAPIAutoModerationRuleJSONBody) => Promise<AutoModerationRuleStructure>;
|
|
99
99
|
/**
|
|
100
100
|
* Deletes an auto-moderation rule from the guild.
|
|
101
101
|
* @param guildId The ID of the guild.
|
|
@@ -110,7 +110,7 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
110
110
|
* @param ruleId The ID of the rule to fetch.
|
|
111
111
|
* @returns A Promise that resolves to the fetched auto-moderation rule.
|
|
112
112
|
*/
|
|
113
|
-
fetch: (guildId: string, ruleId: string) => Promise<
|
|
113
|
+
fetch: (guildId: string, ruleId: string) => Promise<AutoModerationRuleStructure>;
|
|
114
114
|
/**
|
|
115
115
|
* Edits an auto-moderation rule in the guild.
|
|
116
116
|
* @param guildId The ID of the guild.
|
|
@@ -119,7 +119,7 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
119
119
|
* @param reason The reason for editing the rule.
|
|
120
120
|
* @returns A Promise that resolves to the edited auto-moderation rule.
|
|
121
121
|
*/
|
|
122
|
-
edit: (guildId: string, ruleId: string, body: RESTPatchAPIAutoModerationRuleJSONBody, reason?: string) => Promise<
|
|
122
|
+
edit: (guildId: string, ruleId: string, body: RESTPatchAPIAutoModerationRuleJSONBody, reason?: string) => Promise<AutoModerationRuleStructure>;
|
|
123
123
|
};
|
|
124
124
|
/**
|
|
125
125
|
* Provides access to sticker-related functionality in a guild.
|
|
@@ -130,7 +130,7 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
130
130
|
* @param guildId The ID of the guild.
|
|
131
131
|
* @returns A Promise that resolves to an array of stickers.
|
|
132
132
|
*/
|
|
133
|
-
list: (guildId: string) => Promise<
|
|
133
|
+
list: (guildId: string) => Promise<StickerStructure[]>;
|
|
134
134
|
/**
|
|
135
135
|
* Creates a new sticker in the guild.
|
|
136
136
|
* @param guildId The ID of the guild.
|
|
@@ -138,7 +138,7 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
138
138
|
* @param reason The reason for creating the sticker.
|
|
139
139
|
* @returns A Promise that resolves to the created sticker.
|
|
140
140
|
*/
|
|
141
|
-
create: (guildId: string, { file, ...json }: CreateStickerBodyRequest, reason?: string) => Promise<
|
|
141
|
+
create: (guildId: string, { file, ...json }: CreateStickerBodyRequest, reason?: string) => Promise<StickerStructure>;
|
|
142
142
|
/**
|
|
143
143
|
* Edits an existing sticker in the guild.
|
|
144
144
|
* @param guildId The ID of the guild.
|
|
@@ -147,7 +147,7 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
147
147
|
* @param reason The reason for editing the sticker.
|
|
148
148
|
* @returns A Promise that resolves to the edited sticker.
|
|
149
149
|
*/
|
|
150
|
-
edit: (guildId: string, stickerId: string, body: RESTPatchAPIGuildStickerJSONBody, reason?: string) => Promise<
|
|
150
|
+
edit: (guildId: string, stickerId: string, body: RESTPatchAPIGuildStickerJSONBody, reason?: string) => Promise<StickerStructure>;
|
|
151
151
|
/**
|
|
152
152
|
* Fetches a sticker by its ID from the guild.
|
|
153
153
|
* @param guildId The ID of the guild.
|
|
@@ -155,7 +155,7 @@ export declare class GuildShorter extends BaseShorter {
|
|
|
155
155
|
* @param force Whether to force fetching the sticker from the API even if it exists in the cache.
|
|
156
156
|
* @returns A Promise that resolves to the fetched sticker.
|
|
157
157
|
*/
|
|
158
|
-
fetch: (guildId: string, stickerId: string, force?: boolean) => Promise<
|
|
158
|
+
fetch: (guildId: string, stickerId: string, force?: boolean) => Promise<StickerStructure>;
|
|
159
159
|
/**
|
|
160
160
|
* Deletes a sticker from the guild.
|
|
161
161
|
* @param guildId The ID of the guild.
|
|
@@ -60,11 +60,11 @@ class GuildShorter extends base_1.BaseShorter {
|
|
|
60
60
|
if (!force) {
|
|
61
61
|
const self = await this.client.cache.members?.raw(this.client.botId, id);
|
|
62
62
|
if (self?.user)
|
|
63
|
-
return
|
|
63
|
+
return transformers_1.Transformers.GuildMember(this.client, self, self.user, id);
|
|
64
64
|
}
|
|
65
65
|
const self = await this.client.proxy.guilds(id).members(this.client.botId).get();
|
|
66
66
|
await this.client.cache.members?.patch(self.user.id, id, self);
|
|
67
|
-
return
|
|
67
|
+
return transformers_1.Transformers.GuildMember(this.client, self, self.user, id);
|
|
68
68
|
}
|
|
69
69
|
leave(id) {
|
|
70
70
|
return this.client.proxy
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { type ReplyInteractionBody } from '../..';
|
|
2
|
+
import { type WebhookMessageStructure } from '../../client/transformers';
|
|
2
3
|
import type { InteractionMessageUpdateBodyRequest, MessageWebhookCreateBodyRequest } from '../types/write';
|
|
3
4
|
import { BaseShorter } from './base';
|
|
4
5
|
export declare class InteractionShorter extends BaseShorter {
|
|
5
6
|
reply(id: string, token: string, body: ReplyInteractionBody, withResponse?: boolean): Promise<import("../../types").RESTPostAPIInteractionCallbackResult | undefined>;
|
|
6
|
-
fetchResponse(token: string, messageId: string): Promise<
|
|
7
|
-
fetchOriginal(token: string): Promise<
|
|
8
|
-
editMessage(token: string, messageId: string, body: InteractionMessageUpdateBodyRequest): Promise<
|
|
9
|
-
editOriginal(token: string, body: InteractionMessageUpdateBodyRequest): Promise<
|
|
7
|
+
fetchResponse(token: string, messageId: string): Promise<WebhookMessageStructure>;
|
|
8
|
+
fetchOriginal(token: string): Promise<WebhookMessageStructure>;
|
|
9
|
+
editMessage(token: string, messageId: string, body: InteractionMessageUpdateBodyRequest): Promise<WebhookMessageStructure>;
|
|
10
|
+
editOriginal(token: string, body: InteractionMessageUpdateBodyRequest): Promise<WebhookMessageStructure>;
|
|
10
11
|
deleteResponse(token: string, messageId: string): Promise<void>;
|
|
11
12
|
deleteOriginal(token: string): Promise<void>;
|
|
12
|
-
followup(token: string, { files, ...body }: MessageWebhookCreateBodyRequest): Promise<
|
|
13
|
+
followup(token: string, { files, ...body }: MessageWebhookCreateBodyRequest): Promise<WebhookMessageStructure>;
|
|
13
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type VoiceStateStructure } from '../../client/transformers';
|
|
1
|
+
import { type GuildMemberStructure, type GuildRoleStructure, type VoiceStateStructure } from '../../client/transformers';
|
|
2
2
|
import { PermissionsBitField } from '../../structures/extra/Permissions';
|
|
3
3
|
import { type APIGuildMember, type RESTGetAPIGuildMembersQuery, type RESTGetAPIGuildMembersSearchQuery, type RESTPatchAPIGuildMemberJSONBody, type RESTPutAPIGuildBanJSONBody, type RESTPutAPIGuildMemberJSONBody } from '../../types';
|
|
4
4
|
import type { GuildMemberResolvable } from '../types/resolvables';
|
|
@@ -10,14 +10,14 @@ export declare class MemberShorter extends BaseShorter {
|
|
|
10
10
|
* @param resolve The GuildMemberResolvable to resolve.
|
|
11
11
|
* @returns A Promise that resolves to the resolved member.
|
|
12
12
|
*/
|
|
13
|
-
resolve(guildId: string, resolve: GuildMemberResolvable): Promise<
|
|
13
|
+
resolve(guildId: string, resolve: GuildMemberResolvable): Promise<GuildMemberStructure | undefined>;
|
|
14
14
|
/**
|
|
15
15
|
* Searches for members in the guild based on the provided query.
|
|
16
16
|
* @param guildId The ID of the guild.
|
|
17
17
|
* @param query The query parameters for searching members.
|
|
18
18
|
* @returns A Promise that resolves to an array of matched members.
|
|
19
19
|
*/
|
|
20
|
-
search(guildId: string, query?: RESTGetAPIGuildMembersSearchQuery): Promise<
|
|
20
|
+
search(guildId: string, query?: RESTGetAPIGuildMembersSearchQuery): Promise<GuildMemberStructure[]>;
|
|
21
21
|
/**
|
|
22
22
|
* Unbans a member from the guild.
|
|
23
23
|
* @param guildId The ID of the guild.
|
|
@@ -48,7 +48,7 @@ export declare class MemberShorter extends BaseShorter {
|
|
|
48
48
|
* @param reason The reason for editing the member.
|
|
49
49
|
* @returns A Promise that resolves to the edited member.
|
|
50
50
|
*/
|
|
51
|
-
edit(guildId: string, memberId: string, body: RESTPatchAPIGuildMemberJSONBody, reason?: string): Promise<
|
|
51
|
+
edit(guildId: string, memberId: string, body: RESTPatchAPIGuildMemberJSONBody, reason?: string): Promise<GuildMemberStructure>;
|
|
52
52
|
/**
|
|
53
53
|
* Adds a member to the guild.
|
|
54
54
|
* @param guildId The ID of the guild.
|
|
@@ -56,7 +56,7 @@ export declare class MemberShorter extends BaseShorter {
|
|
|
56
56
|
* @param body The request body for adding the member.
|
|
57
57
|
* @returns A Promise that resolves to the added member.
|
|
58
58
|
*/
|
|
59
|
-
add(guildId: string, memberId: string, body: RESTPutAPIGuildMemberJSONBody): Promise<
|
|
59
|
+
add(guildId: string, memberId: string, body: RESTPutAPIGuildMemberJSONBody): Promise<GuildMemberStructure | undefined>;
|
|
60
60
|
/**
|
|
61
61
|
* Fetches a member from the guild.
|
|
62
62
|
* @param guildId The ID of the guild.
|
|
@@ -64,7 +64,7 @@ export declare class MemberShorter extends BaseShorter {
|
|
|
64
64
|
* @param force Whether to force fetching the member from the API even if it exists in the cache.
|
|
65
65
|
* @returns A Promise that resolves to the fetched member.
|
|
66
66
|
*/
|
|
67
|
-
fetch(guildId: string, memberId: string, force?: boolean): Promise<
|
|
67
|
+
fetch(guildId: string, memberId: string, force?: boolean): Promise<GuildMemberStructure>;
|
|
68
68
|
raw(guildId: string, memberId: string, force?: boolean): Promise<APIGuildMember>;
|
|
69
69
|
/**
|
|
70
70
|
* Lists members in the guild based on the provided query.
|
|
@@ -73,7 +73,7 @@ export declare class MemberShorter extends BaseShorter {
|
|
|
73
73
|
* @param force Whether to force listing members from the API even if they exist in the cache.
|
|
74
74
|
* @returns A Promise that resolves to an array of listed members.
|
|
75
75
|
*/
|
|
76
|
-
list(guildId: string, query?: RESTGetAPIGuildMembersQuery, force?: boolean): Promise<
|
|
76
|
+
list(guildId: string, query?: RESTGetAPIGuildMembersQuery, force?: boolean): Promise<GuildMemberStructure[]>;
|
|
77
77
|
/**
|
|
78
78
|
* Adds a role to a guild member.
|
|
79
79
|
* @param guildId The ID of the guild.
|
|
@@ -88,8 +88,8 @@ export declare class MemberShorter extends BaseShorter {
|
|
|
88
88
|
* @param id The ID of the role to remove.
|
|
89
89
|
*/
|
|
90
90
|
removeRole(guildId: string, memberId: string, id: string): Promise<never>;
|
|
91
|
-
listRoles(guildId: string, memberId: string, force?: boolean): Promise<
|
|
92
|
-
sortRoles(guildId: string, memberId: string, force?: boolean): Promise<
|
|
91
|
+
listRoles(guildId: string, memberId: string, force?: boolean): Promise<GuildRoleStructure[]>;
|
|
92
|
+
sortRoles(guildId: string, memberId: string, force?: boolean): Promise<GuildRoleStructure[]>;
|
|
93
93
|
permissions(guildId: string, memberId: string, force?: boolean): Promise<PermissionsBitField>;
|
|
94
94
|
presence(memberId: string): import("../..").ReturnCache<(Omit<import("../../types").GatewayPresenceUpdate, "user"> & {
|
|
95
95
|
id: string;
|
|
@@ -106,7 +106,7 @@ export declare class MemberShorter extends BaseShorter {
|
|
|
106
106
|
* @param time The time in seconds to timeout the member for.
|
|
107
107
|
* @param reason The reason for the timeout.
|
|
108
108
|
*/
|
|
109
|
-
timeout(guildId: string, memberId: string, time: number | null, reason?: string): Promise<
|
|
109
|
+
timeout(guildId: string, memberId: string, time: number | null, reason?: string): Promise<GuildMemberStructure>;
|
|
110
110
|
/**
|
|
111
111
|
* Checks if a member has a timeout.
|
|
112
112
|
* @param member The member to check.
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import type { RESTGetAPIChannelMessagesQuery, RESTPostAPIChannelMessagesThreadsJSONBody } from '../../types';
|
|
2
2
|
import type { ValidAnswerId } from '../../api/Routes/channels';
|
|
3
|
+
import { type MessageStructure, type ThreadChannelStructure, type UserStructure } from '../../client';
|
|
3
4
|
import type { MessageCreateBodyRequest, MessageUpdateBodyRequest } from '../types/write';
|
|
4
5
|
import { BaseShorter } from './base';
|
|
5
6
|
export declare class MessageShorter extends BaseShorter {
|
|
6
|
-
write(channelId: string, { files, ...body }: MessageCreateBodyRequest): Promise<
|
|
7
|
-
edit(messageId: string, channelId: string, { files, ...body }: MessageUpdateBodyRequest): Promise<
|
|
8
|
-
crosspost(messageId: string, channelId: string, reason?: string): Promise<
|
|
7
|
+
write(channelId: string, { files, ...body }: MessageCreateBodyRequest): Promise<MessageStructure>;
|
|
8
|
+
edit(messageId: string, channelId: string, { files, ...body }: MessageUpdateBodyRequest): Promise<MessageStructure>;
|
|
9
|
+
crosspost(messageId: string, channelId: string, reason?: string): Promise<MessageStructure>;
|
|
9
10
|
delete(messageId: string, channelId: string, reason?: string): Promise<void>;
|
|
10
|
-
fetch(messageId: string, channelId: string, force?: boolean): Promise<
|
|
11
|
+
fetch(messageId: string, channelId: string, force?: boolean): Promise<MessageStructure>;
|
|
11
12
|
purge(messages: string[], channelId: string, reason?: string): Promise<void | undefined>;
|
|
12
13
|
thread(channelId: string, messageId: string, options: RESTPostAPIChannelMessagesThreadsJSONBody & {
|
|
13
14
|
reason?: string;
|
|
14
|
-
}): Promise<
|
|
15
|
-
endPoll(channelId: string, messageId: string): Promise<
|
|
16
|
-
getAnswerVoters(channelId: string, messageId: string, answerId: ValidAnswerId): Promise<
|
|
17
|
-
list(channelId: string, fetchOptions: RESTGetAPIChannelMessagesQuery): Promise<
|
|
15
|
+
}): Promise<ThreadChannelStructure>;
|
|
16
|
+
endPoll(channelId: string, messageId: string): Promise<MessageStructure>;
|
|
17
|
+
getAnswerVoters(channelId: string, messageId: string, answerId: ValidAnswerId): Promise<UserStructure[]>;
|
|
18
|
+
list(channelId: string, fetchOptions: RESTGetAPIChannelMessagesQuery): Promise<MessageStructure[]>;
|
|
18
19
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type GuildRoleStructure } from '../../client/transformers';
|
|
1
2
|
import type { APIRole, RESTPatchAPIGuildRoleJSONBody, RESTPatchAPIGuildRolePositionsJSONBody, RESTPostAPIGuildRoleJSONBody } from '../../types';
|
|
2
3
|
import { BaseShorter } from './base';
|
|
3
4
|
export declare class RoleShorter extends BaseShorter {
|
|
@@ -8,8 +9,8 @@ export declare class RoleShorter extends BaseShorter {
|
|
|
8
9
|
* @param reason The reason for creating the role.
|
|
9
10
|
* @returns A Promise that resolves when the role is created.
|
|
10
11
|
*/
|
|
11
|
-
create(guildId: string, body: RESTPostAPIGuildRoleJSONBody, reason?: string): Promise<
|
|
12
|
-
fetch(guildId: string, roleId: string, force?: boolean): Promise<
|
|
12
|
+
create(guildId: string, body: RESTPostAPIGuildRoleJSONBody, reason?: string): Promise<GuildRoleStructure>;
|
|
13
|
+
fetch(guildId: string, roleId: string, force?: boolean): Promise<GuildRoleStructure>;
|
|
13
14
|
raw(guildId: string, roleId: string, force?: boolean): Promise<APIRole>;
|
|
14
15
|
/**
|
|
15
16
|
* Retrieves a list of roles in the guild.
|
|
@@ -17,7 +18,7 @@ export declare class RoleShorter extends BaseShorter {
|
|
|
17
18
|
* @param force Whether to force fetching roles from the API even if they exist in the cache.
|
|
18
19
|
* @returns A Promise that resolves to an array of roles.
|
|
19
20
|
*/
|
|
20
|
-
list(guildId: string, force?: boolean): Promise<
|
|
21
|
+
list(guildId: string, force?: boolean): Promise<GuildRoleStructure[]>;
|
|
21
22
|
listRaw(guildId: string, force?: boolean): Promise<APIRole[]>;
|
|
22
23
|
/**
|
|
23
24
|
* Edits a role in the guild.
|
|
@@ -27,7 +28,7 @@ export declare class RoleShorter extends BaseShorter {
|
|
|
27
28
|
* @param reason The reason for editing the role.
|
|
28
29
|
* @returns A Promise that resolves when the role is edited.
|
|
29
30
|
*/
|
|
30
|
-
edit(guildId: string, roleId: string, body: RESTPatchAPIGuildRoleJSONBody, reason?: string): Promise<
|
|
31
|
+
edit(guildId: string, roleId: string, body: RESTPatchAPIGuildRoleJSONBody, reason?: string): Promise<GuildRoleStructure>;
|
|
31
32
|
/**
|
|
32
33
|
* Deletes a role from the guild.
|
|
33
34
|
* @param guildId The ID of the guild.
|
|
@@ -35,12 +36,12 @@ export declare class RoleShorter extends BaseShorter {
|
|
|
35
36
|
* @param reason The reason for deleting the role.
|
|
36
37
|
* @returns A Promise that resolves when the role is deleted.
|
|
37
38
|
*/
|
|
38
|
-
delete(guildId: string, roleId: string, reason?: string): Promise<
|
|
39
|
+
delete(guildId: string, roleId: string, reason?: string): Promise<GuildRoleStructure>;
|
|
39
40
|
/**
|
|
40
41
|
* Edits the positions of roles in the guild.
|
|
41
42
|
* @param guildId The ID of the guild.
|
|
42
43
|
* @param body The data to update the positions of roles with.
|
|
43
44
|
* @returns A Promise that resolves to an array of edited roles.
|
|
44
45
|
*/
|
|
45
|
-
editPositions(guildId: string, body: RESTPatchAPIGuildRolePositionsJSONBody): Promise<
|
|
46
|
+
editPositions(guildId: string, body: RESTPatchAPIGuildRolePositionsJSONBody): Promise<GuildRoleStructure[]>;
|
|
46
47
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { type GuildTemplateStructure } from '../../client/transformers';
|
|
1
2
|
import type { RESTPatchAPIGuildTemplateJSONBody, RESTPostAPIGuildTemplatesJSONBody } from '../../types';
|
|
2
3
|
import { BaseShorter } from './base';
|
|
3
4
|
export declare class TemplateShorter extends BaseShorter {
|
|
4
|
-
fetch(code: string): Promise<
|
|
5
|
-
list(guildId: string): Promise<
|
|
6
|
-
create(guildId: string, body: RESTPostAPIGuildTemplatesJSONBody): Promise<
|
|
7
|
-
sync(guildId: string, code: string): Promise<
|
|
8
|
-
edit(guildId: string, code: string, body: RESTPatchAPIGuildTemplateJSONBody): Promise<
|
|
9
|
-
delete(guildId: string, code: string): Promise<
|
|
5
|
+
fetch(code: string): Promise<GuildTemplateStructure>;
|
|
6
|
+
list(guildId: string): Promise<GuildTemplateStructure[]>;
|
|
7
|
+
create(guildId: string, body: RESTPostAPIGuildTemplatesJSONBody): Promise<GuildTemplateStructure>;
|
|
8
|
+
sync(guildId: string, code: string): Promise<GuildTemplateStructure>;
|
|
9
|
+
edit(guildId: string, code: string, body: RESTPatchAPIGuildTemplateJSONBody): Promise<GuildTemplateStructure>;
|
|
10
|
+
delete(guildId: string, code: string): Promise<GuildTemplateStructure>;
|
|
10
11
|
}
|