lunibee 0.1.6 → 0.1.7

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 (55) hide show
  1. package/README.md +3 -3
  2. package/dist/builders/commands.d.ts +37 -0
  3. package/dist/builders/components.d.ts +19 -12
  4. package/dist/builders/embed.d.ts +3 -1
  5. package/dist/builders/index.d.ts +1 -1
  6. package/dist/builders/index.js +146 -19
  7. package/dist/builders/index.js.map +8 -7
  8. package/dist/collection/index.d.ts +30 -0
  9. package/dist/collection/index.js +78 -5
  10. package/dist/collection/index.js.map +4 -4
  11. package/dist/core/events.d.ts +2 -0
  12. package/dist/core/index.d.ts +38 -0
  13. package/dist/core/index.js +754 -175
  14. package/dist/core/index.js.map +24 -22
  15. package/dist/core/permissions.d.ts +112 -53
  16. package/dist/formatters/index.d.ts +43 -3
  17. package/dist/formatters/index.js +64 -1
  18. package/dist/formatters/index.js.map +3 -3
  19. package/dist/handlers/index.js.map +2 -2
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +1762 -291
  22. package/dist/index.js.map +43 -38
  23. package/dist/managers/emoji.d.ts +38 -0
  24. package/dist/managers/guild.d.ts +112 -1
  25. package/dist/managers/index.d.ts +31 -1
  26. package/dist/managers/index.js +803 -77
  27. package/dist/managers/index.js.map +21 -20
  28. package/dist/rest/index.d.ts +101 -11
  29. package/dist/rest/index.js +301 -45
  30. package/dist/rest/index.js.map +8 -6
  31. package/dist/rest/redis.d.ts +37 -0
  32. package/dist/rest/routes.d.ts +22 -0
  33. package/dist/rest/store.d.ts +38 -0
  34. package/dist/rest/webhook.d.ts +2 -2
  35. package/dist/sharding/cluster.d.ts +61 -0
  36. package/dist/sharding/index.d.ts +8 -0
  37. package/dist/sharding/index.js +286 -18
  38. package/dist/sharding/index.js.map +8 -7
  39. package/dist/structures/audit-log.d.ts +26 -0
  40. package/dist/structures/base.d.ts +32 -0
  41. package/dist/structures/index.d.ts +29 -1
  42. package/dist/structures/index.js +1022 -86
  43. package/dist/structures/index.js.map +14 -10
  44. package/dist/structures/resources.d.ts +192 -4
  45. package/dist/types/index.d.ts +76 -0
  46. package/dist/types/index.js.map +2 -2
  47. package/dist/utils/index.js.map +2 -2
  48. package/dist/voice/index.d.ts +88 -0
  49. package/dist/voice/index.js +204 -5
  50. package/dist/voice/index.js.map +3 -3
  51. package/dist/ws/index.d.ts +40 -1
  52. package/dist/ws/index.js +102 -18
  53. package/dist/ws/index.js.map +4 -4
  54. package/package.json +16 -16
  55. package/dist/structures/permissions.d.ts +0 -73
@@ -25,12 +25,18 @@ export interface ResourceContext {
25
25
  pinMessage?(channelId: string, messageId: string): Promise<void>;
26
26
  unpinMessage?(channelId: string, messageId: string): Promise<void>;
27
27
  }
28
+ export declare const CDN_BASE = "https://cdn.discordapp.com";
28
29
  /** Options for CDN image URLs. */
29
30
  export interface ImageURLOptions {
30
31
  extension?: "png" | "jpg" | "webp" | "gif" | "jpeg";
31
32
  size?: 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096;
32
33
  forceStatic?: boolean;
33
34
  }
