disgroove 3.0.1-dev.b082a0c → 3.0.1-dev.b57a9f0

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.
@@ -28,6 +28,13 @@ class Messages {
28
28
  durationSecs: attachment.duration_secs,
29
29
  waveform: attachment.waveform,
30
30
  flags: attachment.flags,
31
+ clipParticipants: attachment.clip_participants?.map((user) => Users_1.Users.userFromRaw(user)),
32
+ clipCreatedAt: attachment.clip_created_at,
33
+ application: attachment.application !== undefined
34
+ ? attachment.application !== null
35
+ ? Applications_1.Applications.applicationFromRaw(attachment.application)
36
+ : null
37
+ : undefined,
31
38
  };
32
39
  }
33
40
  static attachmentToRaw(attachment) {
@@ -46,6 +53,13 @@ class Messages {
46
53
  duration_secs: attachment.durationSecs,
47
54
  waveform: attachment.waveform,
48
55
  flags: attachment.flags,
56
+ clip_participants: attachment.clipParticipants?.map((user) => Users_1.Users.userToRaw(user)),
57
+ clip_created_at: attachment.clipCreatedAt,
58
+ application: attachment.application !== undefined
59
+ ? attachment.application !== null
60
+ ? Applications_1.Applications.applicationToRaw(attachment.application)
61
+ : null
62
+ : undefined,
49
63
  };
50
64
  }
