disgroove 2.2.7-dev.3f5b5fb → 2.2.7-dev.5357ecd

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.
@@ -98,8 +98,35 @@ class Interactions {
98
98
  };
99
99
  case constants_1.ComponentTypes.TextDisplay:
100
100
  return Components_1.Components.textDisplayFromRaw(component);
101
- case constants_1.ComponentTypes.Label:
102
- return Components_1.Components.labelFromRaw(component);
101
+ case constants_1.ComponentTypes.Label: {
102
+ let c;
103
+ switch (component.component.type) {
104
+ case constants_1.ComponentTypes.StringSelect:
105
+ c = {
106
+ type: component.component.type,
107
+ componentType: component.component.component_type,
108
+ id: component.component.id,
109
+ customID: component.component.custom_id,
110
+ values: component.component.values,
111
+ };
112
+ break;
113
+ case constants_1.ComponentTypes.TextInput:
114
+ c = {
115
+ type: component.component.type,
116
+ id: component.component.id,
117
+ customID: component.component.custom_id,
118
+ value: component.component.value,
119
+ };
120
+ break;
121
+ }
122
+ return {
123
+ type: component.type,
124
+ id: component.id,
125
+ label: component.label,
126
+ description: component.description,
127
+ component: c,
128
+ };
129
+ }
103
130
  }
104
131
  }),
105
132
  }
@@ -136,6 +163,7 @@ class Interactions {
136
163
  "1": interaction.authorizing_integration_owners[1],
137
164
  },
138
165
  context: interaction.context,
166
+ attachmentSizeLimit: interaction.attachment_size_limit,
139
167
  };
140
168
  }
141
169
  static interactionMetadataFromRaw(interactionMetadata) {
@@ -216,8 +244,35 @@ class Interactions {
216
244
  };
217
245
  case constants_1.ComponentTypes.TextDisplay:
218
246
  return Components_1.Components.textDisplayToRaw(component);
219
- case constants_1.ComponentTypes.Label:
220
- return Components_1.Components.labelToRaw(component);
247
+ case constants_1.ComponentTypes.Label: {
248
+ let c;
249
+ switch (component.component.type) {
250
+ case constants_1.ComponentTypes.StringSelect:
251
+ c = {
252
+ type: component.component.type,
253
+ component_type: component.component.componentType,
254
+ id: component.component.id,
255
+ custom_id: component.component.customID,
256
+ values: component.component.values,
257
+ };
258
+ break;
259
+ case constants_1.ComponentTypes.TextInput:
260
+ c = {
261
+ type: component.component.type,
262
+ id: component.component.id,
263
+ custom_id: component.component.customID,
264
+ value: component.component.value,
265
+ };
266
+ break;
267
+ }
268
+ return {
269
+ type: component.type,
270
+ id: component.id,
271
+ label: component.label,
272
+ description: component.description,
273
+ component: c,
274
+ };
275
+ }
221
276
  }
222
277
  }),
223
278
  }
@@ -254,6 +309,7 @@ class Interactions {
254
309
  "1": interaction.authorizingIntegrationOwners[1],
255
310
  },
256
311
  context: interaction.context,
312
+ attachment_size_limit: interaction.attachmentSizeLimit,
257
313
  };
258
314
  }
259
315
  static resolvedDataFromRaw(resolvedData) {
@@ -93,13 +93,14 @@ export interface RawGuildMember {
93
93
  banner?: string | null;
94
94
  roles: Array<snowflake>;
95
95
  joined_at: timestamp | null;
96
- premium_since?: number | null;
96
+ premium_since?: timestamp | null;
97
97
  deaf: boolean;
98
98
  mute: boolean;
99
99
  flags: GuildMemberFlags;
100
100
  pending?: boolean;
101
101
  permissions?: string;
102
- communication_disabled_until?: number | null;
102
+ communication_disabled_until?: timestamp | null;
103
+ unusual_dm_activity_until?: timestamp | null;
103
104
  avatar_decoration_data?: RawAvatarDecorationData | null;
104
105
  }
105
106
  /** https://discord.com/developers/docs/resources/guild#integration-object-integration-structure */
@@ -269,14 +270,15 @@ export interface GuildMember {
269
270
  avatar?: string | null;
270
271
  banner?: string | null;
271
272
  roles: Array<snowflake>;
272
- joinedAt: string | null;
273
- premiumSince?: number | null;
273
+ joinedAt: timestamp | null;
274
+ premiumSince?: timestamp | null;
274
275
  deaf: boolean;
275
276
  mute: boolean;
276
277
  flags: GuildMemberFlags;
277
278
  pending?: boolean;
278
279
  permissions?: string;
279
- communicationDisabledUntil?: number | null;
280
+ communicationDisabledUntil?: timestamp | null;
281
+ unusualDMActivityUntil?: timestamp | null;
280
282
  avatarDecorationData?: AvatarDecorationData | null;
281
283
  }
282
284
  export interface Integration {
@@ -33,6 +33,7 @@ export interface RawInteraction {
33
33
  entitlements: Array<RawEntitlement>;
34
34
  authorizing_integration_owners: Record<ApplicationIntegrationTypes, string>;
35
35
  context?: InteractionContextTypes;
36
+ attachment_size_limit: number;
36
37
  }
37
38
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-application-command-data-structure */
38
39
  export interface RawApplicationCommandData {
@@ -57,7 +58,9 @@ export interface RawModalSubmitData {
57
58
  components: Array<{
58
59
  type: ComponentTypes.ActionRow;
59
60
  components: Array<RawStringSelectInteractionResponse | RawTextInputInteractionResponse>;
60
- } | RawTextDisplay | RawLabel>;
61
+ } | RawTextDisplay | (Omit<RawLabel, "component"> & {
62
+ component: RawStringSelectInteractionResponse | RawTextInputInteractionResponse;
63
+ })>;
61
64
  }
62
65
  /** https://discord.com/developers/docs/interactions/receiving-and-responding#interaction-object-resolved-data-structure */
63
66
  export interface RawResolvedData {
@@ -150,6 +153,7 @@ export interface Interaction {
150
153
  entitlements: Array<Entitlement>;
151
154
  authorizingIntegrationOwners: Record<ApplicationIntegrationTypes, string>;
152
155
  context?: InteractionContextTypes;
156
+ attachmentSizeLimit: number;
153
157
  }
154
158
  export interface ApplicationCommandData {
155
159
  id: snowflake;
@@ -171,7 +175,9 @@ export interface ModalSubmitData {
171
175
  components: Array<{
172
176
  type: ComponentTypes.ActionRow;
173
177
  components: Array<StringSelectInteractionResponse | TextInputInteractionResponse>;
174
- } | TextDisplay | Label>;
178
+ } | TextDisplay | (Omit<Label, "component"> & {
179
+ component: StringSelectInteractionResponse | TextInputInteractionResponse;
180
+ })>;
175
181
  }
176
182
  export interface ResolvedData {
177
183
  users?: Record<snowflake, User>;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disgroove",
3
- "version": "2.2.7-dev.3f5b5fb",
3
+ "version": "2.2.7-dev.5357ecd",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disgroove",
3
- "version": "2.2.7-dev.3f5b5fb",
3
+ "version": "2.2.7-dev.5357ecd",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",