disgroove 2.2.3-dev.4f98e3d → 2.2.3-dev.e049f9f

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.
@@ -2,7 +2,7 @@
2
2
  import { GatewayIntents, type OAuth2Scopes, type ActionTypes, type ImageWidgetStyleOptions, type MFALevel, type ReactionTypes, type ApplicationCommandTypes, type EventTypes, type TriggerTypes, type ChannelTypes, type VideoQualityModes, type SortOrderTypes, type ForumLayoutTypes, type InviteTargetTypes, type VerificationLevel, type DefaultMessageNotificationLevel, type ExplicitContentFilterLevel, type SystemChannelFlags, type ApplicationFlags, type ApplicationIntegrationTypes, type ChannelFlags, type GuildFeatures, type GuildScheduledEventEntityTypes, type GuildScheduledEventPrivacyLevel, type GuildScheduledEventStatus, type MessageFlags, type OnboardingMode, type PrivacyLevel, type GuildMemberFlags, type InteractionContextTypes } from "./constants";
3
3
  import { RequestManager, type File } from "./rest";
4
4
  import EventEmitter from "node:events";
5
- import { ShardManager } from "./gateway";
5
+ import { Shard } from "./gateway";
6
6
  import type { Application, ApplicationIntegrationTypeConfiguration, InstallParams } from "./types/application";
7
7
  import type { ApplicationCommand, GuildApplicationCommandPermissions, ApplicationCommandOption, ApplicationCommandPermission } from "./types/application-command";
8
8
  import type { ApplicationRoleConnectionMetadata } from "./types/application-role-connection-metadata";
@@ -50,7 +50,7 @@ export declare class Client extends EventEmitter {
50
50
  intents: GatewayIntents | number;
51
51
  shardsCount: number | "auto";
52
52
  auth: "Bot" | "Bearer";
53
- shards: ShardManager;
53
+ shards: Map<number, Shard>;
54
54
  rest: RequestManager;
55
55
  guildShardMap: Record<string, number>;
56
56
  user: User | null;
@@ -799,7 +799,7 @@ export declare class Client extends EventEmitter {
799
799
  after?: snowflake;
800
800
  limit?: number;
801
801
  withCounts?: boolean;
802
- }): Promise<Array<Pick<Guild, "id" | "name" | "icon" | "owner" | "permissions" | "features" | "approximateMemberCount" | "approximatePresenceCount">>>;
802
+ }): Promise<Array<Pick<Guild, "id" | "name" | "icon" | "banner" | "owner" | "permissions" | "features" | "approximateMemberCount" | "approximatePresenceCount">>>;
803
803
  /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command */
804
804
  getGuildApplicationCommand(applicationID: snowflake, guildID: snowflake, commandID: snowflake): Promise<ApplicationCommand>;
805
805
  /** https://discord.com/developers/docs/interactions/application-commands#get-guild-application-commands */
@@ -1023,9 +1023,9 @@ export declare interface Client extends EventEmitter {
1023
1023
  removeListener<K extends keyof ClientEvents>(eventName: K, listener: (...args: ClientEvents[K]) => void): this;
1024
1024
  }