51
65
  static componentsFromRaw(components) {
@@ -109,6 +123,11 @@ class Messages {
109
123
  proxyURL: embed.image.proxy_url,
110
124
  height: embed.image.height,
111
125
  width: embed.image.width,
126
+ contentType: embed.image.content_type,
127
+ placeholder: embed.image.placeholder,
128
+ placeholderVersion: embed.image.placeholder_version,
129
+ description: embed.image.description,
130
+ flags: embed.image.flags,
112
131
  }
113
132
  : undefined,
114
133
  thumbnail: embed.thumbnail !== undefined
@@ -119,16 +138,25 @@ class Messages {
119
138
  width: embed.thumbnail.width,
120
139
  }
121
140
  : undefined,
122
- video: {
123
- url: embed.video?.url,
124
- proxyURL: embed.video?.proxy_url,
125
- height: embed.video?.height,
126
- width: embed.video?.width,
127
- },
128
- provider: {
129
- name: embed.provider?.name,
130
- url: embed.provider?.url,
131
- },
141
+ video: embed.video !== undefined
142
+ ? {
143
+ url: embed.video.url,
144
+ proxyURL: embed.video.proxy_url,
145
+ height: embed.video.height,
146
+ width: embed.video.width,
147
+ contentType: embed.video.content_type,
148
+ placeholder: embed.video.placeholder,
149
+ placeholderVersion: embed.video.placeholder_version,
150
+ description: embed.video.description,
151
+ flags: embed.video.flags,
152
+ }
153
+ : undefined,
154
+ provider: embed.provider !== undefined
155
+ ? {
156
+ name: embed.provider.name,
157
+ url: embed.provider.url,
158
+ }
159
+ : undefined,
132
160
  author: embed.author !== undefined
133
161
  ? {
134
162
  name: embed.author.name,
@@ -161,6 +189,11 @@ class Messages {
161
189
  proxy_url: embed.image.proxyURL,
162
190
  height: embed.image.height,
163
191
  width: embed.image.width,
192
+ content_type: embed.image.contentType,
193
+ placeholder: embed.image.placeholder,
194
+ placeholder_version: embed.image.placeholderVersion,
195
+ description: embed.image.description,
196
+ flags: embed.image.flags,
164
197
  }
165
198
  : undefined,
166
199
  thumbnail: embed.thumbnail !== undefined
@@ -171,16 +204,25 @@ class Messages {
171
204
  width: embed.thumbnail.width,
172
205
  }
173
206
  : undefined,
174
- video: {
175
- url: embed.video?.url,
176
- proxy_url: embed.video?.proxyURL,
177
- height: embed.video?.height,
178
- width: embed.video?.width,
179
- },
180
- provider: {
181
- name: embed.provider?.name,
182
- url: embed.provider?.url,
183
- },
207
+ video: embed.video !== undefined
208
+ ? {
209
+ url: embed.video.url,
210
+ proxy_url: embed.video.proxyURL,
211
+ height: embed.video.height,
212
+ width: embed.video.width,
213
+ content_type: embed.video.contentType,
214
+ placeholder: embed.video.placeholder,
215
+ placeholder_version: embed.video.placeholderVersion,
216
+ description: embed.video.description,
217
+ flags: embed.video.flags,
218
+ }
219
+ : undefined,
220
+ provider: embed.provider !== undefined
221
+ ? {
222
+ name: embed.provider.name,
223
+ url: embed.provider.url,
224
+ }
225
+ : undefined,
184
226
  author: embed.author !== undefined
185
227
  ? {
186
228
  name: embed.author.name,
@@ -23,6 +23,7 @@ export interface RawApplication {
23
23
  slug?: string;
24
24
  cover_image?: string;
25
25
  flags?: ApplicationFlags;
26
+ flags_new?: string;
26
27
  approximate_guild_count?: number;
27
28
  approximate_user_install_count?: number;
28
29
  approximate_user_authorization_count?: number;
@@ -30,7 +31,7 @@ export interface RawApplication {
30
31
  interactions_endpoint_url?: string;
31
32
  role_connections_verification_url?: string;
32
33
  event_webhooks_url?: string | null;
33
- event_webhooks_status: ApplicationEventWebhookStatus;
34
+ event_webhooks_status?: ApplicationEventWebhookStatus;
34
35
  event_webhooks_types?: Array<string>;
35
36
  tags?: Array<string>;
36
37
  install_params?: RawInstallParams;
@@ -81,6 +82,7 @@ export interface Application {
81
82
  slug?: string;
82
83
  coverImage?: string;
83
84
  flags?: ApplicationFlags;
85
+ flagsNew?: string;
84
86
  approximateGuildCount?: number;
85
87
  approximateUserInstallCount?: number;
86
88
  approximateUserAuthorizationCount?: number;
@@ -88,7 +90,7 @@ export interface Application {
88
90
  interactionsEndpointURL?: string;
89
91
  roleConnectionsVerificationURL?: string;
90
92
  eventWebhooksURL?: string | null;
91
- eventWebhooksStatus: ApplicationEventWebhookStatus;
93
+ eventWebhooksStatus?: ApplicationEventWebhookStatus;
92
94
  eventWebhooksTypes?: Array<string>;
93
95
  tags?: Array<string>;
94
96
  installParams?: InstallParams;
@@ -42,6 +42,7 @@ export interface RawOptionalAuditLogEntryInfo {
42
42
  role_name: string;
43
43
  type: string;
44
44
  integration_type: string;
45
+ status: string;
45
46
  }
46
47
  /** https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure */
47
48
  export interface RawAuditLogChange {
@@ -84,6 +85,7 @@ export interface OptionalAuditLogEntryInfo {
84
85
  roleName: string;
85
86
  type: string;
86
87
  integrationType: string;
88
+ status: string;
87
89
  }
88
90
  /** https://discord.com/developers/docs/resources/audit-log#audit-log-change-object-audit-log-change-structure */
89
91
  export interface AuditLogChange {
@@ -1,4 +1,4 @@
1
- import type { ButtonStyles, ChannelTypes, ComponentTypes, SeparatorSpacing, TextInputStyles } from "../constants";
1
+ import type { ButtonStyles, ChannelTypes, ComponentTypes, SeparatorSpacing, TextInputStyles, UnfurledMediaItemFlags } from "../constants";
2
2
  import type { snowflake } from "./common";
3
3
  import type { RawEmoji, Emoji } from "./emoji";
4
4
  import type { RawResolvedData, ResolvedData } from "./interaction";
@@ -15,7 +15,7 @@ export interface RawButton {
15
15
  style: ButtonStyles;
16
16
  label?: string;
17
17
  emoji?: Pick<RawEmoji, "name" | "id" | "animated">;
18
- custom_id: string;
18
+ custom_id?: string;
19
19
  sku_id?: snowflake;
20
20
  url?: string;
21
21
  disabled?: boolean;
@@ -252,7 +252,10 @@ export interface RawUnfurledMediaItem {
252
252
  proxy_url?: string;
253
253
  height?: number | null;
254
254
  width?: number | null;
255
+ placeholder?: string;
256
+ placeholder_version?: number;
255
257
  content_type?: string;
258
+ flags?: UnfurledMediaItemFlags;
256
259
  attachment_id?: snowflake;
257
260
  }
258
261
  /** https://docs.discord.com/developers/components/reference#radio-group-structure */
@@ -328,7 +331,7 @@ export interface Button {
328
331
  style: ButtonStyles;
329
332
  label?: string;
330
333
  emoji?: Pick<Emoji, "name" | "id" | "animated">;
331
- customId: string;
334
+ customId?: string;
332
335
  skuId?: snowflake;
333
336
  url?: string;
334
337
  disabled?: boolean;
@@ -565,7 +568,10 @@ export interface UnfurledMediaItem {
565
568
  proxyURL?: string;
566
569
  height?: number | null;
567
570
  width?: number | null;
571
+ placeholder?: string;
572
+ placeholderVersion?: number;
568
573
  contentType?: string;
574
+ flags?: UnfurledMediaItemFlags;
569
575
  attachmentId?: snowflake;
570
576
  }
571
577
  /** https://docs.discord.com/developers/components/reference#radio-group-structure */
@@ -1,4 +1,4 @@
1
- import type { ActivityFlags, ActivityType, AnimationTypes, GatewayEvents, GatewayIntents, GatewayOPCodes, GuildMemberFlags, InviteTargetTypes, ReactionTypes, StatusTypes, TriggerTypes } from "../constants";
1
+ import type { ActivityFlags, ActivityType, AnimationTypes, ChannelTypes, GatewayEvents, GatewayIntents, GatewayOPCodes, GuildMemberFlags, InviteTargetTypes, ReactionTypes, StatusTypes, TriggerTypes } from "../constants";
2
2
  import type { RawApplication, Application } from "./application";
3
3
  import type { RawAutoModerationAction, AutoModerationAction } from "./auto-moderation";
4
4
  import type { RawChannel, RawThreadMember, Channel, ThreadMember } from "./channel";
@@ -54,6 +54,11 @@ export interface RawRequestGuildMembers {
54
54
  export interface RawRequestSoundboardSounds {
55
55
  guild_ids: Array<snowflake>;
56
56
  }
57
+ /** https://discord.com/developers/docs/topics/gateway-events#request-channel-info */
58
+ export interface RawRequestChannelInfo {
59
+ guild_id: snowflake;
60
+ fields: Array<string>;
61
+ }
57
62
  /** https://discord.com/developers/docs/events/gateway-events#update-presence-gateway-presence-update-structure */
58
63
  export interface RawGatewayPresenceUpdate {
59
64
  since: number | null;
@@ -92,6 +97,29 @@ export interface RawAutoModerationActionExecutionEvent {
92
97
  matched_keyword: string | null;
93
98
  matched_content: string | null;
94
99
  }
100
+ /** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-structure */
101
+ export interface RawChannelInfoEvent {
102
+ guild_id: snowflake;
103
+ channels: Array<RawChannelInfoChannel>;
104
+ }
105
+ /** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-channel-structure */
106
+ export interface RawChannelInfoChannel {
107
+ id: snowflake;
108
+ status?: string | null;
109
+ voice_start_time?: number | null;
110
+ }
111
+ /** https://docs.discord.com/developers/events/gateway-events#voice-channel-status-update */
112
+ export interface RawVoiceChannelStatusUpdateEvent {
113
+ id: snowflake;
114
+ guild_id: snowflake;
115
+ status: string | null;
116
+ }
117
+ /** https://docs.discord.com/developers/events/gateway-events#voice-channel-start-time-update */
118
+ export interface RawVoiceChannelStartTimeUpdateEvent {
119
+ id: snowflake;
120
+ guild_id: snowflake;
121
+ voice_start_time?: number | null;
122
+ }
95
123
  /** https://discord.com/developers/docs/events/gateway-events#thread-list-sync-thread-list-sync-event-fields */
96
124
  export interface RawThreadListSyncEvent {
97
125
  guild_id: snowflake;
@@ -281,6 +309,7 @@ export interface RawMessageCreateEventExtra {
281
309
  guild_id?: snowflake;
282
310
  member?: RawGuildMember;
283
311
  mentions: Array<RawUser>;
312
+ channel_type?: ChannelTypes;
284
313
  }
285
314
  /** https://discord.com/developers/docs/events/gateway-events#message-delete-message-delete-event-fields */
286
315
  export interface RawMessageDeleteEvent {
@@ -495,6 +524,11 @@ export interface RequestGuildMembers {
495
524
  export interface RequestSoundboardSounds {
496
525
  guildIds: Array<snowflake>;
497
526
  }
527
+ /** https://discord.com/developers/docs/topics/gateway-events#request-channel-info */
528
+ export interface RequestChannelInfo {
529
+ guildId: snowflake;
530
+ fields: Array<string>;
531
+ }
498
532
  /** https://discord.com/developers/docs/events/gateway-events#update-presence-gateway-presence-update-structure */
499
533
  export interface GatewayPresenceUpdate {
500
534
  since: number | null;
@@ -533,6 +567,29 @@ export interface AutoModerationActionExecutionEvent {
533
567
  matchedKeyword: string | null;
534
568
  matchedContent: string | null;
535
569
  }
570
+ /** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-structure */
571
+ export interface ChannelInfoEvent {
572
+ guildId: snowflake;
573
+ channels: Array<RawChannelInfoChannel>;
574
+ }
575
+ /** https://docs.discord.com/developers/events/gateway-events#channel-info-channel-info-channel-structure */
576
+ export interface ChannelInfoChannel {
577
+ id: snowflake;
578
+ status?: string | null;
579
+ voiceStartTime?: number | null;
580
+ }
581
+ /** https://docs.discord.com/developers/events/gateway-events#voice-channel-status-update */
582
+ export interface VoiceChannelStatusUpdateEvent {
583
+ id: snowflake;
584
+ guildId: snowflake;
585
+ status: string | null;
586
+ }
587
+ /** https://docs.discord.com/developers/events/gateway-events#voice-channel-start-time-update */
588
+ export interface VoiceChannelStartTimeUpdateEvent {
589
+ id: snowflake;
590
+ guildId: snowflake;
591
+ voiceStartTime?: number | null;
592
+ }
536
593
  /** https://discord.com/developers/docs/events/gateway-events#thread-list-sync-thread-list-sync-event-fields */
537
594
  export interface ThreadListSyncEvent {
538
595
  guildId: snowflake;
@@ -722,6 +779,7 @@ export interface MessageCreateEventExtra {
722
779
  guildId?: snowflake;
723
780
  member?: GuildMember;
724
781
  mentions: Array<User>;
782
+ channelType?: ChannelTypes;
725
783
  }
726
784
  /** https://discord.com/developers/docs/events/gateway-events#message-delete-message-delete-event-fields */
727
785
  export interface MessageDeleteEvent {
@@ -1,6 +1,7 @@
1
- import type { LobbyMemberFlags } from "../constants";
1
+ import type { LobbyMemberFlags, MessageFlags, MessageTypes } from "../constants";
2
2
  import type { RawChannel } from "./channel";
3
3
  import type { snowflake } from "./common";
4
+ import { RawUser, User } from "./user";
4
5
  /** https://discord.com/developers/docs/resources/lobby#lobby-object */
5
6
  export interface RawLobby {
6
7
  id: snowflake;
@@ -15,6 +16,23 @@ export interface RawLobbyMember {
15
16
  metadata?: Record<string, string> | null;
16
17
  flags?: LobbyMemberFlags;
17
18
  }
19
+ /** https://docs.discord.com/developers/resources/lobby#lobby-message-object */
20
+ export interface RawLobbyMessage {
21
+ id: snowflake;
22
+ type: MessageTypes;
23
+ content: string;
24
+ lobby_id: snowflake;
25
+ channel_id: snowflake;
26
+ author: RawUser;
27
+ metadata?: Record<string, string> | null;
28
+ moderation_metadata?: Record<string, string> | null;
29
+ flags: MessageFlags;
30
+ application_id: snowflake;
31
+ }
32
+ /** https://docs.discord.com/developers/resources/lobby#create-lobby-channel-invite-for-user#lobby-invite-object */
33
+ export interface RawLobbyInvite {
34
+ code: string;
35
+ }
18
36
  /** https://discord.com/developers/docs/resources/lobby#lobby-object */
19
37
  export interface Lobby {
20
38
  id: snowflake;
@@ -29,3 +47,20 @@ export interface LobbyMember {
29
47
  metadata?: Record<string, string> | null;
30
48
  flags?: LobbyMemberFlags;
31
49
  }
50
+ /** https://docs.discord.com/developers/resources/lobby#lobby-message-object */
51
+ export interface LobbyMessage {
52
+ id: snowflake;
53
+ type: MessageTypes;
54
+ content: string;
55
+ lobbyId: snowflake;
56
+ channelId: snowflake;
57
+ author: User;
58
+ metadata?: Record<string, string> | null;
59
+ moderationMetadata?: Record<string, string> | null;
60
+ flags: MessageFlags;
61
+ applicationId: snowflake;
62
+ }
63
+ /** https://docs.discord.com/developers/resources/lobby#create-lobby-channel-invite-for-user#lobby-invite-object */
64
+ export interface LobbyInvite {
65
+ code: string;
66
+ }
@@ -1,4 +1,4 @@
1
- import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes, EmbedTypes, BaseThemeTypes } from "../constants";
1
+ import type { MessageTypes, MessageFlags, MessageActivityTypes, InteractionType, ApplicationIntegrationTypes, MessageReferenceTypes, AttachmentFlags, ChannelTypes, AllowedMentionTypes, EmbedTypes, BaseThemeTypes, EmbedFlags, EmbedMediaFlags } from "../constants";
2
2
  import type { Application, RawApplication } from "./application";
3
3
  import type { Channel, RawChannel } from "./channel";
4
4
  import type { snowflake, timestamp } from "./common";
@@ -109,6 +109,7 @@ export interface RawEmbed {
109
109
  provider?: RawEmbedProvider;
110
110
  author?: RawEmbedAuthor;
111
111
  fields?: Array<RawEmbedField>;
112
+ flags?: EmbedFlags;
112
113
  }
113
114
  /** https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure */
114
115
  export interface RawEmbedThumbnail {
@@ -123,6 +124,11 @@ export interface RawEmbedVideo {
123
124
  proxy_url?: string;
124
125
  height?: number;
125
126
  width?: number;
127
+ content_type?: string;
128
+ placeholder?: string;
129
+ placeholder_version?: number;
130
+ description?: string;
131
+ flags?: EmbedMediaFlags;
126
132
  }
127
133
  /** https://discord.com/developers/docs/resources/message#embed-object-embed-image-structure */
128
134
  export interface RawEmbedImage {
@@ -130,6 +136,11 @@ export interface RawEmbedImage {
130
136
  proxy_url?: string;
131
137
  height?: number;
132
138
  width?: number;
139
+ content_type?: string;
140
+ placeholder?: string;
141
+ placeholder_version?: number;
142
+ description?: string;
143
+ flags?: EmbedMediaFlags;
133
144
  }
134
145
  /** https://discord.com/developers/docs/resources/message#embed-object-embed-provider-structure */
135
146
  export interface RawEmbedProvider {
@@ -182,6 +193,9 @@ export interface RawAttachment {
182
193
  duration_secs?: number;
183
194
  waveform?: boolean;
184
195
  flags?: AttachmentFlags;
196
+ clip_participants?: Array<RawUser>;
197
+ clip_created_at?: timestamp;
198
+ application?: RawApplication | null;
185
199
  }
186
200
  /** https://discord.com/developers/docs/resources/message#channel-mention-object-channel-mention-structure */
187
201
  export interface RawChannelMention {
@@ -317,6 +331,7 @@ export interface Embed {
317
331
  provider?: EmbedProvider;
318
332
  author?: EmbedAuthor;
319
333
  fields?: Array<EmbedField>;
334
+ flags?: EmbedFlags;
320
335
  }
321
336
  /** https://discord.com/developers/docs/resources/message#embed-object-embed-thumbnail-structure */
322
337
  export interface EmbedThumbnail {
@@ -331,6 +346,11 @@ export interface EmbedVideo {
331
346
  proxyURL?: string;
332
347
  height?: number;
333
348
  width?: number;
349
+ contentType?: string;
350
+ placeholder?: string;
351
+ placeholderVersion?: number;
352
+ description?: string;
353
+ flags?: EmbedMediaFlags;
334
354
  }
335
355
  /** https://discord.com/developers/docs/resources/message#embed-object-embed-image-structure */
336
356
  export interface EmbedImage {
@@ -338,6 +358,11 @@ export interface EmbedImage {
338
358
  proxyURL?: string;
339
359
  height?: number;
340
360
  width?: number;
361
+ contentType?: string;
362
+ placeholder?: string;
363
+ placeholderVersion?: number;
364
+ description?: string;
365
+ flags?: EmbedMediaFlags;
341
366
  }
342
367
  /** https://discord.com/developers/docs/resources/message#embed-object-embed-provider-structure */
343
368
  export interface EmbedProvider {
@@ -390,6 +415,9 @@ export interface Attachment {
390
415
  durationSecs?: number;
391
416
  waveform?: boolean;
392
417
  flags?: AttachmentFlags;
418
+ clipParticipants?: Array<User>;
419
+ clipCreatedAt?: timestamp;
420
+ application?: Application | null;
393
421
  }
394
422
  /** https://discord.com/developers/docs/resources/message#channel-mention-object-channel-mention-structure */
395
423
  export interface ChannelMention {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disgroove",
3
- "version": "3.0.1-dev.b082a0c",
3
+ "version": "3.0.1-dev.b57a9f0",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "wrapper"
20
20
  ],
21
- "author": "XenKys",
21
+ "author": "Sergio Gotuzzo",
22
22
  "license": "MIT",
23
23
  "bugs": {
24
24
  "url": "https://github.com/sergiogotuzzo/disgroove/issues"
@@ -28,7 +28,8 @@
28
28
  "@types/node": "^22.19.3",
29
29
  "@types/ws": "^8.18.1",
30
30
  "typescript": "^5.9.3",
31
- "undici-types": "^7.18.2"
31
+ "undici-types": "^7.18.2",
32
+ "@types/bun": "latest"
32
33
  },
33
34
  "dependencies": {
34
35
  "ws": "^8.19.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disgroove",
3
- "version": "3.0.1-dev.b082a0c",
3
+ "version": "3.0.1-dev.b57a9f0",
4
4
  "description": "A module to interface with Discord",
5
5
  "main": "./dist/lib/index.js",
6
6
  "types": "./dist/lib/index.d.ts",
@@ -18,7 +18,7 @@
18
18
  "rest",
19
19
  "wrapper"
20
20
  ],
21
- "author": "XenKys",
21
+ "author": "Sergio Gotuzzo",
22
22
  "license": "MIT",
23
23
  "bugs": {
24
24
  "url": "https://github.com/sergiogotuzzo/disgroove/issues"
@@ -28,9 +28,10 @@
28
28
  "@types/node": "^22.19.3",
29
29
  "@types/ws": "^8.18.1",
30
30
  "typescript": "^5.9.3",
31
- "undici-types": "^7.18.2"
31
+ "undici-types": "^7.18.2",
32
+ "@types/bun": "latest"
32
33
  },
33
34
  "dependencies": {
34
35
  "ws": "^8.19.0"
35
36
  }
36
- }
37
+ }