disgroove 2.2.7-dev.3f5b5fb → 2.2.7-dev.4784073

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.
@@ -340,6 +340,11 @@ class Client extends node_events_1.default {
340
340
  name: options.name,
341
341
  permissions: options.permissions,
342
342
  color: options.color,
343
+ colors: {
344
+ primary_color: options.colors?.primaryColor,
345
+ secondary_color: options.colors?.secondaryColor,
346
+ tertiary_color: options.colors?.tertiaryColor,
347
+ },
343
348
  hoist: options.hoist,
344
349
  icon: options.icon,
345
350
  unicode_emoji: options.unicodeEmoji,
@@ -1167,6 +1172,11 @@ class Client extends node_events_1.default {
1167
1172
  name: options?.name,
1168
1173
  permissions: options?.permissions,
1169
1174
  color: options?.color,
1175
+ colors: {
1176
+ primary_color: options?.colors?.primaryColor,
1177
+ secondary_color: options?.colors?.secondaryColor,
1178
+ tertiary_color: options?.colors?.tertiaryColor,
1179
+ },
1170
1180
  hoist: options?.hoist,
1171
1181
  icon: options?.icon,
1172
1182
  unicode_emoji: options?.unicodeEmoji,
@@ -1179,6 +1179,7 @@ export declare enum JSONErrorCodes {
1179
1179
  MessageBlockedByHarmfulLinksFilter = 240000,
1180
1180
  CannotEnableOnboardingRequirementsAreNotMet = 350000,
1181
1181
  CannotUpdateOnboardingWhileBelowRequirements = 350001,
1182
+ AccessToFileUploadsHasBeenLimitedForThisGuild = 400001,
1182
1183
  FailedToBanUsers = 500000,
1183
1184
  PollVotingBlocked = 520000,
1184
1185
  PollExpired = 520001,
@@ -1269,6 +1269,7 @@ var JSONErrorCodes;
1269
1269
  JSONErrorCodes[JSONErrorCodes["MessageBlockedByHarmfulLinksFilter"] = 240000] = "MessageBlockedByHarmfulLinksFilter";
1270
1270
  JSONErrorCodes[JSONErrorCodes["CannotEnableOnboardingRequirementsAreNotMet"] = 350000] = "CannotEnableOnboardingRequirementsAreNotMet";
1271
1271
  JSONErrorCodes[JSONErrorCodes["CannotUpdateOnboardingWhileBelowRequirements"] = 350001] = "CannotUpdateOnboardingWhileBelowRequirements";
1272
+ JSONErrorCodes[JSONErrorCodes["AccessToFileUploadsHasBeenLimitedForThisGuild"] = 400001] = "AccessToFileUploadsHasBeenLimitedForThisGuild";
1272
1273
  JSONErrorCodes[JSONErrorCodes["FailedToBanUsers"] = 500000] = "FailedToBanUsers";
1273
1274
  JSONErrorCodes[JSONErrorCodes["PollVotingBlocked"] = 520000] = "PollVotingBlocked";
1274
1275
  JSONErrorCodes[JSONErrorCodes["PollExpired"] = 520001] = "PollExpired";
@@ -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) {
@@ -10,7 +10,7 @@ class Roles {
10
10
  colors: {
11
11
  primaryColor: role.colors.primary_color,
12
12
  secondaryColor: role.colors.secondary_color,
13
- tertiaryColors: role.colors.tertiary_colors,
13
+ tertiaryColor: role.colors.tertiary_color,
14
14
  },
15
15
  hoist: role.hoist,
16
16
  icon: role.icon,
@@ -40,7 +40,7 @@ class Roles {
40
40
  colors: {
41
41
  primary_color: role.colors.primaryColor,
42
42
  secondary_color: role.colors.secondaryColor,
43
- tertiary_colors: role.colors.tertiaryColors,
43
+ tertiary_color: role.colors.tertiaryColor,
44
44
  },
45
45
  hoist: role.hoist,
46
46
  icon: role.icon,
@@ -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>;
@@ -29,7 +29,7 @@ export interface RawRoleTags {
29
29
  export interface RawRoleColors {
30
30
  primary_color: number;
31
31
  secondary_color: number | null;
32
- tertiary_colors: number | null;
32
+ tertiary_color: number | null;
33
33
  }
34
34
  export interface Role {
35
35
  id: snowflake;
@@ -57,5 +57,5 @@ export interface RoleTags {
57
57
  export interface RoleColors {
58
58
  primaryColor: number;
59
59
  secondaryColor: number | null;
60
- tertiaryColors: number | null;
60
+ tertiaryColor: number | null;
61
61
  }
@@ -1,4 +1,4 @@
1
- import { GuildNavigationTypes, TimestampStyles } from "../constants";
1
+ import { GuildNavigationTypes, type TimestampStyles } from "../constants";
2
2
  import type { snowflake } from "../types/common";
3
3
  /** https://discord.com/developers/docs/reference#message-formatting-formats */
4
4
  export declare function userMention(userID: snowflake): string;
@@ -52,6 +52,6 @@ function email(username, domain) {
52
52
  exports.email = email;
53
53
  /** https://discord.com/developers/docs/reference#message-formatting-formats */
54
54
  function phoneNumber(number) {
55
- return `<+${phoneNumber}>`;
55
+ return `<+${number}>`;
56
56
  }
57
57
  exports.phoneNumber = phoneNumber;
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.4784073",
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.4784073",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",