35
+ /** Builds a Discord CDN asset URL from a directory path and asset hash, applying
36
+ * animated-hash (`a_`) gif detection, extension and size options. Shared by all
37
+ * hash-backed asset accessors (user/member/role/webhook) to avoid duplicating the logic.
38
+ * @param path CDN directory path, e.g. `/role-icons/{id}`. @param hash Asset hash. @param options Image URL options. */
39
+ export declare function cdnURL(path: string, hash: string, options?: ImageURLOptions): string;
34
40
  export declare class User extends BaseStructure {
35
41
  username: string;
36
42
  globalName: string | null;
@@ -104,6 +110,20 @@ export declare class Guild extends BaseStructure {
104
110
  vanityUrlCode: string | null;
105
111
  nsfwLevel: number;
106
112
  discoverySplash: string | null;
113
+ /** ID of the rules channel for Community guilds. */
114
+ rulesChannelId: string | null;
115
+ /** ID of the system messages channel. */
116
+ systemChannelId: string | null;
117
+ /** Bitfield of system channel flags. */
118
+ systemChannelFlags: number;
119
+ /** Maximum number of members the guild can have. */
120
+ maxMembers: number;
121
+ /** Required MFA level for administrators. */
122
+ mfaLevel: number;
123
+ /** Explicit content filter level. */
124
+ explicitContentFilter: number;
125
+ /** Default notification level for new members. */
126
+ defaultMessageNotifications: number;
107
127
  constructor(data: import("@lunibee/types").APIGuild);
108
128
  /** Returns the guild icon URL, or null if no icon is set. */
109
129
  iconURL(options?: ImageURLOptions): string | null;
@@ -113,10 +133,22 @@ export declare class Guild extends BaseStructure {
113
133
  bannerURL(options?: ImageURLOptions): string | null;
114
134
  /** Returns the guild discovery splash URL, or null if none. */
115
135
  discoverySplashURL(options?: ImageURLOptions): string | null;
136
+ /** Returns a widget image URL for the guild.
137
+ * @param style Widget style: shield (default), banner1, banner2, banner3, banner4.
138
+ */
139
+ widgetImageURL(style?: "shield" | "banner1" | "banner2" | "banner3" | "banner4"): string;
116
140
  /** Whether the guild has a given feature flag. @param feature Feature string, e.g. "COMMUNITY". */
117
141
  hasFeature(feature: string): boolean;
118
142
  /** Whether the guild is a Community server. */
119
143
  get isCommunity(): boolean;
144
+ /** Whether the guild is an official Discord Partner. */
145
+ get isPartnered(): boolean;
146
+ /** Whether the guild is verified by Discord. */
147
+ get isVerified(): boolean;
148
+ /** Whether the guild has any active boost subscriptions. */
149
+ get isBoosted(): boolean;
150
+ /** Alias for premiumTier — the guild's current Nitro boost level (0–3). */
151
+ get boostLevel(): number;
120
152
  /** Whether the guild has a vanity URL. */
121
153
  get hasVanityUrl(): boolean;
122
154
  /** Returns the guild's vanity invite URL, or null if none. */
@@ -27,6 +27,12 @@ export declare class Message extends BaseStructure {
27
27
  constructor(data: import("@lunibee/types").APIMessage, context?: ResourceContext);
28
28
  /** Whether embeds are suppressed on this message. */
29
29
  get embedsSuppressed(): boolean;
30
+ /** Unix timestamp (ms) at which the message was created — discord.js parity.
31
+ * Derived from the message `timestamp`, which itself falls back to the id snowflake. */
32
+ get createdTimestamp(): number;
33
+ /** Date at which the message was created — discord.js parity. Overrides the
34
+ * snowflake-only `BaseStructure.createdAt` to honour the message `timestamp`. */
35
+ get createdAt(): Date;
30
36
  /** Edits this message. @param options Message fields to change. @returns The updated message. @throws {Error} If the message is not attached to a client. */
31
37
  edit(options: Record<string, unknown> & {
32
38
  content?: string;
@@ -53,7 +59,29 @@ export declare class Message extends BaseStructure {
53
59
  pin(): Promise<void>;
54
60
  /** Unpins this message. @returns A promise fulfilled when the message is unpinned. @throws {Error} If pin operations are unavailable. */
55
61
  unpin(): Promise<void>;
62
+ /** Whether this message was sent ephemerally (only visible to the recipient). */
63
+ get isEphemeral(): boolean;
64
+ /** Whether this message is currently pinned in its channel. */
65
+ get isPinned(): boolean;
66
+ /** Whether this is a system-generated message (join, boost, etc). Mirrors
67
+ * discord.js: a message is "system" unless its type is one of the user-authored
68
+ * types — Default (0), Reply (19), ChatInputCommand (20) or ContextMenuCommand (23). */
69
+ get isSystemMessage(): boolean;
70
+ /** Whether this message was crossposted from an announcement channel. */
71
+ get isCrosspost(): boolean;
72
+ /** Whether this message has file attachments. */
73
+ get hasAttachments(): boolean;
74
+ /** Whether this message contains embeds. */
75
+ get hasEmbeds(): boolean;
76
+ /** Whether this message contains interactive components. */
77
+ get hasComponents(): boolean;
78
+ /** Edits this message to suppress its embeds. @returns The updated message. */
79
+ suppressEmbeds(): Promise<Message>;
80
+ /** Returns a plain-object snapshot of all message fields. */
81
+ toJSON(): Record<string, unknown>;
56
82
  }
57
- export { GuildMember, Role, TextChannel } from "./resources.js";
83
+ export { GuildMember, Role, TextChannel, Invite, Webhook, WebhookType, Emoji, AutoModerationRule, WelcomeScreenChannel, GuildWelcomeScreen, OnboardingPromptOption, OnboardingPrompt, GuildOnboarding, } from "./resources.js";
58
84
  export * from "./interactions.js";
59
85
  export { Embed } from "./embed.js";
86
+ export { AuditLog, AuditLogEntry } from "./audit-log.js";
87
+ export { PermissionsBitField } from "@lunibee/core";