1025
1025
  export interface ClientEvents {
1026
- dispatch: [packet: RawPayload];
1027
- heartbeatACK: [];
1028
- hello: [interval: number];
1026
+ dispatch: [packet: RawPayload, shard: number];
1027
+ heartbeatACK: [shard: number];
1028
+ hello: [interval: number, shard: number];
1029
1029
  ready: [];
1030
1030
  resumed: [];
1031
1031
  reconnect: [];
@@ -40,7 +40,7 @@ class Client extends node_events_1.default {
40
40
  : 0;
41
41
  this.shardsCount = options?.shardsCount ?? "auto";
42
42
  this.auth = options?.auth ?? "Bot";
43
- this.shards = new gateway_1.ShardManager();
43
+ this.shards = new Map();
44
44
  this.rest = new rest_1.RequestManager(token, this.auth);
45
45
  this.guildShardMap = {};
46
46
  this.user = null;
@@ -158,7 +158,7 @@ class Client extends node_events_1.default {
158
158
  : this.shardsCount;
159
159
  for (let i = 0; i < this.shardsCount; i++)
160
160
  this.shards.set(i, new gateway_1.Shard(i, this));
161
- this.shards.connect();
161
+ this.shards.forEach((shard) => shard.connect());
162
162
  }
163
163
  /** https://discord.com/developers/docs/monetization/entitlements#consume-an-entitlement */
164
164
  consumeEntitlement(applicationID, entitlementID) {
@@ -822,7 +822,7 @@ class Client extends node_events_1.default {
822
822
  });
823
823
  }
824
824
  disconnect() {
825
- this.shards.disconnect();
825
+ this.shards.forEach((shard) => shard.disconnect());
826
826
  }
827
827
  /** https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule */
828
828
  async editAutoModerationRule(guildID, autoModerationRuleID, options, reason) {
@@ -1675,6 +1675,7 @@ class Client extends node_events_1.default {
1675
1675
  return response.map((guild) => ({
1676
1676
  id: guild.id,
1677
1677
  name: guild.name,
1678
+ banner: guild.banner,
1678
1679
  icon: guild.icon,
1679
1680
  owner: guild.owner,
1680
1681
  permissions: guild.permissions,
@@ -2118,7 +2119,7 @@ class Client extends node_events_1.default {
2118
2119
  }
2119
2120
  /** https://discord.com/developers/docs/resources/channel#leave-thread */
2120
2121
  leaveThread(channelID) {
2121
- this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.threadMembers(channelID));
2122
+ this.rest.request(rest_1.RESTMethods.Delete, rest_1.Endpoints.threadMembers(channelID, "@me"));
2122
2123
  }
2123
2124
  /** https://discord.com/developers/docs/topics/gateway-events#update-voice-state */
2124
2125
  leaveVoiceChannel(guildID) {
@@ -2173,7 +2174,7 @@ class Client extends node_events_1.default {
2173
2174
  }
2174
2175
  /** https://discord.com/developers/docs/topics/gateway-events#update-presence */
2175
2176
  setPresence(options) {
2176
- this.shards.updatePresence(options);
2177
+ this.shards.forEach((shard) => shard.updatePresence(options));
2177
2178
  }
2178
2179
  /** https://discord.com/developers/docs/resources/guild-template#sync-guild-template */
2179
2180
  async syncGuildTemplate(guildID, code) {
@@ -353,6 +353,11 @@ export declare enum MessageFlags {
353
353
  SuppressNotifications = 4096,
354
354
  IsVoiceMessage = 8192
355
355
  }
356
+ /** https://discord.com/developers/docs/resources/channel#message-object-message-reference-types */
357
+ export declare enum MessageReferenceTypes {
358
+ Default = 0,
359
+ Forward = 1
360
+ }
356
361
  /** https://discord.com/developers/docs/resources/channel#attachment-object-attachment-flags */
357
362
  export declare enum AttachmentFlags {
358
363
  IsRemix = 4
@@ -569,6 +574,7 @@ export declare enum Services {
569
574
  Playstation = "playstation",
570
575
  Reddit = "reddit",
571
576
  RiotGames = "riotgames",
577
+ Roblox = "roblox",
572
578
  Spotify = "spotify",
573
579
  Skype = "skype",
574
580
  Steam = "steam",
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.InviteTypes = exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityTypes = exports.GuildScheduledEventPrivacyLevel = exports.ImageWidgetStyleOptions = exports.PromptTypes = exports.OnboardingMode = exports.IntegrationExpireBehaviors = exports.GuildMemberFlags = exports.MutableGuildFeatures = exports.GuildFeatures = exports.SystemChannelFlags = exports.PremiumTier = exports.GuildNSFWLevel = exports.VerificationLevel = exports.MFALevel = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = exports.ApplicationIntegrationTypes = exports.TextInputStyles = exports.ButtonStyles = exports.InteractionCallbackType = exports.ComponentTypes = exports.InteractionContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.ApplicationCommandOptionType = exports.ApplicationCommandTypes = exports.Locales = exports.ImageFormats = exports.GuildNavigationTypes = exports.TimestampStyles = void 0;
4
- exports.EntitlementTypes = exports.SKUFlags = exports.SKUTypes = exports.MembershipState = exports.TeamMemberRoleTypes = exports.RoleFlags = exports.BitwisePermissionFlags = exports.RPCCloseEventCodes = exports.RPCErrorCodes = exports.JSONErrorCodes = exports.HTTPResponseCodes = exports.VoiceCloseEventCodes = exports.VoiceOPCodes = exports.GatewayCloseEventCodes = exports.GatewayOPCodes = exports.OAuth2Scopes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.InviteTargetTypes = void 0;
3
+ exports.GuildScheduledEventStatus = exports.GuildScheduledEventEntityTypes = exports.GuildScheduledEventPrivacyLevel = exports.ImageWidgetStyleOptions = exports.PromptTypes = exports.OnboardingMode = exports.IntegrationExpireBehaviors = exports.GuildMemberFlags = exports.MutableGuildFeatures = exports.GuildFeatures = exports.SystemChannelFlags = exports.PremiumTier = exports.GuildNSFWLevel = exports.VerificationLevel = exports.MFALevel = exports.ExplicitContentFilterLevel = exports.DefaultMessageNotificationLevel = exports.ReactionTypes = exports.AllowedMentionTypes = exports.AttachmentFlags = exports.MessageReferenceTypes = exports.MessageFlags = exports.MessageActivityTypes = exports.MessageTypes = exports.ForumLayoutTypes = exports.SortOrderTypes = exports.ChannelFlags = exports.VideoQualityModes = exports.ChannelTypes = exports.ActionTypes = exports.EventTypes = exports.KeywordPresetTypes = exports.TriggerTypes = exports.AuditLogEvents = exports.ApplicationRoleConnectionMetadataType = exports.ApplicationFlags = exports.ApplicationIntegrationTypes = exports.TextInputStyles = exports.ButtonStyles = exports.InteractionCallbackType = exports.ComponentTypes = exports.InteractionContextTypes = exports.InteractionType = exports.ApplicationCommandPermissionType = exports.ApplicationCommandOptionType = exports.ApplicationCommandTypes = exports.Locales = exports.ImageFormats = exports.GuildNavigationTypes = exports.TimestampStyles = void 0;
4
+ exports.EntitlementTypes = exports.SKUFlags = exports.SKUTypes = exports.MembershipState = exports.TeamMemberRoleTypes = exports.RoleFlags = exports.BitwisePermissionFlags = exports.RPCCloseEventCodes = exports.RPCErrorCodes = exports.JSONErrorCodes = exports.HTTPResponseCodes = exports.VoiceCloseEventCodes = exports.VoiceOPCodes = exports.GatewayCloseEventCodes = exports.GatewayOPCodes = exports.OAuth2Scopes = exports.ActivityFlags = exports.ActivityType = exports.GatewayEvents = exports.StatusTypes = exports.GatewayIntents = exports.DeviceType = exports.WebhookTypes = exports.VisibilityTypes = exports.Services = exports.PremiumTypes = exports.UserFlags = exports.StickerFormatTypes = exports.StickerTypes = exports.PrivacyLevel = exports.LayoutType = exports.InviteTargetTypes = exports.InviteTypes = void 0;
5
5
  /** https://discord.com/developers/docs/reference#message-formatting-timestamp-styles */
6
6
  var TimestampStyles;
7
7
  (function (TimestampStyles) {
@@ -386,6 +386,12 @@ var MessageFlags;
386
386
  MessageFlags[MessageFlags["SuppressNotifications"] = 4096] = "SuppressNotifications";
387
387
  MessageFlags[MessageFlags["IsVoiceMessage"] = 8192] = "IsVoiceMessage";
388
388
  })(MessageFlags || (exports.MessageFlags = MessageFlags = {}));
389
+ /** https://discord.com/developers/docs/resources/channel#message-object-message-reference-types */
390
+ var MessageReferenceTypes;
391
+ (function (MessageReferenceTypes) {
392
+ MessageReferenceTypes[MessageReferenceTypes["Default"] = 0] = "Default";
393
+ MessageReferenceTypes[MessageReferenceTypes["Forward"] = 1] = "Forward";
394
+ })(MessageReferenceTypes || (exports.MessageReferenceTypes = MessageReferenceTypes = {}));
389
395
  /** https://discord.com/developers/docs/resources/channel#attachment-object-attachment-flags */
390
396
  var AttachmentFlags;
391
397
  (function (AttachmentFlags) {
@@ -631,6 +637,7 @@ var Services;
631
637
  Services["Playstation"] = "playstation";
632
638
  Services["Reddit"] = "reddit";
633
639
  Services["RiotGames"] = "riotgames";
640
+ Services["Roblox"] = "roblox";
634
641
  Services["Spotify"] = "spotify";
635
642
  Services["Skype"] = "skype";
636
643
  Services["Steam"] = "steam";
@@ -88,7 +88,7 @@ class Shard {
88
88
  }));
89
89
  }
90
90
  onDispatch(packet) {
91
- this.client.emit("dispatch", packet);
91
+ this.client.emit("dispatch", packet, this.id);
92
92
  switch (packet.t) {
93
93
  case constants_1.GatewayEvents.Ready:
94
94
  {
@@ -545,11 +545,11 @@ class Shard {
545
545
  case constants_1.GatewayOPCodes.Hello:
546
546
  {
547
547
  this.heartbeatInterval = setInterval(() => this.heartbeat(null), packet.d.heartbeat_interval);
548
- this.client.emit("hello", packet.d.heartbeat_interval);
548
+ this.client.emit("hello", packet.d.heartbeat_interval, this.id);
549
549
  }
550
550
  break;
551
551
  case constants_1.GatewayOPCodes.HeartbeatACK:
552
- this.client.emit("heartbeatACK");
552
+ this.client.emit("heartbeatACK", this.id);
553
553
  break;
554
554
  }
555
555
  }
@@ -1,2 +1 @@
1
1
  export * from "./Shard";
2
- export * from "./ShardManager";
@@ -15,4 +15,3 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./Shard"), exports);
18
- __exportStar(require("./ShardManager"), exports);
@@ -499,6 +499,7 @@ class Channels {
499
499
  ? Applications_1.Applications.applicationFromRaw(message.application)
500
500
  : undefined,
501
501
  applicationID: message.application_id,
502
+ flags: message.flags,
502
503
  messageReference: message.message_reference !== undefined
503
504
  ? {
504
505
  messageID: message.message_reference.message_id,
@@ -507,7 +508,19 @@ class Channels {
507
508
  failIfNotExists: message.message_reference.fail_if_not_exists,
508
509
  }
509
510
  : undefined,
510
- flags: message.flags,
511
+ messageSnapshots: message.message_snapshots?.map((messageSnapshot) => ({
512
+ message: {
513
+ type: messageSnapshot.message.type,
514
+ content: messageSnapshot.message.content,
515
+ embeds: messageSnapshot.message.embeds.map((embed) => this.embedFromRaw(embed)),
516
+ attachments: messageSnapshot.message.attachments.map((attachment) => this.attachmentFromRaw(attachment)),
517
+ timestamp: messageSnapshot.message.timestamp,
518
+ editedTimestamp: messageSnapshot.message.edited_timestamp,
519
+ flags: messageSnapshot.message.flags,
520
+ mentions: messageSnapshot.message.mentions.map((user) => Users_1.Users.userFromRaw(user)),
521
+ mentionRoles: messageSnapshot.message.mention_roles,
522
+ },
523
+ })),
511
524
  referencedMessage: message.referenced_message !== undefined
512
525
  ? message.referenced_message !== null
513
526
  ? Channels.messageFromRaw(message.referenced_message)
@@ -594,6 +607,7 @@ class Channels {
594
607
  ? Applications_1.Applications.applicationToRaw(message.application)
595
608
  : undefined,
596
609
  application_id: message.applicationID,
610
+ flags: message.flags,
597
611
  message_reference: message.messageReference !== undefined
598
612
  ? {
599
613
  message_id: message.messageReference.messageID,
@@ -602,7 +616,19 @@ class Channels {
602
616
  fail_if_not_exists: message.messageReference.failIfNotExists,
603
617
  }
604
618
  : undefined,
605
- flags: message.flags,
619
+ message_snapshots: message.messageSnapshots?.map((messageSnapshot) => ({
620
+ message: {
621
+ type: messageSnapshot.message.type,
622
+ content: messageSnapshot.message.content,
623
+ embeds: messageSnapshot.message.embeds.map((embed) => this.embedToRaw(embed)),
624
+ attachments: messageSnapshot.message.attachments.map((attachment) => this.attachmentToRaw(attachment)),
625
+ timestamp: messageSnapshot.message.timestamp,
626
+ edited_timestamp: messageSnapshot.message.editedTimestamp,
627
+ flags: messageSnapshot.message.flags,
628
+ mentions: messageSnapshot.message.mentions.map((user) => Users_1.Users.userToRaw(user)),
629
+ mention_roles: messageSnapshot.message.mentionRoles,
630
+ },
631
+ })),
606
632
  referenced_message: message.referencedMessage !== undefined
607
633
  ? message.referencedMessage !== null
608
634
  ? Channels.messageToRaw(message.referencedMessage)
@@ -1,4 +1,4 @@
1
- import type { AllowedMentionTypes, ApplicationIntegrationTypes, AttachmentFlags, ChannelFlags, ChannelTypes, ForumLayoutTypes, InteractionType, MessageActivityTypes, MessageFlags, MessageTypes, SortOrderTypes, VideoQualityModes } from "../constants";
1
+ import type { AllowedMentionTypes, ApplicationIntegrationTypes, AttachmentFlags, ChannelFlags, ChannelTypes, ForumLayoutTypes, InteractionType, MessageActivityTypes, MessageFlags, MessageReferenceTypes, MessageTypes, SortOrderTypes, VideoQualityModes } from "../constants";
2
2
  import type { RawApplication, Application } from "./application";
3
3
  import type { snowflake, timestamp } from "./common";
4
4
  import type { RawEmoji, Emoji } from "./emoji";
@@ -69,8 +69,9 @@ export interface RawMessage {
69
69
  activity?: RawMessageActivity;
70
70
  application?: RawApplication;
71
71
  application_id?: snowflake;
72
- message_reference?: RawMessageReference;
73
72
  flags?: MessageFlags;
73
+ message_reference?: RawMessageReference;
74
+ message_snapshots?: Array<RawMessageSnapshot>;
74
75
  referenced_message?: RawMessage | null;
75
76
  interaction_metadata?: RawMessageInteractionMetadata;
76
77
  interaction?: RawMessageInteraction;
@@ -106,11 +107,16 @@ export interface RawMessageCall {
106
107
  }
107
108
  /** https://discord.com/developers/docs/resources/channel#message-reference-object-message-reference-structure */
108
109
  export interface RawMessageReference {
110
+ type?: MessageReferenceTypes;
109
111
  message_id?: snowflake;
110
112
  channel_id?: snowflake;
111
113
  guild_id?: snowflake;
112
114
  fail_if_not_exists?: boolean;
113
115
  }
116
+ /** https://discord.com/developers/docs/resources/channel#message-snapshot-object-message-snapshot-structure */
117
+ export interface RawMessageSnapshot {
118
+ message: Pick<RawMessage, "type" | "content" | "embeds" | "attachments" | "timestamp" | "edited_timestamp" | "flags" | "mentions" | "mention_roles">;
119
+ }
114
120
  /** https://discord.com/developers/docs/resources/channel#followed-channel-object-followed-channel-structure */
115
121
  export interface RawFollowedChannel {
116
122
  channel_id: snowflake;
@@ -325,8 +331,9 @@ export interface Message {
325
331
  activity?: MessageActivity;
326
332
  application?: Application;
327
333
  applicationID?: snowflake;
328
- messageReference?: MessageReference;
329
334
  flags?: MessageFlags;
335
+ messageReference?: MessageReference;
336
+ messageSnapshots?: Array<MessageSnapshot>;
330
337
  referencedMessage?: Message | null;
331
338
  interactionMetadata?: MessageInteractionMetadata;
332
339
  interaction?: MessageInteraction;
@@ -358,11 +365,15 @@ export interface MessageCall {
358
365
  endedTimestamp?: timestamp | null;
359
366
  }
360
367
  export interface MessageReference {
368
+ type?: MessageReferenceTypes;
361
369
  messageID?: snowflake;
362
370
  channelID?: snowflake;
363
371
  guildID?: snowflake;
364
372
  failIfNotExists?: boolean;
365
373
  }
374
+ export interface MessageSnapshot {
375
+ message: Pick<Message, "type" | "content" | "embeds" | "attachments" | "timestamp" | "editedTimestamp" | "flags" | "mentions" | "mentionRoles">;
376
+ }
366
377
  export interface FollowedChannel {
367
378
  channelID: snowflake;
368
379
  webhookID: snowflake;
@@ -1,4 +1,4 @@
1
- import type { ActivityFlags, ActivityType, GatewayIntents, GatewayOPCodes, GuildMemberFlags, InviteTargetTypes, ReactionTypes, StatusTypes, TriggerTypes } from "../constants";
1
+ import type { ActivityFlags, ActivityType, 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";
@@ -11,10 +11,10 @@ import type { RawUser, RawAvatarDecorationData, User, AvatarDecorationData } fro
11
11
  import type { RawVoiceState, VoiceState } from "./voice";
12
12
  /** https://discord.com/developers/docs/topics/gateway-events#payload-structure */
13
13
  export interface RawPayload {
14
- op: number;
14
+ op: GatewayOPCodes;
15
15
  d: any | null;
16
16
  s: number | null;
17
- t: string | null;
17
+ t: GatewayEvents | null;
18
18
  }
19
19
  /** https://discord.com/developers/docs/topics/gateway-events#identify-identify-structure */
20
20
  export interface RawIdentify {
@@ -356,7 +356,7 @@ export interface Payload {
356
356
  op: GatewayOPCodes;
357
357
  d: any | null;
358
358
  s: number | null;
359
- t: string | null;
359
+ t: GatewayEvents | null;
360
360
  }
361
361
  export interface Identify {
362
362
  token: string;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "disgroove",
3
- "version": "2.2.3-dev.4f98e3d",
3
+ "version": "2.2.3-dev.e049f9f",
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,35 +1,35 @@
1
- {
2
- "name": "disgroove",
3
- "version": "2.2.3-dev.4f98e3d",
4
- "description": "A module to interface with Discord",
5
- "main": "./dist/lib/index.js",
6
- "types": "./dist/lib/index.d.ts",
7
- "repository": {
8
- "type": "git",
9
- "url": "git+https://github.com/XenKys/disgroove.git"
10
- },
11
- "keywords": [
12
- "api",
13
- "bot",
14
- "discord",
15
- "gateway",
16
- "http",
17
- "https",
18
- "rest",
19
- "wrapper"
20
- ],
21
- "author": "XenKys",
22
- "license": "MIT",
23
- "bugs": {
24
- "url": "https://github.com/XenKys/disgroove/issues"
25
- },
26
- "homepage": "https://github.com/XenKys/disgroove#readme",
27
- "devDependencies": {
28
- "@types/node": "^20.14.10",
29
- "@types/ws": "^8.5.10",
30
- "typescript": "^5.5.3"
31
- },
32
- "dependencies": {
33
- "ws": "^8.18.0"
34
- }
35
- }
1
+ {
2
+ "name": "disgroove",
3
+ "version": "2.2.3-dev.e049f9f",
4
+ "description": "A module to interface with Discord",
5
+ "main": "./dist/lib/index.js",
6
+ "types": "./dist/lib/index.d.ts",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/XenKys/disgroove.git"
10
+ },
11
+ "keywords": [
12
+ "api",
13
+ "bot",
14
+ "discord",
15
+ "gateway",
16
+ "http",
17
+ "https",
18
+ "rest",
19
+ "wrapper"
20
+ ],
21
+ "author": "XenKys",
22
+ "license": "MIT",
23
+ "bugs": {
24
+ "url": "https://github.com/XenKys/disgroove/issues"
25
+ },
26
+ "homepage": "https://github.com/XenKys/disgroove#readme",
27
+ "devDependencies": {
28
+ "@types/node": "^20.14.10",
29
+ "@types/ws": "^8.5.10",
30
+ "typescript": "^5.5.3"
31
+ },
32
+ "dependencies": {
33
+ "ws": "^8.18.0"
34
+ }
35
+ }
@@ -1,10 +0,0 @@
1
- import type { Shard } from ".";
2
- import type { GatewayPresenceUpdate } from "../types/gateway-events";
3
- export declare class ShardManager extends Map<number, Shard> {
4
- /** https://discord.com/developers/docs/topics/gateway#connections */
5
- connect(): void;
6
- /** https://discord.com/developers/docs/topics/gateway#connections */
7
- disconnect(): void;
8
- /** https://discord.com/developers/docs/topics/gateway-events#update-presence */
9
- updatePresence(options: Partial<Pick<GatewayPresenceUpdate, "activities" | "status" | "afk">>): void;
10
- }
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ShardManager = void 0;
4
- class ShardManager extends Map {
5
- /** https://discord.com/developers/docs/topics/gateway#connections */
6
- connect() {
7
- this.forEach((shard) => shard.connect());
8
- }
9
- /** https://discord.com/developers/docs/topics/gateway#connections */
10
- disconnect() {
11
- this.forEach((shard) => shard.disconnect());
12
- }
13
- /** https://discord.com/developers/docs/topics/gateway-events#update-presence */
14
- updatePresence(options) {
15
- this.forEach((shard) => shard.updatePresence(options));
16
- }
17
- }
18
- exports.ShardManager = ShardManager;