seyfert 1.1.0 → 1.2.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/api/Routes/applications.d.ts +2 -2
- package/lib/api/Routes/channels.d.ts +2 -2
- package/lib/api/Routes/gateway.d.ts +2 -2
- package/lib/api/Routes/guilds.d.ts +2 -1
- package/lib/api/Routes/interactions.d.ts +2 -2
- package/lib/api/Routes/invites.d.ts +2 -2
- package/lib/api/Routes/stage-instances.d.ts +2 -2
- package/lib/api/Routes/stickers.d.ts +2 -2
- package/lib/api/Routes/users.d.ts +2 -2
- package/lib/api/Routes/voice.d.ts +2 -2
- package/lib/api/Routes/webhooks.d.ts +2 -2
- package/lib/builders/ActionRow.d.ts +2 -1
- package/lib/builders/ActionRow.js +3 -3
- package/lib/builders/Base.d.ts +1 -1
- package/lib/builders/Button.d.ts +2 -1
- package/lib/builders/Button.js +2 -2
- package/lib/builders/Embed.d.ts +2 -1
- package/lib/builders/Modal.d.ts +9 -2
- package/lib/builders/Modal.js +12 -3
- package/lib/builders/SelectMenu.d.ts +18 -1
- package/lib/builders/SelectMenu.js +36 -12
- package/lib/builders/index.d.ts +1 -1
- package/lib/builders/index.js +9 -9
- package/lib/builders/types.d.ts +1 -1
- package/lib/cache/adapters/types.d.ts +23 -23
- package/lib/cache/index.d.ts +5 -5
- package/lib/cache/index.js +3 -3
- package/lib/cache/resources/default/base.d.ts +10 -10
- package/lib/cache/resources/default/guild-based.d.ts +7 -7
- package/lib/cache/resources/default/guild-based.js +2 -1
- package/lib/cache/resources/default/guild-related.d.ts +9 -9
- package/lib/cache/resources/default/guild-related.js +2 -1
- package/lib/cache/resources/presence.d.ts +1 -1
- package/lib/cache/resources/stage-instances.d.ts +1 -1
- package/lib/cache/resources/voice-states.d.ts +1 -1
- package/lib/client/base.d.ts +19 -12
- package/lib/client/base.js +45 -7
- package/lib/client/client.d.ts +7 -4
- package/lib/client/client.js +21 -9
- package/lib/client/httpclient.d.ts +2 -1
- package/lib/client/httpclient.js +3 -3
- package/lib/client/oninteractioncreate.js +18 -19
- package/lib/client/onmessagecreate.js +6 -4
- package/lib/client/workerclient.d.ts +11 -5
- package/lib/client/workerclient.js +18 -11
- package/lib/commands/applications/chat.d.ts +4 -4
- package/lib/commands/applications/chat.js +17 -9
- package/lib/commands/applications/chatcontext.d.ts +7 -10
- package/lib/commands/applications/chatcontext.js +6 -17
- package/lib/commands/applications/menu.d.ts +2 -1
- package/lib/commands/applications/menu.js +7 -5
- package/lib/commands/applications/menucontext.d.ts +5 -9
- package/lib/commands/applications/menucontext.js +8 -21
- package/lib/commands/applications/shared.d.ts +5 -4
- package/lib/commands/basecontex.d.ts +15 -0
- package/lib/commands/basecontex.js +34 -0
- package/lib/commands/decorators.d.ts +3 -2
- package/lib/commands/decorators.js +5 -5
- package/lib/commands/handler.d.ts +6 -0
- package/lib/commands/handler.js +10 -4
- package/lib/commands/optionresolver.d.ts +3 -3
- package/lib/commands/optionresolver.js +14 -14
- package/lib/common/index.d.ts +0 -1
- package/lib/common/index.js +0 -1
- package/lib/common/it/constants.d.ts +3 -1
- package/lib/common/it/constants.js +2 -0
- package/lib/common/it/utils.d.ts +1 -0
- package/lib/common/it/utils.js +2 -1
- package/lib/common/shorters/channels.d.ts +1 -1
- package/lib/common/shorters/channels.js +4 -4
- package/lib/common/shorters/guilds.d.ts +1 -1
- package/lib/common/shorters/guilds.js +6 -1
- package/lib/common/shorters/members.d.ts +6 -1
- package/lib/common/shorters/members.js +25 -2
- package/lib/common/shorters/messages.d.ts +1 -1
- package/lib/common/shorters/messages.js +1 -1
- package/lib/common/shorters/users.d.ts +0 -6
- package/lib/common/shorters/users.js +0 -34
- package/lib/common/shorters/webhook.d.ts +2 -2
- package/lib/common/types/resolvables.d.ts +2 -1
- package/lib/common/types/util.d.ts +4 -1
- package/lib/common/types/write.d.ts +1 -1
- package/lib/components/ActionRow.d.ts +4 -3
- package/lib/components/ActionRow.js +6 -3
- package/lib/components/BaseComponent.d.ts +18 -0
- package/lib/components/BaseComponent.js +21 -0
- package/lib/components/BaseSelectMenuComponent.d.ts +10 -0
- package/lib/components/BaseSelectMenuComponent.js +22 -0
- package/lib/components/ButtonComponent.d.ts +14 -14
- package/lib/components/ButtonComponent.js +36 -25
- package/lib/components/ChannelSelectMenuComponent.d.ts +4 -4
- package/lib/components/ChannelSelectMenuComponent.js +6 -5
- package/lib/components/MentionableSelectMenuComponent.d.ts +3 -2
- package/lib/components/MentionableSelectMenuComponent.js +4 -1
- package/lib/components/RoleSelectMenuComponent.d.ts +3 -2
- package/lib/components/RoleSelectMenuComponent.js +4 -1
- package/lib/components/StringSelectMenuComponent.d.ts +3 -4
- package/lib/components/StringSelectMenuComponent.js +3 -5
- package/lib/components/TextInputComponent.d.ts +10 -5
- package/lib/components/TextInputComponent.js +24 -7
- package/lib/components/UserSelectMenuComponent.d.ts +3 -2
- package/lib/components/UserSelectMenuComponent.js +4 -1
- package/lib/components/command.d.ts +6 -5
- package/lib/components/command.js +4 -0
- package/lib/components/componentcontext.d.ts +42 -0
- package/lib/components/componentcontext.js +79 -0
- package/lib/components/handler.d.ts +22 -6
- package/lib/components/handler.js +19 -12
- package/lib/components/index.d.ts +2 -2
- package/lib/components/index.js +9 -9
- package/lib/events/handler.d.ts +12 -3
- package/lib/events/handler.js +6 -8
- package/lib/events/hooks/application_command.d.ts +2 -2
- package/lib/events/hooks/auto_moderation.d.ts +4 -4
- package/lib/events/hooks/channel.d.ts +1 -1
- package/lib/events/hooks/dispatch.d.ts +1 -1
- package/lib/events/hooks/entitlement.d.ts +4 -4
- package/lib/events/hooks/guild.d.ts +42 -42
- package/lib/events/hooks/integration.d.ts +19 -19
- package/lib/events/hooks/interactions.d.ts +2 -2
- package/lib/events/hooks/invite.d.ts +5 -5
- package/lib/events/hooks/message.d.ts +6 -5
- package/lib/events/hooks/presence.d.ts +7 -7
- package/lib/events/hooks/stage.d.ts +4 -4
- package/lib/events/hooks/thread.d.ts +49 -49
- package/lib/events/hooks/typing.d.ts +2 -2
- package/lib/events/hooks/user.d.ts +1 -1
- package/lib/events/hooks/voice.d.ts +2 -2
- package/lib/events/hooks/webhook.d.ts +1 -1
- package/lib/index.d.ts +3 -6
- package/lib/index.js +6 -7
- package/lib/langs/handler.d.ts +10 -1
- package/lib/langs/handler.js +1 -0
- package/lib/structures/AutoModerationRule.d.ts +3 -2
- package/lib/structures/ClientUser.d.ts +1 -1
- package/lib/structures/Guild.d.ts +27 -27
- package/lib/structures/GuildEmoji.d.ts +2 -1
- package/lib/structures/GuildMember.d.ts +16 -6
- package/lib/structures/GuildMember.js +35 -6
- package/lib/structures/GuildPreview.d.ts +1 -1
- package/lib/structures/GuildRole.d.ts +2 -1
- package/lib/structures/GuildTemplate.d.ts +3 -2
- package/lib/structures/Interaction.d.ts +5 -5
- package/lib/structures/Interaction.js +34 -34
- package/lib/structures/Message.d.ts +6 -5
- package/lib/structures/Sticker.d.ts +2 -1
- package/lib/structures/User.d.ts +7 -3
- package/lib/structures/User.js +5 -0
- package/lib/structures/Webhook.d.ts +63 -4
- package/lib/structures/Webhook.js +53 -0
- package/lib/structures/channels.d.ts +4 -4
- package/lib/structures/extra/BaseGuild.d.ts +2 -1
- package/lib/structures/extra/BaseGuild.js +3 -3
- package/lib/structures/extra/BitField.d.ts +2 -2
- package/lib/structures/extra/BitField.js +2 -2
- package/lib/structures/extra/Permissions.d.ts +1 -1
- package/lib/structures/extra/functions.d.ts +2 -1
- package/lib/structures/extra/functions.js +2 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +17 -0
- package/lib/websocket/SharedTypes.d.ts +2 -1
- package/lib/websocket/SharedTypes.js +1 -0
- package/lib/websocket/discord/shard.d.ts +2 -1
- package/lib/websocket/discord/shard.js +30 -41
- package/lib/websocket/discord/sharder.d.ts +3 -2
- package/lib/websocket/discord/sharder.js +7 -6
- package/lib/websocket/discord/shared.d.ts +2 -1
- package/lib/websocket/discord/worker.d.ts +1 -1
- package/lib/websocket/discord/workermanager.d.ts +3 -2
- package/lib/websocket/discord/workermanager.js +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData } from '
|
|
1
|
+
import type { GatewayStageInstanceCreateDispatchData, GatewayStageInstanceDeleteDispatchData } from 'discord-api-types/v10';
|
|
2
2
|
import type { BaseClient } from '../../client/base';
|
|
3
3
|
export declare const STAGE_INSTANCE_CREATE: (_self: BaseClient, data: GatewayStageInstanceCreateDispatchData) => {
|
|
4
4
|
id: string;
|
|
5
5
|
guildId: string;
|
|
6
6
|
channelId: string;
|
|
7
7
|
topic: string;
|
|
8
|
-
privacyLevel: import("discord-api-types/
|
|
8
|
+
privacyLevel: import("discord-api-types/v10").StageInstancePrivacyLevel;
|
|
9
9
|
discoverableDisabled: boolean;
|
|
10
10
|
guildScheduledEventId?: string | undefined;
|
|
11
11
|
};
|
|
@@ -14,7 +14,7 @@ export declare const STAGE_INSTANCE_DELETE: (_self: BaseClient, data: GatewaySta
|
|
|
14
14
|
guildId: string;
|
|
15
15
|
channelId: string;
|
|
16
16
|
topic: string;
|
|
17
|
-
privacyLevel: import("discord-api-types/
|
|
17
|
+
privacyLevel: import("discord-api-types/v10").StageInstancePrivacyLevel;
|
|
18
18
|
discoverableDisabled: boolean;
|
|
19
19
|
guildScheduledEventId?: string | undefined;
|
|
20
20
|
};
|
|
@@ -23,7 +23,7 @@ export declare const STAGE_INSTANCE_UPDATE: (_self: BaseClient, data: GatewaySta
|
|
|
23
23
|
guildId: string;
|
|
24
24
|
channelId: string;
|
|
25
25
|
topic: string;
|
|
26
|
-
privacyLevel: import("discord-api-types/
|
|
26
|
+
privacyLevel: import("discord-api-types/v10").StageInstancePrivacyLevel;
|
|
27
27
|
discoverableDisabled: boolean;
|
|
28
28
|
guildScheduledEventId?: string | undefined;
|
|
29
29
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, GatewayThreadUpdateDispatchData } from 'discord-api-types/v10';
|
|
1
2
|
import type { BaseClient } from '../../client/base';
|
|
2
|
-
import type { GatewayThreadCreateDispatchData, GatewayThreadDeleteDispatchData, GatewayThreadListSyncDispatchData, GatewayThreadMemberUpdateDispatchData, GatewayThreadMembersUpdateDispatchData, GatewayThreadUpdateDispatchData } from '../../common';
|
|
3
3
|
import { ThreadChannel } from '../../structures';
|
|
4
4
|
export declare const THREAD_CREATE: (self: BaseClient, data: GatewayThreadCreateDispatchData) => ThreadChannel;
|
|
5
5
|
export declare const THREAD_DELETE: (self: BaseClient, data: GatewayThreadDeleteDispatchData) => ThreadChannel;
|
|
@@ -8,19 +8,19 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
8
8
|
channelIds?: string[] | undefined;
|
|
9
9
|
threads: ({
|
|
10
10
|
name: null;
|
|
11
|
-
type: import("discord-api-types/
|
|
11
|
+
type: import("discord-api-types/v10").ChannelType.DM;
|
|
12
12
|
id: string;
|
|
13
|
-
flags?: import("discord-api-types/
|
|
13
|
+
flags?: import("discord-api-types/v10").ChannelFlags | undefined;
|
|
14
14
|
lastMessageId?: string | null | undefined;
|
|
15
15
|
lastPinTimestamp?: string | null | undefined;
|
|
16
|
-
recipients?: import("discord-api-types/
|
|
16
|
+
recipients?: import("discord-api-types/v10").APIUser[] | undefined;
|
|
17
17
|
} | {
|
|
18
|
-
defaultForumLayout: import("discord-api-types/
|
|
18
|
+
defaultForumLayout: import("discord-api-types/v10").ForumLayoutType;
|
|
19
19
|
topic?: string | null | undefined;
|
|
20
20
|
lastMessageId?: string | null | undefined;
|
|
21
21
|
rateLimitPerUser?: number | undefined;
|
|
22
22
|
lastPinTimestamp?: string | null | undefined;
|
|
23
|
-
defaultAutoArchiveDuration?: import("discord-api-types/
|
|
23
|
+
defaultAutoArchiveDuration?: import("discord-api-types/v10").ThreadAutoArchiveDuration | undefined;
|
|
24
24
|
availableTags: {
|
|
25
25
|
id: string;
|
|
26
26
|
name: string;
|
|
@@ -29,30 +29,30 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
29
29
|
emojiName: string | null;
|
|
30
30
|
}[];
|
|
31
31
|
defaultThreadRateLimitPerUser?: number | undefined;
|
|
32
|
-
defaultReactionEmoji: import("discord-api-types/
|
|
33
|
-
defaultSortOrder: import("discord-api-types/
|
|
32
|
+
defaultReactionEmoji: import("discord-api-types/v10").APIGuildForumDefaultReactionEmoji | null;
|
|
33
|
+
defaultSortOrder: import("discord-api-types/v10").SortOrderType | null;
|
|
34
34
|
name: string;
|
|
35
35
|
guildId?: string | undefined;
|
|
36
|
-
permissionOverwrites?: import("discord-api-types/
|
|
36
|
+
permissionOverwrites?: import("discord-api-types/v10").APIOverwrite[] | undefined;
|
|
37
37
|
position: number;
|
|
38
38
|
parentId?: string | null | undefined;
|
|
39
39
|
nsfw?: boolean | undefined;
|
|
40
|
-
type: import("discord-api-types/
|
|
40
|
+
type: import("discord-api-types/v10").ChannelType.GuildForum;
|
|
41
41
|
id: string;
|
|
42
|
-
flags?: import("discord-api-types/
|
|
42
|
+
flags?: import("discord-api-types/v10").ChannelFlags | undefined;
|
|
43
43
|
} | {
|
|
44
|
-
defaultAutoArchiveDuration?: import("discord-api-types/
|
|
44
|
+
defaultAutoArchiveDuration?: import("discord-api-types/v10").ThreadAutoArchiveDuration | undefined;
|
|
45
45
|
defaultThreadRateLimitPerUser?: number | undefined;
|
|
46
46
|
topic?: string | null | undefined;
|
|
47
|
-
type: import("discord-api-types/
|
|
47
|
+
type: import("discord-api-types/v10").ChannelType.GuildAnnouncement;
|
|
48
48
|
id: string;
|
|
49
49
|
rateLimitPerUser?: number | undefined;
|
|
50
|
-
flags?: import("discord-api-types/
|
|
50
|
+
flags?: import("discord-api-types/v10").ChannelFlags | undefined;
|
|
51
51
|
lastMessageId?: string | null | undefined;
|
|
52
52
|
lastPinTimestamp?: string | null | undefined;
|
|
53
53
|
name: string;
|
|
54
54
|
guildId?: string | undefined;
|
|
55
|
-
permissionOverwrites?: import("discord-api-types/
|
|
55
|
+
permissionOverwrites?: import("discord-api-types/v10").APIOverwrite[] | undefined;
|
|
56
56
|
position: number;
|
|
57
57
|
parentId?: string | null | undefined;
|
|
58
58
|
nsfw?: boolean | undefined;
|
|
@@ -63,27 +63,27 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
63
63
|
ownerId?: string | undefined;
|
|
64
64
|
lastMessageId?: string | null | undefined;
|
|
65
65
|
managed?: boolean | undefined;
|
|
66
|
-
type: import("discord-api-types/
|
|
66
|
+
type: import("discord-api-types/v10").ChannelType.GroupDM;
|
|
67
67
|
id: string;
|
|
68
|
-
flags?: import("discord-api-types/
|
|
68
|
+
flags?: import("discord-api-types/v10").ChannelFlags | undefined;
|
|
69
69
|
lastPinTimestamp?: string | null | undefined;
|
|
70
|
-
recipients?: import("discord-api-types/
|
|
70
|
+
recipients?: import("discord-api-types/v10").APIUser[] | undefined;
|
|
71
71
|
} | {
|
|
72
72
|
name: string;
|
|
73
73
|
guildId?: string | undefined;
|
|
74
|
-
permissionOverwrites?: import("discord-api-types/
|
|
74
|
+
permissionOverwrites?: import("discord-api-types/v10").APIOverwrite[] | undefined;
|
|
75
75
|
position: number;
|
|
76
76
|
parentId?: string | null | undefined;
|
|
77
77
|
nsfw?: boolean | undefined;
|
|
78
|
-
type: import("discord-api-types/
|
|
78
|
+
type: import("discord-api-types/v10").ChannelType.GuildCategory;
|
|
79
79
|
id: string;
|
|
80
|
-
flags?: import("discord-api-types/
|
|
80
|
+
flags?: import("discord-api-types/v10").ChannelFlags | undefined;
|
|
81
81
|
} | {
|
|
82
82
|
topic?: string | null | undefined;
|
|
83
83
|
lastMessageId?: string | null | undefined;
|
|
84
84
|
rateLimitPerUser?: number | undefined;
|
|
85
85
|
lastPinTimestamp?: string | null | undefined;
|
|
86
|
-
defaultAutoArchiveDuration?: import("discord-api-types/
|
|
86
|
+
defaultAutoArchiveDuration?: import("discord-api-types/v10").ThreadAutoArchiveDuration | undefined;
|
|
87
87
|
availableTags: {
|
|
88
88
|
id: string;
|
|
89
89
|
name: string;
|
|
@@ -92,82 +92,82 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
92
92
|
emojiName: string | null;
|
|
93
93
|
}[];
|
|
94
94
|
defaultThreadRateLimitPerUser?: number | undefined;
|
|
95
|
-
defaultReactionEmoji: import("discord-api-types/
|
|
96
|
-
defaultSortOrder: import("discord-api-types/
|
|
95
|
+
defaultReactionEmoji: import("discord-api-types/v10").APIGuildForumDefaultReactionEmoji | null;
|
|
96
|
+
defaultSortOrder: import("discord-api-types/v10").SortOrderType | null;
|
|
97
97
|
name: string;
|
|
98
98
|
guildId?: string | undefined;
|
|
99
|
-
permissionOverwrites?: import("discord-api-types/
|
|
99
|
+
permissionOverwrites?: import("discord-api-types/v10").APIOverwrite[] | undefined;
|
|
100
100
|
position: number;
|
|
101
101
|
parentId?: string | null | undefined;
|
|
102
102
|
nsfw?: boolean | undefined;
|
|
103
|
-
type: import("discord-api-types/
|
|
103
|
+
type: import("discord-api-types/v10").ChannelType.GuildMedia;
|
|
104
104
|
id: string;
|
|
105
|
-
flags?: import("discord-api-types/
|
|
105
|
+
flags?: import("discord-api-types/v10").ChannelFlags | undefined;
|
|
106
106
|
} | {
|
|
107
107
|
bitrate?: number | undefined;
|
|
108
108
|
userLimit?: number | undefined;
|
|
109
109
|
rtcRegion?: string | null | undefined;
|
|
110
|
-
videoQualityMode?: import("discord-api-types/
|
|
110
|
+
videoQualityMode?: import("discord-api-types/v10").VideoQualityMode | undefined;
|
|
111
111
|
name: string;
|
|
112
112
|
guildId?: string | undefined;
|
|
113
|
-
permissionOverwrites?: import("discord-api-types/
|
|
113
|
+
permissionOverwrites?: import("discord-api-types/v10").APIOverwrite[] | undefined;
|
|
114
114
|
position: number;
|
|
115
115
|
parentId?: string | null | undefined;
|
|
116
116
|
nsfw?: boolean | undefined;
|
|
117
|
-
type: import("discord-api-types/
|
|
117
|
+
type: import("discord-api-types/v10").ChannelType.GuildStageVoice;
|
|
118
118
|
id: string;
|
|
119
|
-
flags?: import("discord-api-types/
|
|
119
|
+
flags?: import("discord-api-types/v10").ChannelFlags | undefined;
|
|
120
120
|
rateLimitPerUser?: number | undefined;
|
|
121
121
|
lastMessageId?: string | null | undefined;
|
|
122
122
|
} | {
|
|
123
123
|
bitrate?: number | undefined;
|
|
124
124
|
userLimit?: number | undefined;
|
|
125
125
|
rtcRegion?: string | null | undefined;
|
|
126
|
-
videoQualityMode?: import("discord-api-types/
|
|
126
|
+
videoQualityMode?: import("discord-api-types/v10").VideoQualityMode | undefined;
|
|
127
127
|
name: string;
|
|
128
128
|
guildId?: string | undefined;
|
|
129
|
-
permissionOverwrites?: import("discord-api-types/
|
|
129
|
+
permissionOverwrites?: import("discord-api-types/v10").APIOverwrite[] | undefined;
|
|
130
130
|
position: number;
|
|
131
131
|
parentId?: string | null | undefined;
|
|
132
132
|
nsfw?: boolean | undefined;
|
|
133
|
-
type: import("discord-api-types/
|
|
133
|
+
type: import("discord-api-types/v10").ChannelType.GuildVoice;
|
|
134
134
|
id: string;
|
|
135
|
-
flags?: import("discord-api-types/
|
|
135
|
+
flags?: import("discord-api-types/v10").ChannelFlags | undefined;
|
|
136
136
|
rateLimitPerUser?: number | undefined;
|
|
137
137
|
lastMessageId?: string | null | undefined;
|
|
138
138
|
} | {
|
|
139
|
-
defaultAutoArchiveDuration?: import("discord-api-types/
|
|
139
|
+
defaultAutoArchiveDuration?: import("discord-api-types/v10").ThreadAutoArchiveDuration | undefined;
|
|
140
140
|
defaultThreadRateLimitPerUser?: number | undefined;
|
|
141
141
|
topic?: string | null | undefined;
|
|
142
|
-
type: import("discord-api-types/
|
|
142
|
+
type: import("discord-api-types/v10").ChannelType.GuildText;
|
|
143
143
|
id: string;
|
|
144
144
|
rateLimitPerUser?: number | undefined;
|
|
145
|
-
flags?: import("discord-api-types/
|
|
145
|
+
flags?: import("discord-api-types/v10").ChannelFlags | undefined;
|
|
146
146
|
lastMessageId?: string | null | undefined;
|
|
147
147
|
lastPinTimestamp?: string | null | undefined;
|
|
148
148
|
name: string;
|
|
149
149
|
guildId?: string | undefined;
|
|
150
|
-
permissionOverwrites?: import("discord-api-types/
|
|
150
|
+
permissionOverwrites?: import("discord-api-types/v10").APIOverwrite[] | undefined;
|
|
151
151
|
position: number;
|
|
152
152
|
parentId?: string | null | undefined;
|
|
153
153
|
nsfw?: boolean | undefined;
|
|
154
154
|
} | {
|
|
155
|
-
member?: import("discord-api-types/
|
|
156
|
-
threadMetadata?: import("discord-api-types/
|
|
155
|
+
member?: import("discord-api-types/v10").APIThreadMember | undefined;
|
|
156
|
+
threadMetadata?: import("discord-api-types/v10").APIThreadMetadata | undefined;
|
|
157
157
|
messageCount?: number | undefined;
|
|
158
158
|
memberCount?: number | undefined;
|
|
159
159
|
ownerId?: string | undefined;
|
|
160
160
|
totalMessageSent?: number | undefined;
|
|
161
161
|
appliedTags: string[];
|
|
162
|
-
type: import("discord-api-types/
|
|
162
|
+
type: import("discord-api-types/v10").ThreadChannelType;
|
|
163
163
|
id: string;
|
|
164
164
|
rateLimitPerUser?: number | undefined;
|
|
165
|
-
flags?: import("discord-api-types/
|
|
165
|
+
flags?: import("discord-api-types/v10").ChannelFlags | undefined;
|
|
166
166
|
lastMessageId?: string | null | undefined;
|
|
167
167
|
lastPinTimestamp?: string | null | undefined;
|
|
168
168
|
name: string;
|
|
169
169
|
guildId?: string | undefined;
|
|
170
|
-
permissionOverwrites?: import("discord-api-types/
|
|
170
|
+
permissionOverwrites?: import("discord-api-types/v10").APIOverwrite[] | undefined;
|
|
171
171
|
position: number;
|
|
172
172
|
parentId?: string | null | undefined;
|
|
173
173
|
nsfw?: boolean | undefined;
|
|
@@ -176,23 +176,23 @@ export declare const THREAD_LIST_SYNC: (_self: BaseClient, data: GatewayThreadLi
|
|
|
176
176
|
id?: string | undefined;
|
|
177
177
|
userId?: string | undefined;
|
|
178
178
|
joinTimestamp: string;
|
|
179
|
-
flags: import("discord-api-types/
|
|
180
|
-
member?: import("discord-api-types/
|
|
179
|
+
flags: import("discord-api-types/v10").ThreadMemberFlags;
|
|
180
|
+
member?: import("discord-api-types/v10").APIGuildMember | undefined;
|
|
181
181
|
}[];
|
|
182
182
|
};
|
|
183
183
|
export declare const THREAD_MEMBER_UPDATE: (_self: BaseClient, data: GatewayThreadMemberUpdateDispatchData) => {
|
|
184
184
|
id?: string | undefined;
|
|
185
185
|
userId?: string | undefined;
|
|
186
186
|
joinTimestamp: string;
|
|
187
|
-
flags: import("discord-api-types/
|
|
188
|
-
member?: import("discord-api-types/
|
|
187
|
+
flags: import("discord-api-types/v10").ThreadMemberFlags;
|
|
188
|
+
member?: import("discord-api-types/v10").APIGuildMember | undefined;
|
|
189
189
|
guildId: string;
|
|
190
190
|
};
|
|
191
191
|
export declare const THREAD_MEMBERS_UPDATE: (_self: BaseClient, data: GatewayThreadMembersUpdateDispatchData) => {
|
|
192
192
|
id: string;
|
|
193
193
|
guildId: string;
|
|
194
194
|
memberCount: number;
|
|
195
|
-
addedMembers?: import("discord-api-types/
|
|
195
|
+
addedMembers?: import("discord-api-types/v10").APIThreadMember[] | undefined;
|
|
196
196
|
removedMemberIds?: string[] | undefined;
|
|
197
197
|
};
|
|
198
198
|
export declare const THREAD_UPDATE: (self: BaseClient, data: GatewayThreadUpdateDispatchData) => ThreadChannel;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GatewayTypingStartDispatchData } from '
|
|
1
|
+
import type { GatewayTypingStartDispatchData } from 'discord-api-types/v10';
|
|
2
2
|
import type { BaseClient } from '../../client/base';
|
|
3
3
|
import { GuildMember } from '../../structures';
|
|
4
4
|
export declare const TYPING_START: (self: BaseClient, data: GatewayTypingStartDispatchData) => {
|
|
@@ -6,7 +6,7 @@ export declare const TYPING_START: (self: BaseClient, data: GatewayTypingStartDi
|
|
|
6
6
|
guildId?: string | undefined;
|
|
7
7
|
userId: string;
|
|
8
8
|
timestamp: number;
|
|
9
|
-
member?: import("discord-api-types/
|
|
9
|
+
member?: import("discord-api-types/v10").APIGuildMember | undefined;
|
|
10
10
|
} | {
|
|
11
11
|
member: GuildMember;
|
|
12
12
|
channelId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import type { GatewayUserUpdateDispatchData } from 'discord-api-types/v10';
|
|
1
2
|
import type { BaseClient } from '../../client/base';
|
|
2
|
-
import type { GatewayUserUpdateDispatchData } from '../../common';
|
|
3
3
|
import { User } from '../../structures';
|
|
4
4
|
export declare const USER_UPDATE: (self: BaseClient, data: GatewayUserUpdateDispatchData) => User;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from 'discord-api-types/v10';
|
|
1
2
|
import type { BaseClient } from '../../client/base';
|
|
2
|
-
import type { GatewayVoiceServerUpdateDispatchData, GatewayVoiceStateUpdateDispatchData } from '../../common';
|
|
3
3
|
import { GuildMember } from '../../structures';
|
|
4
4
|
export declare const VOICE_SERVER_UPDATE: (_self: BaseClient, data: GatewayVoiceServerUpdateDispatchData) => {
|
|
5
5
|
token: string;
|
|
@@ -10,7 +10,7 @@ export declare const VOICE_STATE_UPDATE: (self: BaseClient, data: GatewayVoiceSt
|
|
|
10
10
|
guildId?: string | undefined;
|
|
11
11
|
channelId: string | null;
|
|
12
12
|
userId: string;
|
|
13
|
-
member?: import("discord-api-types/
|
|
13
|
+
member?: import("discord-api-types/v10").APIGuildMember | undefined;
|
|
14
14
|
sessionId: string;
|
|
15
15
|
deaf: boolean;
|
|
16
16
|
mute: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { GatewayWebhooksUpdateDispatchData } from 'discord-api-types/v10';
|
|
1
2
|
import type { BaseClient } from '../../client/base';
|
|
2
|
-
import type { GatewayWebhooksUpdateDispatchData } from '../../common';
|
|
3
3
|
export declare const WEBHOOKS_UPDATE: (_self: BaseClient, data: GatewayWebhooksUpdateDispatchData) => {
|
|
4
4
|
guildId: string;
|
|
5
5
|
channelId: string;
|
package/lib/index.d.ts
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import type { InternalRuntimeConfig, InternalRuntimeConfigHTTP, RuntimeConfig, RuntimeConfigHTTP } from './client/base';
|
|
2
|
-
import type { InferWithPrefix } from './commands';
|
|
3
|
-
import { type When } from './common';
|
|
1
|
+
import type { BaseClientOptions, InternalRuntimeConfig, InternalRuntimeConfigHTTP, RuntimeConfig, RuntimeConfigHTTP } from './client/base';
|
|
4
2
|
import type { ClientNameEvents, EventContext } from './events';
|
|
5
|
-
|
|
6
|
-
export { Logger, PermissionFlagsBits, PermissionStrings, Watcher } from './common';
|
|
3
|
+
export { Logger, PermissionStrings, Watcher } from './common';
|
|
7
4
|
export { Collection, LimitedCollection } from './collection';
|
|
8
5
|
export * from './api';
|
|
9
6
|
export * from './builders';
|
|
@@ -81,4 +78,4 @@ export declare const config: {
|
|
|
81
78
|
* };
|
|
82
79
|
* });
|
|
83
80
|
*/
|
|
84
|
-
export declare function extendContext<T extends {}>(cb: (interaction:
|
|
81
|
+
export declare function extendContext<T extends {}>(cb: (interaction: Parameters<NonNullable<BaseClientOptions['context']>>[0]) => T): (interaction: Parameters<NonNullable<BaseClientOptions['context']>>[0]) => T;
|
package/lib/index.js
CHANGED
|
@@ -14,12 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.extendContext = exports.config = exports.createEvent = exports.throwError = exports.WorkerManager = exports.ShardManager = exports.LimitedCollection = exports.Collection = exports.Watcher = exports.
|
|
18
|
-
const
|
|
19
|
-
var
|
|
20
|
-
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return
|
|
21
|
-
Object.defineProperty(exports, "
|
|
22
|
-
Object.defineProperty(exports, "Watcher", { enumerable: true, get: function () { return common_2.Watcher; } });
|
|
17
|
+
exports.extendContext = exports.config = exports.createEvent = exports.throwError = exports.WorkerManager = exports.ShardManager = exports.LimitedCollection = exports.Collection = exports.Watcher = exports.Logger = void 0;
|
|
18
|
+
const v10_1 = require("discord-api-types/gateway/v10");
|
|
19
|
+
var common_1 = require("./common");
|
|
20
|
+
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return common_1.Logger; } });
|
|
21
|
+
Object.defineProperty(exports, "Watcher", { enumerable: true, get: function () { return common_1.Watcher; } });
|
|
23
22
|
//
|
|
24
23
|
var collection_1 = require("./collection");
|
|
25
24
|
Object.defineProperty(exports, "Collection", { enumerable: true, get: function () { return collection_1.Collection; } });
|
|
@@ -77,7 +76,7 @@ exports.config = {
|
|
|
77
76
|
intents: 'intents' in data
|
|
78
77
|
? typeof data.intents === 'number'
|
|
79
78
|
? data.intents
|
|
80
|
-
: data.intents?.reduce((pr, acc) => pr |
|
|
79
|
+
: data.intents?.reduce((pr, acc) => pr | (typeof acc === 'number' ? acc : v10_1.GatewayIntentBits[acc]), 0) ?? 0
|
|
81
80
|
: 0,
|
|
82
81
|
};
|
|
83
82
|
},
|
package/lib/langs/handler.d.ts
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { LocaleString } from 'discord-api-types/v10';
|
|
2
|
+
import { BaseHandler } from '../common';
|
|
3
|
+
export interface LangsHandlerLike {
|
|
4
|
+
getKey: LangsHandler['getKey'];
|
|
5
|
+
load: LangsHandler['load'];
|
|
6
|
+
values: LangsHandler['values'];
|
|
7
|
+
aliases: LangsHandler['aliases'];
|
|
8
|
+
get: LangsHandler['get'];
|
|
9
|
+
defaultLang?: LangsHandler['defaultLang'];
|
|
10
|
+
}
|
|
2
11
|
export declare class LangsHandler extends BaseHandler {
|
|
3
12
|
values: Partial<Record<string, any>>;
|
|
4
13
|
protected filter: (path: string) => boolean;
|
package/lib/langs/handler.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { APIAutoModerationRule, RESTPatchAPIAutoModerationRuleJSONBody, RESTPostAPIAutoModerationRuleJSONBody } from 'discord-api-types/v10';
|
|
1
2
|
import type { UsingClient } from '../commands';
|
|
2
|
-
import type {
|
|
3
|
+
import type { MethodContext, ObjectToLower } from '../common';
|
|
3
4
|
import { DiscordBase } from './extra/DiscordBase';
|
|
4
5
|
export interface AutoModerationRule extends ObjectToLower<APIAutoModerationRule> {
|
|
5
6
|
}
|
|
@@ -13,7 +14,7 @@ export declare class AutoModerationRule extends DiscordBase<APIAutoModerationRul
|
|
|
13
14
|
static methods({ client, guildId }: MethodContext<{
|
|
14
15
|
guildId: string;
|
|
15
16
|
}>): {
|
|
16
|
-
list: () => Promise<import("discord-api-types/
|
|
17
|
+
list: () => Promise<import("discord-api-types/v10").RESTGetAPIAutoModerationRulesResult>;
|
|
17
18
|
create: (body: RESTPostAPIAutoModerationRuleJSONBody) => Promise<APIAutoModerationRule>;
|
|
18
19
|
delete: (ruleId: string, reason?: string) => Promise<never>;
|
|
19
20
|
fetch: (ruleId: string) => Promise<APIAutoModerationRule>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { GatewayReadyDispatchData, RESTPatchAPICurrentUserJSONBody } from 'discord-api-types/v10';
|
|
1
2
|
import type { UsingClient } from '../commands';
|
|
2
|
-
import type { GatewayReadyDispatchData, RESTPatchAPICurrentUserJSONBody } from '../common';
|
|
3
3
|
import { User } from './User';
|
|
4
4
|
export declare class ClientUser extends User {
|
|
5
5
|
application: GatewayReadyDispatchData['application'];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import type { APIGuild, GatewayGuildCreateDispatchData } from 'discord-api-types/v10';
|
|
1
2
|
import type { UsingClient } from '../commands';
|
|
2
|
-
import type {
|
|
3
|
-
import type { StructPropState, StructStates, ToClass } from '../common/types/util';
|
|
3
|
+
import type { ObjectToLower, StructPropState, StructStates, ToClass } from '../common/types/util';
|
|
4
4
|
import { GuildEmoji } from './GuildEmoji';
|
|
5
5
|
import { GuildMember } from './GuildMember';
|
|
6
6
|
import { GuildRole } from './GuildRole';
|
|
@@ -23,56 +23,56 @@ export declare class Guild<State extends StructStates = 'api'> extends Guild_bas
|
|
|
23
23
|
get maxEmojis(): MaxEmojis;
|
|
24
24
|
fetchOwner(force?: boolean): Promise<null> | Promise<GuildMember>;
|
|
25
25
|
templates: {
|
|
26
|
-
fetch: (code: string) => Promise<import("discord-api-types/
|
|
27
|
-
list: () => Promise<import("discord-api-types/
|
|
28
|
-
create: (body: import("discord-api-types/
|
|
29
|
-
sync: (code: string) => Promise<import("discord-api-types/
|
|
30
|
-
edit: (code: string, body: import("discord-api-types/utils/internals").AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<import("discord-api-types/
|
|
31
|
-
delete: (code: string) => Promise<import("discord-api-types/
|
|
26
|
+
fetch: (code: string) => Promise<import("discord-api-types/v10").APITemplate>;
|
|
27
|
+
list: () => Promise<import("discord-api-types/v10").RESTGetAPIGuildTemplatesResult>;
|
|
28
|
+
create: (body: import("discord-api-types/v10").RESTPostAPIGuildTemplatesJSONBody) => Promise<import("discord-api-types/v10").APITemplate>;
|
|
29
|
+
sync: (code: string) => Promise<import("discord-api-types/v10").APITemplate>;
|
|
30
|
+
edit: (code: string, body: import("discord-api-types/utils/internals").AddUndefinedToPossiblyUndefinedPropertiesOfInterface<Partial<import("discord-api-types/v10").RESTPostAPIGuildTemplatesJSONBody>>) => Promise<import("discord-api-types/v10").APITemplate>;
|
|
31
|
+
delete: (code: string) => Promise<import("discord-api-types/v10").APITemplate>;
|
|
32
32
|
};
|
|
33
33
|
stickers: {
|
|
34
34
|
list: () => Promise<Sticker[]>;
|
|
35
35
|
create: (payload: import("./Sticker").CreateStickerBodyRequest, reason?: string | undefined) => Promise<Sticker>;
|
|
36
|
-
edit: (stickerId: string, body: import("discord-api-types/
|
|
36
|
+
edit: (stickerId: string, body: import("discord-api-types/v10").RESTPatchAPIGuildStickerJSONBody, reason?: string | undefined) => Promise<Sticker>;
|
|
37
37
|
fetch: (stickerId: string, force?: boolean) => Promise<Sticker>;
|
|
38
38
|
delete: (stickerId: string, reason?: string | undefined) => Promise<void>;
|
|
39
39
|
};
|
|
40
40
|
members: {
|
|
41
41
|
resolve: (resolve: import("../common").GuildMemberResolvable) => Promise<GuildMember | undefined>;
|
|
42
|
-
search: (query?: import("discord-api-types/
|
|
43
|
-
unban: (id: string, body?: import("discord-api-types/
|
|
44
|
-
ban: (id: string, body?: import("discord-api-types/
|
|
42
|
+
search: (query?: import("discord-api-types/v10").RESTGetAPIGuildMembersSearchQuery | undefined) => Promise<GuildMember[]>;
|
|
43
|
+
unban: (id: string, body?: import("discord-api-types/v10").RESTPutAPIGuildBanJSONBody | undefined, reason?: string | undefined) => Promise<void>;
|
|
44
|
+
ban: (id: string, body?: import("discord-api-types/v10").RESTPutAPIGuildBanJSONBody | undefined, reason?: string | undefined) => Promise<void>;
|
|
45
45
|
kick: (id: string, reason?: string | undefined) => Promise<void>;
|
|
46
|
-
edit: (id: string, body: import("discord-api-types/
|
|
47
|
-
add: (id: string, body: import("discord-api-types/
|
|
46
|
+
edit: (id: string, body: import("discord-api-types/v10").RESTPatchAPIGuildMemberJSONBody, reason?: string | undefined) => Promise<GuildMember>;
|
|
47
|
+
add: (id: string, body: import("discord-api-types/v10").RESTPutAPIGuildMemberJSONBody) => Promise<GuildMember | undefined>;
|
|
48
48
|
fetch: (memberId: string, force?: boolean) => Promise<GuildMember>;
|
|
49
|
-
list: (query?: import("discord-api-types/
|
|
49
|
+
list: (query?: import("discord-api-types/v10").RESTGetAPIGuildMembersQuery | undefined, force?: boolean) => Promise<GuildMember[]>;
|
|
50
50
|
};
|
|
51
51
|
moderationRules: {
|
|
52
|
-
list: () => Promise<import("discord-api-types/
|
|
53
|
-
create: (body: import("discord-api-types/
|
|
52
|
+
list: () => Promise<import("discord-api-types/v10").RESTGetAPIAutoModerationRulesResult>;
|
|
53
|
+
create: (body: import("discord-api-types/v10").RESTPostAPIAutoModerationRuleJSONBody) => Promise<import("discord-api-types/v10").APIAutoModerationRule>;
|
|
54
54
|
delete: (ruleId: string, reason?: string | undefined) => Promise<never>;
|
|
55
|
-
fetch: (ruleId: string) => Promise<import("discord-api-types/
|
|
56
|
-
edit: (ruleId: string, body: import("discord-api-types/
|
|
55
|
+
fetch: (ruleId: string) => Promise<import("discord-api-types/v10").APIAutoModerationRule>;
|
|
56
|
+
edit: (ruleId: string, body: import("discord-api-types/v10").RESTPatchAPIAutoModerationRuleJSONBody, reason?: string | undefined) => Promise<import("discord-api-types/v10").APIAutoModerationRule>;
|
|
57
57
|
};
|
|
58
58
|
roles: {
|
|
59
|
-
create: (body: import("discord-api-types/
|
|
59
|
+
create: (body: import("discord-api-types/v10").RESTPostAPIGuildRoleJSONBody) => Promise<any>;
|
|
60
60
|
list: (force?: boolean) => Promise<GuildRole[]>;
|
|
61
|
-
edit: (roleId: string, body: import("discord-api-types/
|
|
61
|
+
edit: (roleId: string, body: import("discord-api-types/v10").RESTPatchAPIGuildRoleJSONBody, reason?: string | undefined) => Promise<any>;
|
|
62
62
|
delete: (roleId: string, reason?: string | undefined) => Promise<void | undefined>;
|
|
63
|
-
editPositions: (body: import("discord-api-types/
|
|
63
|
+
editPositions: (body: import("discord-api-types/v10").RESTPatchAPIGuildRolePositionsJSONBody) => Promise<GuildRole[]>;
|
|
64
64
|
};
|
|
65
65
|
channels: {
|
|
66
66
|
list: (force?: boolean) => Promise<import("./channels").AllChannels[]>;
|
|
67
67
|
fetch: (id: string, force?: boolean) => Promise<import("./channels").AllChannels>;
|
|
68
|
-
create: (body: import("discord-api-types/
|
|
68
|
+
create: (body: import("discord-api-types/v10").RESTPostAPIGuildChannelJSONBody) => Promise<import("./channels").AllChannels>;
|
|
69
69
|
delete: (id: string, reason?: string | undefined) => Promise<import("./channels").AllChannels>;
|
|
70
|
-
edit: (id: string, body: import("discord-api-types/
|
|
71
|
-
editPositions: (body: import("discord-api-types/
|
|
70
|
+
edit: (id: string, body: import("discord-api-types/v10").RESTPatchAPIChannelJSONBody, reason?: string | undefined) => Promise<import("./channels").AllChannels>;
|
|
71
|
+
editPositions: (body: import("discord-api-types/v10").RESTPatchAPIGuildChannelPositionsJSONBody) => Promise<never>;
|
|
72
72
|
};
|
|
73
73
|
emojis: {
|
|
74
|
-
edit: (emojiId: string, body: import("discord-api-types/
|
|
75
|
-
create: (body: Omit<import("discord-api-types/
|
|
74
|
+
edit: (emojiId: string, body: import("discord-api-types/v10").RESTPatchAPIGuildEmojiJSONBody, reason?: string | undefined) => Promise<GuildEmoji>;
|
|
75
|
+
create: (body: Omit<import("discord-api-types/v10").RESTPostAPIGuildEmojiJSONBody, "image"> & {
|
|
76
76
|
image: import("../common").ImageResolvable;
|
|
77
77
|
}) => Promise<void>;
|
|
78
78
|
fetch: (emojiId: string, force?: boolean) => Promise<GuildEmoji>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import type { APIEmoji, RESTPatchAPIChannelJSONBody, RESTPatchAPIGuildEmojiJSONBody } from 'discord-api-types/v10';
|
|
1
2
|
import type { BaseImageURLOptions } from '../api';
|
|
2
3
|
import type { UsingClient } from '../commands';
|
|
3
|
-
import type {
|
|
4
|
+
import type { EmojiShorter, MethodContext, ObjectToLower } from '../common';
|
|
4
5
|
import { DiscordBase } from './extra/DiscordBase';
|
|
5
6
|
export interface GuildEmoji extends DiscordBase, ObjectToLower<Omit<APIEmoji, 'id'>> {
|
|
6
7
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import type { APIGuildMember, APIInteractionDataResolvedGuildMember, APIUser, GatewayGuildMemberAddDispatchData, GatewayGuildMemberUpdateDispatchData, MakeRequired, MessageCreateBodyRequest, ObjectToLower, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersSearchQuery, RESTPatchAPIGuildMemberJSONBody, RESTPutAPIGuildBanJSONBody, RESTPutAPIGuildMemberJSONBody, ToClass } from '../common';
|
|
2
1
|
import { DiscordBase } from './extra/DiscordBase';
|
|
3
2
|
export type GuildMemberData = APIGuildMember | GatewayGuildMemberUpdateDispatchData | GatewayGuildMemberAddDispatchData | APIInteractionDataResolvedGuildMember;
|
|
3
|
+
import type { APIGuildMember, APIInteractionDataResolvedGuildMember, APIUser, GatewayGuildMemberAddDispatchData, GatewayGuildMemberUpdateDispatchData, RESTGetAPIGuildMembersQuery, RESTGetAPIGuildMembersSearchQuery, RESTPatchAPIGuildMemberJSONBody, RESTPutAPIGuildBanJSONBody, RESTPutAPIGuildMemberJSONBody } from 'discord-api-types/v10';
|
|
4
4
|
import type { UsingClient } from '../commands';
|
|
5
|
+
import type { MakeRequired, MessageCreateBodyRequest, ObjectToLower, ToClass } from '../common';
|
|
5
6
|
import type { ImageOptions, MethodContext } from '../common/types/options';
|
|
6
7
|
import type { GuildMemberResolvable } from '../common/types/resolvables';
|
|
7
8
|
import { User } from './User';
|
|
@@ -25,12 +26,12 @@ export declare class BaseGuildMember extends DiscordBase {
|
|
|
25
26
|
ban(body?: RESTPutAPIGuildBanJSONBody, reason?: string): Promise<void>;
|
|
26
27
|
kick(reason?: string): Promise<void>;
|
|
27
28
|
edit(body: RESTPatchAPIGuildMemberJSONBody, reason?: string): Promise<GuildMember>;
|
|
28
|
-
presence(): import("..").ReturnCache<(Omit<import("discord-api-types/
|
|
29
|
+
presence(): import("..").ReturnCache<(Omit<import("discord-api-types/v10").GatewayPresenceUpdate, "user"> & {
|
|
29
30
|
id: string;
|
|
30
31
|
} & {
|
|
31
32
|
guild_id: string;
|
|
32
33
|
}) | undefined>;
|
|
33
|
-
voice(): import("..").ReturnCache<(Omit<import("discord-api-types/
|
|
34
|
+
voice(): import("..").ReturnCache<(Omit<import("discord-api-types/v10").GatewayVoiceState, "member"> & {
|
|
34
35
|
guild_id: string;
|
|
35
36
|
} & {
|
|
36
37
|
guild_id: string;
|
|
@@ -38,10 +39,13 @@ export declare class BaseGuildMember extends DiscordBase {
|
|
|
38
39
|
toString(): string;
|
|
39
40
|
private patch;
|
|
40
41
|
get roles(): {
|
|
41
|
-
|
|
42
|
+
keys: string[];
|
|
43
|
+
list: (force?: boolean) => Promise<import("./GuildRole").GuildRole[]>;
|
|
42
44
|
add: (id: string) => void;
|
|
43
45
|
remove: (id: string) => Promise<never>;
|
|
44
|
-
permissions: () => Promise<PermissionsBitField>;
|
|
46
|
+
permissions: (force?: boolean) => Promise<PermissionsBitField>;
|
|
47
|
+
sorted: (force?: boolean) => Promise<import("./GuildRole").GuildRole[]>;
|
|
48
|
+
highest: (force?: boolean) => Promise<import("./GuildRole").GuildRole>;
|
|
45
49
|
};
|
|
46
50
|
static methods({ client, guildId }: MethodContext<{
|
|
47
51
|
guildId: string;
|
|
@@ -67,6 +71,7 @@ export declare class GuildMember extends BaseGuildMember {
|
|
|
67
71
|
/** the choosen guild id */
|
|
68
72
|
readonly guildId: string;
|
|
69
73
|
user: User;
|
|
74
|
+
private __me?;
|
|
70
75
|
constructor(client: UsingClient, data: GuildMemberData, user: APIUser | User,
|
|
71
76
|
/** the choosen guild id */
|
|
72
77
|
guildId: string);
|
|
@@ -81,7 +86,12 @@ export declare class GuildMember extends BaseGuildMember {
|
|
|
81
86
|
write(body: MessageCreateBodyRequest): Promise<import("./Message").Message>;
|
|
82
87
|
avatarURL(options?: ImageOptions): string;
|
|
83
88
|
dynamicAvatarURL(options?: ImageOptions): string;
|
|
84
|
-
|
|
89
|
+
bannerURL(options?: ImageOptions): string | undefined;
|
|
90
|
+
fetchPermissions(force?: boolean): Promise<PermissionsBitField>;
|
|
91
|
+
manageable(force?: boolean): Promise<boolean>;
|
|
92
|
+
bannable(force?: boolean): Promise<boolean>;
|
|
93
|
+
kickable(force?: boolean): Promise<boolean>;
|
|
94
|
+
moderatable(force?: boolean): Promise<boolean>;
|
|
85
95
|
}
|
|
86
96
|
export interface UnavailableMember {
|
|
87
97
|
pending: true;
|