disgroove 2.0.0-dev.3a6f4ba → 2.0.0-dev.825fc77
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/dist/lib/Client.d.ts +560 -142
- package/dist/lib/Client.js +1794 -124
- package/dist/lib/Client.js.map +1 -1
- package/dist/lib/constants.d.ts +7 -7
- package/dist/lib/constants.js +218 -218
- package/dist/lib/gateway/Shard.d.ts +0 -1
- package/dist/lib/gateway/Shard.js +65 -261
- package/dist/lib/gateway/Shard.js.map +1 -1
- package/dist/lib/gateway/ShardManager.d.ts +1 -2
- package/dist/lib/gateway/ShardManager.js +1 -2
- package/dist/lib/gateway/ShardManager.js.map +1 -1
- package/dist/lib/index.d.ts +0 -1
- package/dist/lib/index.js +0 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/rest/Endpoints.d.ts +3 -3
- package/dist/lib/rest/Endpoints.js +8 -8
- package/dist/lib/rest/Endpoints.js.map +1 -1
- package/dist/lib/rest/RequestManager.d.ts +8 -2
- package/dist/lib/rest/RequestManager.js +17 -10
- package/dist/lib/rest/RequestManager.js.map +1 -1
- package/dist/lib/rest/index.d.ts +0 -1
- package/dist/lib/rest/index.js +0 -1
- package/dist/lib/rest/index.js.map +1 -1
- package/dist/lib/structures/Application.d.ts +93 -11
- package/dist/lib/structures/Application.js.map +1 -1
- package/dist/lib/structures/ApplicationCommand.d.ts +18 -6
- package/dist/lib/structures/ApplicationCommand.js.map +1 -1
- package/dist/lib/structures/AutoModerationRule.d.ts +11 -2
- package/dist/lib/structures/AutoModerationRule.js.map +1 -1
- package/dist/lib/structures/Channel.d.ts +108 -14
- package/dist/lib/structures/Channel.js +1 -1
- package/dist/lib/structures/Channel.js.map +1 -1
- package/dist/lib/structures/ClientApplication.d.ts +93 -11
- package/dist/lib/structures/ClientApplication.js.map +1 -1
- package/dist/lib/structures/Emoji.d.ts +5 -2
- package/dist/lib/structures/Emoji.js.map +1 -1
- package/dist/lib/structures/Guild.d.ts +234 -31
- package/dist/lib/structures/Guild.js.map +1 -1
- package/dist/lib/structures/GuildMember.d.ts +14 -3
- package/dist/lib/structures/GuildMember.js.map +1 -1
- package/dist/lib/structures/GuildScheduledEvent.d.ts +13 -2
- package/dist/lib/structures/GuildScheduledEvent.js.map +1 -1
- package/dist/lib/structures/GuildTemplate.d.ts +5 -2
- package/dist/lib/structures/GuildTemplate.js.map +1 -1
- package/dist/lib/structures/Interaction.d.ts +32 -7
- package/dist/lib/structures/Interaction.js.map +1 -1
- package/dist/lib/structures/Message.d.ts +16 -3
- package/dist/lib/structures/Message.js.map +1 -1
- package/dist/lib/structures/Role.d.ts +10 -2
- package/dist/lib/structures/Role.js.map +1 -1
- package/dist/lib/structures/StageInstance.d.ts +5 -2
- package/dist/lib/structures/StageInstance.js.map +1 -1
- package/dist/lib/structures/Sticker.d.ts +6 -2
- package/dist/lib/structures/Sticker.js.map +1 -1
- package/dist/lib/structures/User.d.ts +28 -9
- package/dist/lib/structures/User.js +3 -3
- package/dist/lib/structures/User.js.map +1 -1
- package/dist/lib/structures/Webhook.d.ts +35 -9
- package/dist/lib/structures/Webhook.js +14 -3
- package/dist/lib/structures/Webhook.js.map +1 -1
- package/dist/lib/types/application-command.d.ts +21 -21
- package/dist/lib/types/application-role-connection-metadata.d.ts +1 -1
- package/dist/lib/types/application.d.ts +17 -17
- package/dist/lib/types/audit-log.d.ts +15 -16
- package/dist/lib/types/auto-moderation.d.ts +11 -11
- package/dist/lib/types/channel.d.ts +83 -83
- package/dist/lib/types/emoji.d.ts +3 -3
- package/dist/lib/types/entitlements.d.ts +1 -1
- package/dist/lib/types/gateway-events.d.ts +11 -336
- package/dist/lib/types/guild-scheduled-event.d.ts +10 -10
- package/dist/lib/types/guild-template.d.ts +4 -4
- package/dist/lib/types/guild.d.ts +44 -45
- package/dist/lib/types/interaction.d.ts +37 -37
- package/dist/lib/types/invite.d.ts +12 -12
- package/dist/lib/types/message-components.d.ts +12 -12
- package/dist/lib/types/role.d.ts +3 -3
- package/dist/lib/types/sku.d.ts +8 -8
- package/dist/lib/types/stage-instance.d.ts +1 -1
- package/dist/lib/types/sticker.d.ts +6 -6
- package/dist/lib/types/team.d.ts +5 -5
- package/dist/lib/types/user.d.ts +6 -6
- package/dist/lib/types/voice.d.ts +4 -4
- package/dist/lib/types/webhook.d.ts +14 -14
- package/dist/lib/utils/Util.d.ts +0 -13
- package/dist/lib/utils/Util.js +0 -536
- package/dist/lib/utils/Util.js.map +1 -1
- package/dist/lib/utils/errors.d.ts +1 -1
- package/dist/lib/utils/errors.js +4 -4
- package/dist/lib/utils/index.d.ts +0 -1
- package/dist/lib/utils/index.js +0 -1
- package/dist/lib/utils/index.js.map +1 -1
- package/dist/package.json +1 -1
- package/package.json +1 -1
@@ -53,7 +53,7 @@ export interface RawApplicationCommandPermission {
|
|
53
53
|
type: ApplicationCommandPermissionType;
|
54
54
|
permission: boolean;
|
55
55
|
}
|
56
|
-
export interface
|
56
|
+
export interface ApplicationCommand {
|
57
57
|
id: string;
|
58
58
|
type?: ApplicationCommandTypes;
|
59
59
|
applicationId: string;
|
@@ -62,22 +62,22 @@ export interface JSONApplicationCommand {
|
|
62
62
|
nameLocalizations?: LocaleMap | null;
|
63
63
|
description: string;
|
64
64
|
descriptionLocalizations?: LocaleMap | null;
|
65
|
-
options?: Array<
|
65
|
+
options?: Array<ApplicationCommandOption>;
|
66
66
|
defaultMemberPermissions: string | null;
|
67
67
|
dmPermission?: boolean;
|
68
68
|
defaultPermission?: boolean | null;
|
69
69
|
nsfw?: boolean;
|
70
70
|
version: string;
|
71
71
|
}
|
72
|
-
export interface
|
72
|
+
export interface ApplicationCommandOption {
|
73
73
|
type: ApplicationCommandOptionType;
|
74
74
|
name: string;
|
75
75
|
nameLocalizations?: LocaleMap | null;
|
76
76
|
description: string;
|
77
77
|
descriptionLocalizations?: LocaleMap | null;
|
78
78
|
required?: boolean;
|
79
|
-
choices?: Array<
|
80
|
-
options?: Array<
|
79
|
+
choices?: Array<ApplicationCommandOptionChoice>;
|
80
|
+
options?: Array<ApplicationCommandOption>;
|
81
81
|
channelTypes?: Array<ChannelTypes>;
|
82
82
|
minValue?: number;
|
83
83
|
maxValue?: number;
|
@@ -85,18 +85,18 @@ export interface JSONApplicationCommandOption {
|
|
85
85
|
maxLength?: number;
|
86
86
|
autocomplete?: boolean;
|
87
87
|
}
|
88
|
-
export interface
|
88
|
+
export interface ApplicationCommandOptionChoice {
|
89
89
|
name: string;
|
90
90
|
nameLocalizations?: LocaleMap | null;
|
91
91
|
value: string;
|
92
92
|
}
|
93
|
-
export interface
|
93
|
+
export interface GuildApplicationCommandPermissions {
|
94
94
|
id: string;
|
95
95
|
applicationId: string;
|
96
96
|
guildId: string;
|
97
|
-
permissions: Array<
|
97
|
+
permissions: Array<ApplicationCommandPermission>;
|
98
98
|
}
|
99
|
-
export interface
|
99
|
+
export interface ApplicationCommandPermission {
|
100
100
|
id: string;
|
101
101
|
type: ApplicationCommandPermissionType;
|
102
102
|
permission: boolean;
|
@@ -106,7 +106,7 @@ export interface CreateGlobalApplicationCommandParams {
|
|
106
106
|
nameLocalizations?: LocaleMap | null;
|
107
107
|
description?: string;
|
108
108
|
descriptionLocalizations?: LocaleMap | null;
|
109
|
-
options?: Array<
|
109
|
+
options?: Array<ApplicationCommandOption>;
|
110
110
|
defaultMemberPermissions?: string | null;
|
111
111
|
dmPermission?: boolean;
|
112
112
|
defaultPermission?: boolean | null;
|
@@ -118,31 +118,31 @@ export interface EditGlobalApplicationCommandParams {
|
|
118
118
|
nameLocalizations?: LocaleMap | null;
|
119
119
|
description?: string;
|
120
120
|
descriptionLocalizations?: LocaleMap | null;
|
121
|
-
options?: Array<
|
121
|
+
options?: Array<ApplicationCommandOption>;
|
122
122
|
defaultMemberPermissions?: string | null;
|
123
123
|
defaultPermission?: boolean | null;
|
124
124
|
dmPermission?: boolean;
|
125
125
|
nsfw?: boolean;
|
126
126
|
}
|
127
|
-
export
|
127
|
+
export interface BulkEditGlobalApplicationCommandParams {
|
128
128
|
id?: string;
|
129
129
|
name: string;
|
130
130
|
nameLocalizations?: LocaleMap | null;
|
131
131
|
description?: string;
|
132
132
|
descriptionLocalizations?: LocaleMap | null;
|
133
|
-
options?: Array<
|
133
|
+
options?: Array<ApplicationCommandOption>;
|
134
134
|
defaultMemberPermissions?: string | null;
|
135
135
|
dmPermission?: boolean;
|
136
136
|
defaultPermission?: boolean | null;
|
137
137
|
type?: ApplicationCommandTypes;
|
138
138
|
nsfw?: boolean;
|
139
|
-
}
|
139
|
+
}
|
140
140
|
export interface CreateGuildApplicationCommandParams {
|
141
141
|
name: string;
|
142
142
|
nameLocalizations?: LocaleMap | null;
|
143
143
|
description?: string;
|
144
144
|
descriptionLocalizations?: LocaleMap | null;
|
145
|
-
options?: Array<
|
145
|
+
options?: Array<ApplicationCommandOption>;
|
146
146
|
defaultMemberPermissions?: string | null;
|
147
147
|
defaultPermission?: boolean | null;
|
148
148
|
type?: ApplicationCommandTypes;
|
@@ -153,24 +153,24 @@ export interface EditGuildApplicationCommandParams {
|
|
153
153
|
nameLocalizations?: LocaleMap | null;
|
154
154
|
description?: string;
|
155
155
|
descriptionLocalizations?: LocaleMap | null;
|
156
|
-
options?: Array<
|
156
|
+
options?: Array<ApplicationCommandOption>;
|
157
157
|
defaultMemberPermissions?: string | null;
|
158
158
|
defaultPermission?: boolean | null;
|
159
159
|
nsfw?: boolean;
|
160
160
|
}
|
161
|
-
export
|
161
|
+
export interface BulkEditGuildApplicationCommandsParams {
|
162
162
|
id?: string;
|
163
163
|
name: string;
|
164
164
|
nameLocalizations?: LocaleMap | null;
|
165
165
|
description?: string;
|
166
166
|
descriptionLocalizations?: LocaleMap | null;
|
167
|
-
options?: Array<
|
167
|
+
options?: Array<ApplicationCommandOption>;
|
168
168
|
defaultMemberPermissions?: string | null;
|
169
169
|
dmPermission?: boolean;
|
170
170
|
defaultPermission?: boolean | null;
|
171
171
|
type: ApplicationCommandTypes;
|
172
172
|
nsfw?: boolean;
|
173
|
-
}
|
174
|
-
export interface
|
175
|
-
permissions: Array<
|
173
|
+
}
|
174
|
+
export interface EditApplicationCommandPermissions {
|
175
|
+
permissions: Array<GuildApplicationCommandPermissions>;
|
176
176
|
}
|
@@ -9,7 +9,7 @@ export interface RawApplicationRoleConnectionMetadata {
|
|
9
9
|
description: string;
|
10
10
|
description_localizations?: LocaleMap | null;
|
11
11
|
}
|
12
|
-
export interface
|
12
|
+
export interface ApplicationRoleConnectionMetadata {
|
13
13
|
type: ApplicationRoleConnectionMetadataType;
|
14
14
|
key: string;
|
15
15
|
name: string;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import type { RawUser, RawTeam,
|
1
|
+
import type { RawUser, RawTeam, Team, User, RawGuild, Guild } from ".";
|
2
2
|
import type { ApplicationFlags, OAuth2Scopes } from "../constants";
|
3
3
|
/** https://discord.com/developers/docs/resources/application#application-object-application-structure */
|
4
4
|
export interface RawApplication {
|
@@ -33,7 +33,7 @@ export interface RawInstallParams {
|
|
33
33
|
scopes: Array<OAuth2Scopes>;
|
34
34
|
permissions: string;
|
35
35
|
}
|
36
|
-
export interface
|
36
|
+
export interface Application {
|
37
37
|
id: string;
|
38
38
|
name: string;
|
39
39
|
icon: string | null;
|
@@ -41,37 +41,37 @@ export interface JSONApplication {
|
|
41
41
|
rpcOrigins?: Array<string>;
|
42
42
|
botPublic: boolean;
|
43
43
|
botRequireCodeGrant: boolean;
|
44
|
-
|
45
|
-
|
46
|
-
owner?:
|
44
|
+
termsOfServiceUrl?: string;
|
45
|
+
privacyPolicyUrl?: string;
|
46
|
+
owner?: User;
|
47
47
|
verifyKey: string;
|
48
|
-
team:
|
48
|
+
team: Team | null;
|
49
49
|
guildId?: string;
|
50
|
-
guild?:
|
51
|
-
|
50
|
+
guild?: Guild;
|
51
|
+
primarySkuId?: string;
|
52
52
|
slug?: string;
|
53
53
|
coverImage?: string;
|
54
54
|
flags?: ApplicationFlags;
|
55
55
|
approximateGuildCount?: number;
|
56
56
|
redirectURIs?: Array<string>;
|
57
|
-
|
58
|
-
|
57
|
+
interactionsEndpointUrl?: string;
|
58
|
+
roleConnectionsVerificationUrl?: string;
|
59
59
|
tags?: Array<string>;
|
60
|
-
installParams?:
|
61
|
-
|
60
|
+
installParams?: InstallParams;
|
61
|
+
customInstallUrl?: string;
|
62
62
|
}
|
63
|
-
export interface
|
63
|
+
export interface InstallParams {
|
64
64
|
scopes: Array<OAuth2Scopes>;
|
65
65
|
permissions: string;
|
66
66
|
}
|
67
67
|
export interface EditCurrentApplicationParams {
|
68
|
-
|
68
|
+
customInstallUrl?: string;
|
69
69
|
description?: string;
|
70
|
-
|
71
|
-
installParams?:
|
70
|
+
roleConnectionsVerificationUrl?: string;
|
71
|
+
installParams?: InstallParams;
|
72
72
|
flags?: ApplicationFlags;
|
73
73
|
icon?: string;
|
74
74
|
coverImage?: string;
|
75
|
-
|
75
|
+
interactionsEndpointUrl?: string;
|
76
76
|
tags?: Array<string>;
|
77
77
|
}
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import type { RawApplicationCommand, RawGuildScheduledEvent, RawAutoModerationRule, RawIntegration, RawChannel, RawUser, RawWebhook,
|
1
|
+
import type { RawApplicationCommand, RawGuildScheduledEvent, RawAutoModerationRule, RawIntegration, RawChannel, RawUser, RawWebhook, User, ApplicationCommand, AutoModerationRule, GuildScheduledEvent, Integration, Channel, Webhook } from ".";
|
2
2
|
import type { AuditLogEvents } from "../constants";
|
3
|
-
import { Collection } from "../utils";
|
4
3
|
/** https://discord.com/developers/docs/resources/audit-log#audit-log-object-audit-log-structure */
|
5
4
|
export interface RawAuditLog {
|
6
5
|
application_commands: Array<RawApplicationCommand>;
|
@@ -43,26 +42,26 @@ export interface RawAuditLogChange {
|
|
43
42
|
old_value?: any;
|
44
43
|
key: string;
|
45
44
|
}
|
46
|
-
export interface
|
47
|
-
applicationCommands:
|
48
|
-
auditLogEntries:
|
49
|
-
autoModerationRules:
|
50
|
-
guildScheduledEvents:
|
51
|
-
integrations:
|
52
|
-
threads:
|
53
|
-
users:
|
54
|
-
webhooks:
|
45
|
+
export interface AuditLog {
|
46
|
+
applicationCommands: Array<ApplicationCommand>;
|
47
|
+
auditLogEntries: Array<AuditLogEntry>;
|
48
|
+
autoModerationRules: Array<AutoModerationRule>;
|
49
|
+
guildScheduledEvents: Array<GuildScheduledEvent>;
|
50
|
+
integrations: Array<Integration>;
|
51
|
+
threads: Array<Channel>;
|
52
|
+
users: Array<User>;
|
53
|
+
webhooks: Array<Webhook>;
|
55
54
|
}
|
56
|
-
export interface
|
55
|
+
export interface AuditLogEntry {
|
57
56
|
targetId: string | null;
|
58
|
-
changes?: Array<
|
57
|
+
changes?: Array<AuditLogChange>;
|
59
58
|
userId: string | null;
|
60
59
|
id: string;
|
61
60
|
actionType: AuditLogEvents;
|
62
|
-
options?:
|
61
|
+
options?: OptionalAuditLogEntryInfo;
|
63
62
|
reason?: string;
|
64
63
|
}
|
65
|
-
export interface
|
64
|
+
export interface OptionalAuditLogEntryInfo {
|
66
65
|
applicationId: string;
|
67
66
|
autoModerationRuleName: string;
|
68
67
|
autoModerationRuleTriggerType: string;
|
@@ -76,7 +75,7 @@ export interface JSONOptionalAuditLogEntryInfo {
|
|
76
75
|
type: string;
|
77
76
|
integrationType: string;
|
78
77
|
}
|
79
|
-
export interface
|
78
|
+
export interface AuditLogChange {
|
80
79
|
newValue?: any;
|
81
80
|
oldValue?: any;
|
82
81
|
key: string;
|
@@ -33,20 +33,20 @@ export interface RawActionMetadata {
|
|
33
33
|
duration_seconds: number;
|
34
34
|
custom_message?: string;
|
35
35
|
}
|
36
|
-
export interface
|
36
|
+
export interface AutoModerationRule {
|
37
37
|
id: string;
|
38
38
|
guildId: string;
|
39
39
|
name: string;
|
40
40
|
creatorId: string;
|
41
41
|
eventType: EventTypes;
|
42
42
|
triggerType: TriggerTypes;
|
43
|
-
triggerMetadata:
|
44
|
-
actions: Array<
|
43
|
+
triggerMetadata: TriggerMetadata;
|
44
|
+
actions: Array<AutoModerationAction>;
|
45
45
|
enabled: boolean;
|
46
46
|
exemptRoles: Array<string>;
|
47
47
|
exemptChannels: Array<string>;
|
48
48
|
}
|
49
|
-
export interface
|
49
|
+
export interface TriggerMetadata {
|
50
50
|
keywordFilter: Array<string>;
|
51
51
|
regexPatterns: Array<string>;
|
52
52
|
presets: KeywordPresetTypes;
|
@@ -54,11 +54,11 @@ export interface JSONTriggerMetadata {
|
|
54
54
|
mentionTotalLimit: number;
|
55
55
|
mentionRaidProtection: boolean;
|
56
56
|
}
|
57
|
-
export interface
|
57
|
+
export interface AutoModerationAction {
|
58
58
|
type: ActionTypes;
|
59
|
-
metadata:
|
59
|
+
metadata: ActionMetadata;
|
60
60
|
}
|
61
|
-
export interface
|
61
|
+
export interface ActionMetadata {
|
62
62
|
channelId: string;
|
63
63
|
durationSeconds: number;
|
64
64
|
customMessage?: string;
|
@@ -67,8 +67,8 @@ export interface CreateAutoModerationRuleParams {
|
|
67
67
|
name: string;
|
68
68
|
eventType: EventTypes;
|
69
69
|
triggerType: TriggerTypes;
|
70
|
-
triggerMetadata?:
|
71
|
-
actions: Array<
|
70
|
+
triggerMetadata?: TriggerMetadata;
|
71
|
+
actions: Array<AutoModerationAction>;
|
72
72
|
enabled?: boolean;
|
73
73
|
exemptRoles?: Array<string>;
|
74
74
|
exemptChannels?: Array<string>;
|
@@ -77,8 +77,8 @@ export interface EditAutoModerationRuleParams {
|
|
77
77
|
name?: string;
|
78
78
|
eventType?: EventTypes;
|
79
79
|
triggerType?: TriggerTypes;
|
80
|
-
triggerMetadata?:
|
81
|
-
actions?: Array<
|
80
|
+
triggerMetadata?: TriggerMetadata;
|
81
|
+
actions?: Array<AutoModerationAction>;
|
82
82
|
enabled?: boolean;
|
83
83
|
exemptRoles?: Array<string>;
|
84
84
|
exemptChannels?: Array<string>;
|