lunibee 0.3.3 → 0.4.0

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.
Files changed (125) hide show
  1. package/README.md +1 -1
  2. package/dist/builders/commands.d.ts +1 -1
  3. package/dist/builders/components.d.ts +9 -11
  4. package/dist/builders/embed.d.ts +1 -1
  5. package/dist/builders/index.d.ts +1 -1
  6. package/dist/builders/index.js +87 -1298
  7. package/dist/builders/index.js.map +3 -11
  8. package/dist/chunks/index-0wn81eng.js +2492 -0
  9. package/dist/chunks/index-0wn81eng.js.map +17 -0
  10. package/dist/chunks/index-2en489j6.js +40 -0
  11. package/dist/chunks/index-2en489j6.js.map +10 -0
  12. package/dist/chunks/index-3hyps48a.js +203 -0
  13. package/dist/chunks/index-3hyps48a.js.map +11 -0
  14. package/dist/chunks/index-57c5n3ms.js +2274 -0
  15. package/dist/chunks/index-57c5n3ms.js.map +19 -0
  16. package/dist/chunks/index-5yx92e36.js +1170 -0
  17. package/dist/chunks/index-5yx92e36.js.map +14 -0
  18. package/dist/chunks/index-690bp093.js +95 -0
  19. package/dist/chunks/index-690bp093.js.map +10 -0
  20. package/dist/chunks/index-7fp2hvmg.js +2155 -0
  21. package/dist/chunks/index-7fp2hvmg.js.map +24 -0
  22. package/dist/chunks/index-cnmsajvk.js +1119 -0
  23. package/dist/chunks/index-cnmsajvk.js.map +12 -0
  24. package/dist/chunks/index-fdvgk2sw.js +1310 -0
  25. package/dist/chunks/index-fdvgk2sw.js.map +21 -0
  26. package/dist/chunks/index-gyvps8b9.js +214 -0
  27. package/dist/chunks/index-gyvps8b9.js.map +12 -0
  28. package/dist/chunks/index-jzg4bh99.js +1533 -0
  29. package/dist/chunks/index-jzg4bh99.js.map +21 -0
  30. package/dist/chunks/index-mgw2yvrm.js +3547 -0
  31. package/dist/chunks/index-mgw2yvrm.js.map +25 -0
  32. package/dist/chunks/index-yh76b55h.js +3449 -0
  33. package/dist/chunks/index-yh76b55h.js.map +29 -0
  34. package/dist/collection/index.js +9 -1118
  35. package/dist/collection/index.js.map +3 -6
  36. package/dist/core/api.d.ts +3 -3
  37. package/dist/core/channel-create.d.ts +2 -2
  38. package/dist/core/commands.d.ts +3 -3
  39. package/dist/core/events.d.ts +4 -4
  40. package/dist/core/handles.d.ts +4 -4
  41. package/dist/core/index.d.ts +25 -20
  42. package/dist/core/index.js +68 -10130
  43. package/dist/core/index.js.map +3 -65
  44. package/dist/core/permissions.d.ts +1 -1
  45. package/dist/core/redis-cache.d.ts +1 -1
  46. package/dist/formatters/index.js +41 -110
  47. package/dist/formatters/index.js.map +3 -4
  48. package/dist/handlers/index.js +5 -37
  49. package/dist/handlers/index.js.map +3 -4
  50. package/dist/index.d.ts +21 -21
  51. package/dist/index.js +641 -16325
  52. package/dist/index.js.map +3 -92
  53. package/dist/managers/advanced.d.ts +3 -3
  54. package/dist/managers/application.d.ts +2 -2
  55. package/dist/managers/base.d.ts +1 -1
  56. package/dist/managers/emoji.d.ts +2 -2
  57. package/dist/managers/guild-resources.d.ts +6 -6
  58. package/dist/managers/guild.d.ts +3 -3
  59. package/dist/managers/index.d.ts +4 -8
  60. package/dist/managers/index.js +51 -4060
  61. package/dist/managers/index.js.map +3 -29
  62. package/dist/managers/member.d.ts +2 -2
  63. package/dist/managers/message.d.ts +14 -6
  64. package/dist/managers/role.d.ts +2 -2
  65. package/dist/managers/thread.d.ts +3 -3
  66. package/dist/managers/user.d.ts +7 -4
  67. package/dist/rest/index.d.ts +10 -35
  68. package/dist/rest/index.js +57 -2184
  69. package/dist/rest/index.js.map +3 -18
  70. package/dist/rest/limiter.d.ts +9 -1
  71. package/dist/rest/webhook.d.ts +2 -8
  72. package/dist/sharding/bus.d.ts +2 -2
  73. package/dist/sharding/cluster.d.ts +45 -5
  74. package/dist/sharding/context.d.ts +45 -3
  75. package/dist/sharding/gateway-bot.d.ts +2 -1
  76. package/dist/sharding/health.d.ts +1 -1
  77. package/dist/sharding/identify.d.ts +12 -0
  78. package/dist/sharding/index.d.ts +44 -11
  79. package/dist/sharding/index.js +60 -4620
  80. package/dist/sharding/index.js.map +3 -33
  81. package/dist/sharding/supervisor.d.ts +4 -2
  82. package/dist/structures/audit-log.d.ts +1 -1
  83. package/dist/structures/base.d.ts +6 -6
  84. package/dist/structures/channels.d.ts +1 -1
  85. package/dist/structures/embed.d.ts +1 -1
  86. package/dist/structures/index.d.ts +14 -14
  87. package/dist/structures/index.js +109 -2382
  88. package/dist/structures/index.js.map +3 -16
  89. package/dist/structures/interactions.d.ts +13 -9
  90. package/dist/structures/options.d.ts +1 -1
  91. package/dist/structures/permissions.d.ts +2 -2
  92. package/dist/structures/resources.d.ts +10 -10
  93. package/dist/structures/sticker.d.ts +1 -1
  94. package/dist/types/gateway.d.ts +2 -79
  95. package/dist/types/index.d.ts +0 -6
  96. package/dist/types/index.js +41 -272
  97. package/dist/types/index.js.map +3 -6
  98. package/dist/utils/index.js +23 -209
  99. package/dist/utils/index.js.map +3 -5
  100. package/dist/voice/connection.d.ts +200 -0
  101. package/dist/voice/crypto.d.ts +50 -0
  102. package/dist/voice/dave.d.ts +85 -0
  103. package/dist/voice/effects.d.ts +31 -0
  104. package/dist/voice/emitter.d.ts +14 -0
  105. package/dist/voice/gateway.d.ts +59 -0
  106. package/dist/voice/index.d.ts +25 -228
  107. package/dist/voice/index.js +111 -442
  108. package/dist/voice/index.js.map +3 -4
  109. package/dist/voice/libopus.d.ts +88 -0
  110. package/dist/voice/networking.d.ts +80 -0
  111. package/dist/voice/ogg.d.ts +24 -0
  112. package/dist/voice/opus.d.ts +18 -0
  113. package/dist/voice/player.d.ts +79 -0
  114. package/dist/voice/protocol.d.ts +76 -0
  115. package/dist/voice/receiver.d.ts +59 -0
  116. package/dist/voice/resource.d.ts +102 -0
  117. package/dist/voice/udp.d.ts +40 -0
  118. package/dist/ws/close-codes.d.ts +1 -1
  119. package/dist/ws/index.d.ts +25 -4
  120. package/dist/ws/index.js +47 -1336
  121. package/dist/ws/index.js.map +3 -17
  122. package/dist/ws/protocol.d.ts +1 -1
  123. package/dist/ws/send-budget.d.ts +0 -2
  124. package/dist/ws/state.d.ts +0 -10
  125. package/package.json +19 -16
@@ -1,7 +1,7 @@
1
1
  import { Manager } from "./base.js";
2
- import { type REST } from "@lunibee/rest";
3
- import type { APIEmoji, APIEntitlement, APISKU, APISoundboardSound, APISticker, APISubscription } from "@lunibee/types";
4
- export type { APIEntitlement, APISKU, APISoundboardSound, APISubscription, } from "@lunibee/types";
2
+ import { type REST } from "../rest/index.js";
3
+ import type { APIEmoji, APIEntitlement, APISKU, APISoundboardSound, APISticker, APISubscription } from "../types/index.js";
4
+ export type { APIEntitlement, APISKU, APISoundboardSound, APISubscription, } from "../types/index.js";
5
5
  /** Fields for {@link GuildStickerManager.create}. */
6
6
  export interface GuildStickerCreateOptions {
7
7
  name: string;
@@ -1,5 +1,5 @@
1
- import { REST } from "@lunibee/rest";
2
- import type { APIApplicationCommand, ApplicationCommandData } from "@lunibee/types";
1
+ import { REST } from "../rest/index.js";
2
+ import type { APIApplicationCommand, ApplicationCommandData } from "../types/index.js";
3
3
  /** Command data, or a builder such as `CreateSlashCommand` (its `toJSON()` is sent). */
4
4
  export type ApplicationCommandInput = ApplicationCommandData | {
5
5
  toJSON(): Record<string, unknown>;
@@ -1,4 +1,4 @@
1
- import { Collection } from "@lunibee/collection";
1
+ import { Collection } from "../collection/index.js";
2
2
  /**
3
3
  * Copies a structure's own fields onto the cached instance. A key loop: on Bun,
4
4
  * Object.assign into an existing object is about twice as slow, on every event.
@@ -1,6 +1,6 @@
1
1
  import { Manager } from "./base.js";
2
- import { Emoji } from "@lunibee/structures";
3
- import { type REST } from "@lunibee/rest";
2
+ import { Emoji } from "../structures/index.js";
3
+ import { type REST } from "../rest/index.js";
4
4
  /** Strict payload for creating a custom guild emoji. */
5
5
  export interface EmojiCreateOptions {
6
6
  /** Audit-log reason. */
@@ -1,6 +1,6 @@
1
1
  import { Manager } from "./base.js";
2
- import { type REST } from "@lunibee/rest";
3
- import type { APIOverwrite, APIGuildScheduledEvent, APIStageInstance, UserData } from "@lunibee/types";
2
+ import { type REST } from "../rest/index.js";
3
+ import type { APIOverwrite, APIGuildScheduledEvent, APIStageInstance, UserData } from "../types/index.js";
4
4
  /** Raw Discord ban object. */
5
5
  export interface APIBan {
6
6
  user: UserData;
@@ -13,7 +13,7 @@ export interface GuildBanCreateOptions {
13
13
  /** Audit-log reason. */
14
14
  reason?: string;
15
15
  }
16
- /** Manages a guild's bans, cached by user ID. Discord.js-familiar. */
16
+ /** Manages a guild's bans, cached by user ID. */
17
17
  export declare class GuildBanManager extends Manager<string, APIBan> {
18
18
  #private;
19
19
  readonly guildId: string;
@@ -44,7 +44,7 @@ export type GuildScheduledEventOptions = Partial<Omit<APIGuildScheduledEvent, "i
44
44
  /** Audit-log reason. */
45
45
  reason?: string;
46
46
  };
47
- /** Manages a guild's scheduled events, cached by event ID. Discord.js-familiar. */
47
+ /** Manages a guild's scheduled events, cached by event ID. */
48
48
  export declare class GuildScheduledEventManager extends Manager<string, APIGuildScheduledEvent> {
49
49
  #private;
50
50
  readonly guildId: string;
@@ -83,7 +83,7 @@ export interface StageInstanceCreateOptions {
83
83
  sendStartNotification?: boolean;
84
84
  guildScheduledEventId?: string;
85
85
  }
86
- /** Manages stage instances, cached by stage channel ID. Discord.js-familiar. */
86
+ /** Manages stage instances, cached by stage channel ID. */
87
87
  export declare class StageInstanceManager extends Manager<string, APIStageInstance> {
88
88
  #private;
89
89
  constructor(rest: REST);
@@ -122,7 +122,7 @@ export interface PermissionOverwriteUpdate {
122
122
  /** Bits to reset to inherited (neither allowed nor denied). */
123
123
  inherit?: bigint;
124
124
  }
125
- /** Manages a channel's permission overwrites. Discord.js-familiar. */
125
+ /** Manages a channel's permission overwrites. */
126
126
  export declare class PermissionOverwriteManager {
127
127
  #private;
128
128
  readonly channelId: string;
@@ -4,9 +4,9 @@ import { GuildSoundboardManager, GuildStickerManager } from "./advanced.js";
4
4
  import { GuildMemberManager } from "./member.js";
5
5
  import { RoleManager } from "./role.js";
6
6
  import { GuildBanManager, GuildScheduledEventManager } from "./guild-resources.js";
7
- import { AuditLog, Guild, AutoModerationRule, type ResourceContext } from "@lunibee/structures";
8
- import { type REST } from "@lunibee/rest";
9
- import { type APIChannel, type APIGuildPreview, type APIInvite, type APIWebhook, type APIAutoModerationRule, type APIInviteCreate, type APIVoiceState, type APIPresenceUpdate, type APIWelcomeScreen, type APIWelcomeScreenChannel, type APIGuildOnboarding, type APIOnboardingPrompt } from "@lunibee/types";
7
+ import { AuditLog, Guild, AutoModerationRule, type ResourceContext } from "../structures/index.js";
8
+ import { type REST } from "../rest/index.js";
9
+ import { type APIChannel, type APIGuildPreview, type APIInvite, type APIWebhook, type APIAutoModerationRule, type APIInviteCreate, type APIVoiceState, type APIPresenceUpdate, type APIWelcomeScreen, type APIWelcomeScreenChannel, type APIGuildOnboarding, type APIOnboardingPrompt } from "../types/index.js";
10
10
  type GuildData = ConstructorParameters<typeof Guild>[0];
11
11
  export interface GuildCreateOptions extends Record<string, unknown> {
12
12
  name: string;
@@ -1,10 +1,8 @@
1
1
  import { Manager } from "./base.js";
2
2
  export { Manager, ResourceManager } from "./base.js";
3
- /** Discord.js-familiar alias for {@link ResourceManager}. */
4
- export { ResourceManager as CachedManager } from "./base.js";
5
- import { REST } from "@lunibee/rest";
6
- import type { AllowedMentions, APIForumTag, ForumTagInput, MessageCreateOptions, MessageEditOptions } from "@lunibee/types";
7
- import { Channel, Message, User } from "@lunibee/structures";
3
+ import { REST } from "../rest/index.js";
4
+ import type { AllowedMentions, APIForumTag, ForumTagInput, MessageCreateOptions, MessageEditOptions } from "../types/index.js";
5
+ import { Channel, Message, User } from "../structures/index.js";
8
6
  import { MessageManager, type MessageCacheOptions } from "./message.js";
9
7
  import { ThreadManager } from "./thread.js";
10
8
  export { UserManager } from "./user.js";
@@ -147,7 +145,7 @@ export declare class ChannelManager extends Manager<string, Channel> {
147
145
  name: string;
148
146
  avatar?: string | null;
149
147
  reason?: string;
150
- }): Promise<import("@lunibee/types").APIWebhook>;
148
+ }): Promise<import("../types/index.js").APIWebhook>;
151
149
  createThreadFromMessage(channelId: string, messageId: string, options: MessageThreadOptions): Promise<Channel>;
152
150
  /**
153
151
  * Fetches a page of messages with cursor metadata.
@@ -163,8 +161,6 @@ export declare class ChannelManager extends Manager<string, Channel> {
163
161
  }>;
164
162
  clear(): void;
165
163
  }
166
- /** Discord.js-familiar name for `MessageCreateOptions`. */
167
- export type CreateMessageOptions = MessageCreateOptions;
168
164
  export { MessageManager, toRequest, type MessageCacheOptions, type MessageFile, } from "./message.js";
169
165
  export { ThreadManager } from "./thread.js";
170
166
  export { RoleManager, type RoleCreateOptions, type RoleEditOptions, } from "./role.js";