lunibee 0.1.5 → 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.
- package/README.md +13 -24
- package/dist/builders/commands.d.ts +37 -0
- package/dist/builders/components.d.ts +127 -12
- package/dist/builders/embed.d.ts +3 -1
- package/dist/builders/index.d.ts +2 -2
- package/dist/builders/index.js +319 -16
- package/dist/builders/index.js.map +8 -7
- package/dist/collection/index.d.ts +36 -0
- package/dist/collection/index.js +110 -6
- package/dist/collection/index.js.map +4 -4
- package/dist/core/events.d.ts +69 -3
- package/dist/core/index.d.ts +158 -90
- package/dist/core/index.js +1543 -1169
- package/dist/core/index.js.map +24 -23
- package/dist/core/permissions.d.ts +112 -53
- package/dist/formatters/index.d.ts +43 -3
- package/dist/formatters/index.js +64 -1
- package/dist/formatters/index.js.map +3 -3
- package/dist/handlers/index.js.map +2 -2
- package/dist/index.d.ts +5 -4
- package/dist/index.js +3882 -1588
- package/dist/index.js.map +43 -35
- package/dist/managers/emoji.d.ts +38 -0
- package/dist/managers/guild.d.ts +141 -0
- package/dist/managers/index.d.ts +86 -75
- package/dist/managers/index.js +1084 -67
- package/dist/managers/index.js.map +21 -16
- package/dist/managers/message.d.ts +7 -12
- package/dist/managers/user.d.ts +20 -0
- package/dist/rest/index.d.ts +173 -1
- package/dist/rest/index.js +343 -47
- package/dist/rest/index.js.map +8 -6
- package/dist/rest/redis.d.ts +37 -0
- package/dist/rest/routes.d.ts +26 -1
- package/dist/rest/store.d.ts +38 -0
- package/dist/rest/webhook.d.ts +2 -2
- package/dist/sharding/cluster.d.ts +61 -0
- package/dist/sharding/index.d.ts +8 -0
- package/dist/sharding/index.js +289 -18
- package/dist/sharding/index.js.map +8 -7
- package/dist/structures/audit-log.d.ts +26 -0
- package/dist/structures/base.d.ts +131 -48
- package/dist/structures/embed.d.ts +65 -0
- package/dist/structures/index.d.ts +74 -26
- package/dist/structures/index.js +1528 -59
- package/dist/structures/index.js.map +14 -8
- package/dist/structures/interactions.d.ts +72 -17
- package/dist/structures/resources.d.ts +199 -7
- package/dist/types/index.d.ts +605 -84
- package/dist/types/index.js +71 -1
- package/dist/types/index.js.map +3 -3
- package/dist/utils/index.js.map +2 -2
- package/dist/voice/index.d.ts +88 -0
- package/dist/voice/index.js +204 -5
- package/dist/voice/index.js.map +3 -3
- package/dist/ws/index.d.ts +40 -1
- package/dist/ws/index.js +105 -18
- package/dist/ws/index.js.map +4 -4
- package/package.json +16 -16
- package/dist/structures/permissions.d.ts +0 -73
|
@@ -1,75 +1,158 @@
|
|
|
1
1
|
/** Common Discord snowflake-backed structure. */
|
|
2
2
|
export declare class BaseStructure {
|
|
3
|
-
/** Discord resource ID. */
|
|
4
3
|
readonly id: string;
|
|
5
|
-
/** Creates a structure from an ID. @param id Discord snowflake identifier. @throws {TypeError} If the ID is invalid. */
|
|
6
4
|
constructor(id: string);
|
|
7
|
-
/** Returns the
|
|
5
|
+
/** Returns the snowflake ID as a string. */
|
|
8
6
|
toString(): string;
|
|
7
|
+
/** Returns the timestamp this snowflake was created at. */
|
|
8
|
+
get createdAt(): Date;
|
|
9
9
|
}
|
|
10
|
-
/** Context used by structures to delegate resource operations to the owning client. */
|
|
11
10
|
export interface ResourceContext {
|
|
12
|
-
|
|
13
|
-
sendMessage(channelId: string, options: {
|
|
11
|
+
sendMessage(channelId: string, options: Record<string, unknown> & {
|
|
14
12
|
content?: string;
|
|
15
13
|
}): Promise<import("./index.js").Message>;
|
|
16
|
-
|
|
17
|
-
editMessage(channelId: string, messageId: string, options: {
|
|
14
|
+
editMessage(channelId: string, messageId: string, options: Record<string, unknown> & {
|
|
18
15
|
content?: string;
|
|
19
16
|
}): Promise<import("./index.js").Message>;
|
|
20
|
-
/** Deletes a message through the owning channel manager. @param channelId Channel identifier. @param messageId Message identifier. @returns A promise fulfilled after deletion. */
|
|
21
17
|
deleteMessage(channelId: string, messageId: string): Promise<void>;
|
|
22
|
-
/** Crossposts a message through the owning channel manager. @param channelId Channel identifier. @param messageId Message identifier. @returns The crossposted message. */
|
|
23
18
|
crosspostMessage(channelId: string, messageId: string): Promise<import("./index.js").Message>;
|
|
19
|
+
editChannel?(channelId: string, options: Record<string, unknown>): Promise<import("./base.js").Channel>;
|
|
20
|
+
deleteChannel?(channelId: string): Promise<void>;
|
|
21
|
+
addReaction?(channelId: string, messageId: string, emoji: string): Promise<void>;
|
|
22
|
+
removeOwnReaction?(channelId: string, messageId: string, emoji: string): Promise<void>;
|
|
23
|
+
removeReaction?(channelId: string, messageId: string, emoji: string, userId: string): Promise<void>;
|
|
24
|
+
removeAllReactions?(channelId: string, messageId: string): Promise<void>;
|
|
25
|
+
pinMessage?(channelId: string, messageId: string): Promise<void>;
|
|
26
|
+
unpinMessage?(channelId: string, messageId: string): Promise<void>;
|
|
24
27
|
}
|
|
25
|
-
|
|
28
|
+
export declare const CDN_BASE = "https://cdn.discordapp.com";
|
|
29
|
+
/** Options for CDN image URLs. */
|
|
30
|
+
export interface ImageURLOptions {
|
|
31
|
+
extension?: "png" | "jpg" | "webp" | "gif" | "jpeg";
|
|
32
|
+
size?: 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096;
|
|
33
|
+
forceStatic?: boolean;
|
|
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;
|
|
26
40
|
export declare class User extends BaseStructure {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
41
|
+
username: string;
|
|
42
|
+
globalName: string | null;
|
|
43
|
+
avatar: string | null;
|
|
44
|
+
bot: boolean;
|
|
45
|
+
system: boolean;
|
|
46
|
+
flags: number;
|
|
47
|
+
discriminator: string | null;
|
|
34
48
|
constructor(data: import("@lunibee/types").UserData);
|
|
35
|
-
/**
|
|
49
|
+
/** Effective display name — global name, falling back to username. */
|
|
36
50
|
get displayName(): string;
|
|
37
|
-
/**
|
|
38
|
-
avatarURL(options?:
|
|
39
|
-
|
|
40
|
-
size?: number;
|
|
41
|
-
}): string | null;
|
|
42
|
-
/** Creates the default avatar URL. @returns Discord default avatar URL. */
|
|
51
|
+
/** Returns the user's avatar URL, or null if they have no avatar. */
|
|
52
|
+
avatarURL(options?: ImageURLOptions): string | null;
|
|
53
|
+
/** Returns the default avatar URL based on the user's discriminator/snowflake. */
|
|
43
54
|
defaultAvatarURL(): string;
|
|
44
|
-
/**
|
|
45
|
-
displayAvatarURL(options?:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}): string;
|
|
55
|
+
/** Returns the avatar URL if available, falling back to the default avatar URL. */
|
|
56
|
+
displayAvatarURL(options?: ImageURLOptions): string;
|
|
57
|
+
/** Returns the Discord mention string. Used automatically in template literals. */
|
|
58
|
+
toString(): string;
|
|
49
59
|
}
|
|
50
|
-
/** Represents a Discord channel. */
|
|
51
60
|
export declare class Channel extends BaseStructure {
|
|
52
61
|
#private;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
62
|
+
type: number;
|
|
63
|
+
name?: string | null;
|
|
64
|
+
guildId?: string;
|
|
65
|
+
topic?: string | null;
|
|
66
|
+
parentId?: string | null;
|
|
67
|
+
nsfw?: boolean;
|
|
68
|
+
rateLimitPerUser?: number;
|
|
69
|
+
position?: number;
|
|
70
|
+
/** Creates a channel structure from Discord channel data. */
|
|
57
71
|
constructor(data: import("@lunibee/types").APIChannel, context?: ResourceContext);
|
|
58
|
-
/** Sends a message
|
|
59
|
-
sendMessage(options: {
|
|
72
|
+
/** Sends a message to this channel. @param options Message payload. @returns The created message. @throws {Error} If the channel is not attached to a client. */
|
|
73
|
+
sendMessage(options: Record<string, unknown> & {
|
|
74
|
+
content?: string;
|
|
75
|
+
}): Promise<import("./index.js").Message>;
|
|
76
|
+
/** Sends a message using Lunibee's concise channel API. @param options Message payload. @returns The created message. @throws {Error} If the channel is not attached to a client. */
|
|
77
|
+
send(options: Record<string, unknown> & {
|
|
60
78
|
content?: string;
|
|
61
79
|
}): Promise<import("./index.js").Message>;
|
|
80
|
+
/** Edits this channel. @param options Channel fields to change. @returns The updated channel. @throws {Error} If the channel is not attached to a client. */
|
|
81
|
+
edit(options: Record<string, unknown>): Promise<Channel>;
|
|
82
|
+
/** Changes only this channel's name. @param name New channel name. @returns The updated channel. @throws {TypeError} If the name is empty. @throws {Error} If the channel is not attached to a client. */
|
|
83
|
+
editName(name: string): Promise<Channel>;
|
|
84
|
+
/** Changes only this channel's topic. @param topic New topic, or null to clear it. @returns The updated channel. @throws {Error} If the channel is not attached to a client. */
|
|
85
|
+
editTopic(topic: string | null): Promise<Channel>;
|
|
86
|
+
/** Moves this channel to another parent category. @param parentId Parent category ID, or null to remove the parent. @returns The updated channel. @throws {Error} If the channel is not attached to a client. */
|
|
87
|
+
editParent(parentId: string | null): Promise<Channel>;
|
|
88
|
+
/** Deletes this channel. @returns A promise fulfilled when Discord confirms deletion. @throws {Error} If the channel is not attached to a client. */
|
|
89
|
+
delete(): Promise<void>;
|
|
90
|
+
/** Updates this channel using the same resource operation as edit. @param options Channel fields to change. @returns The updated channel. @throws {Error} If the channel is not attached to a client. */
|
|
91
|
+
update(options: Record<string, unknown>): Promise<Channel>;
|
|
92
|
+
/** Returns the Discord channel mention string. Used automatically in template literals. */
|
|
93
|
+
toString(): string;
|
|
62
94
|
}
|
|
63
|
-
/** Represents a Discord guild. */
|
|
64
95
|
export declare class Guild extends BaseStructure {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
96
|
+
name: string;
|
|
97
|
+
icon: string | null;
|
|
98
|
+
splash: string | null;
|
|
99
|
+
banner: string | null;
|
|
100
|
+
description: string | null;
|
|
101
|
+
preferredLocale: string;
|
|
102
|
+
ownerId?: string;
|
|
103
|
+
features: string[];
|
|
104
|
+
verificationLevel: number;
|
|
105
|
+
premiumTier: number;
|
|
106
|
+
premiumSubscriptionCount: number;
|
|
107
|
+
memberCount?: number;
|
|
108
|
+
approximateMemberCount?: number;
|
|
109
|
+
approximatePresenceCount?: number;
|
|
110
|
+
vanityUrlCode: string | null;
|
|
111
|
+
nsfwLevel: number;
|
|
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;
|
|
127
|
+
constructor(data: import("@lunibee/types").APIGuild);
|
|
128
|
+
/** Returns the guild icon URL, or null if no icon is set. */
|
|
129
|
+
iconURL(options?: ImageURLOptions): string | null;
|
|
130
|
+
/** Returns the guild splash URL, or null if none. */
|
|
131
|
+
splashURL(options?: ImageURLOptions): string | null;
|
|
132
|
+
/** Returns the guild banner URL, or null if none. */
|
|
133
|
+
bannerURL(options?: ImageURLOptions): string | null;
|
|
134
|
+
/** Returns the guild discovery splash URL, or null if none. */
|
|
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;
|
|
140
|
+
/** Whether the guild has a given feature flag. @param feature Feature string, e.g. "COMMUNITY". */
|
|
141
|
+
hasFeature(feature: string): boolean;
|
|
142
|
+
/** Whether the guild is a Community server. */
|
|
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;
|
|
152
|
+
/** Whether the guild has a vanity URL. */
|
|
153
|
+
get hasVanityUrl(): boolean;
|
|
154
|
+
/** Returns the guild's vanity invite URL, or null if none. */
|
|
155
|
+
get vanityURL(): string | null;
|
|
156
|
+
/** Returns a human-readable string representation. */
|
|
157
|
+
toString(): string;
|
|
75
158
|
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedMedia } from "@lunibee/types";
|
|
2
|
+
/**
|
|
3
|
+
* A rich Embed structure that wraps a Discord API embed object.
|
|
4
|
+
* Provides typed accessors and a fluent builder interface.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Embed {
|
|
7
|
+
#private;
|
|
8
|
+
/** Creates an Embed from raw Discord API data, or starts a blank embed. */
|
|
9
|
+
constructor(data?: APIEmbed);
|
|
10
|
+
/** Embed title. */
|
|
11
|
+
get title(): string | undefined;
|
|
12
|
+
/** Embed description. */
|
|
13
|
+
get description(): string | undefined;
|
|
14
|
+
/** Embed URL. */
|
|
15
|
+
get url(): string | undefined;
|
|
16
|
+
/** Embed color as an integer. */
|
|
17
|
+
get color(): number | undefined;
|
|
18
|
+
/** Embed timestamp ISO 8601 string. */
|
|
19
|
+
get timestamp(): string | undefined;
|
|
20
|
+
/** Embed timestamp as a Date object, or undefined. */
|
|
21
|
+
get createdAt(): Date | undefined;
|
|
22
|
+
/** Embed footer. */
|
|
23
|
+
get footer(): APIEmbedFooter | undefined;
|
|
24
|
+
/** Embed image. */
|
|
25
|
+
get image(): APIEmbedMedia | undefined;
|
|
26
|
+
/** Embed thumbnail. */
|
|
27
|
+
get thumbnail(): APIEmbedMedia | undefined;
|
|
28
|
+
/** Embed video. */
|
|
29
|
+
get video(): APIEmbedMedia | undefined;
|
|
30
|
+
/** Embed author. */
|
|
31
|
+
get author(): APIEmbedAuthor | undefined;
|
|
32
|
+
/** Embed fields (read-only copy). */
|
|
33
|
+
get fields(): readonly APIEmbedField[];
|
|
34
|
+
/** Sets the embed title. @param title Embed title text (max 256 chars). @throws {TypeError} If title exceeds 256 characters. */
|
|
35
|
+
setTitle(title: string): this;
|
|
36
|
+
/** Sets the embed description. @param description Embed description (max 4096 chars). @throws {TypeError} If description exceeds 4096 characters. */
|
|
37
|
+
setDescription(description: string): this;
|
|
38
|
+
/** Sets the embed URL. @param url A valid URL string. */
|
|
39
|
+
setURL(url: string): this;
|
|
40
|
+
/** Sets the embed color. Accepts a hex number (0xff0000), decimal integer, or hex string ("#ff0000"). @param color Color value. */
|
|
41
|
+
setColor(color: number | string): this;
|
|
42
|
+
/** Sets the embed timestamp. Accepts a Date, ISO string, or number (ms since epoch). Defaults to now. */
|
|
43
|
+
setTimestamp(timestamp?: Date | string | number): this;
|
|
44
|
+
/** Sets the embed footer. @param text Footer text (max 2048 chars). @param iconURL Optional footer icon URL. */
|
|
45
|
+
setFooter(text: string, iconURL?: string): this;
|
|
46
|
+
/** Sets the embed image. @param url Image URL. */
|
|
47
|
+
setImage(url: string): this;
|
|
48
|
+
/** Sets the embed thumbnail. @param url Thumbnail URL. */
|
|
49
|
+
setThumbnail(url: string): this;
|
|
50
|
+
/** Sets the embed author. @param name Author name (max 256 chars). @param options Optional URL and icon URL. */
|
|
51
|
+
setAuthor(name: string, options?: {
|
|
52
|
+
url?: string;
|
|
53
|
+
iconURL?: string;
|
|
54
|
+
}): this;
|
|
55
|
+
/** Adds one or more fields to the embed. @param fields Fields to add (max 25 total). @throws {TypeError} If adding exceeds 25 fields. */
|
|
56
|
+
addFields(...fields: APIEmbedField[]): this;
|
|
57
|
+
/** Removes all fields from the embed. */
|
|
58
|
+
clearFields(): this;
|
|
59
|
+
/** Splices the fields array, replacing, inserting, or deleting fields. @param index Start index. @param deleteCount Number of fields to remove. @param fields Replacement fields. */
|
|
60
|
+
spliceFields(index: number, deleteCount: number, ...fields: APIEmbedField[]): this;
|
|
61
|
+
/** Returns the raw Discord API embed payload. */
|
|
62
|
+
toJSON(): APIEmbed;
|
|
63
|
+
/** Creates an Embed from an existing raw API embed object. */
|
|
64
|
+
static from(data: APIEmbed): Embed;
|
|
65
|
+
}
|
|
@@ -1,39 +1,87 @@
|
|
|
1
|
+
/** Resource structures for Discord messages and related entities. */
|
|
1
2
|
import { BaseStructure, Channel, User } from "./base.js";
|
|
2
3
|
import type { ResourceContext } from "./base.js";
|
|
3
|
-
/** Common Discord structure exports. */
|
|
4
4
|
export { BaseStructure, Channel, Guild, User } from "./base.js";
|
|
5
5
|
export type { ResourceContext } from "./base.js";
|
|
6
|
-
/** Represents a Discord message. */
|
|
7
6
|
export declare class Message extends BaseStructure {
|
|
8
7
|
#private;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
/** Message creation
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
8
|
+
content: string;
|
|
9
|
+
author: User;
|
|
10
|
+
channelId: string;
|
|
11
|
+
readonly channel: Channel;
|
|
12
|
+
guildId?: string;
|
|
13
|
+
flags: number;
|
|
14
|
+
/** Message creation timestamp (from timestamp field or snowflake). */
|
|
15
|
+
readonly timestamp: Date;
|
|
16
|
+
readonly attachments: import("@lunibee/types").APIAttachment[];
|
|
17
|
+
readonly embeds: import("@lunibee/types").APIEmbed[];
|
|
18
|
+
readonly mentions: User[];
|
|
19
|
+
readonly mentionRoles: string[];
|
|
20
|
+
pinned: boolean;
|
|
21
|
+
mentionEveryone: boolean;
|
|
22
|
+
type: number;
|
|
23
|
+
readonly reference?: import("@lunibee/types").APIMessageReference;
|
|
24
|
+
readonly components: import("@lunibee/types").APIMessageComponent[];
|
|
25
|
+
readonly referencedMessage?: Message | null;
|
|
26
|
+
/** Creates a message structure from Discord message data. */
|
|
26
27
|
constructor(data: import("@lunibee/types").APIMessage, context?: ResourceContext);
|
|
27
|
-
/** Whether embeds are suppressed
|
|
28
|
-
|
|
28
|
+
/** Whether embeds are suppressed on this message. */
|
|
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;
|
|
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. */
|
|
37
|
+
edit(options: Record<string, unknown> & {
|
|
29
38
|
content?: string;
|
|
30
39
|
}): Promise<Message>;
|
|
31
|
-
/**
|
|
32
|
-
|
|
33
|
-
/** Replies in this message's channel, auto-populating message_reference. @param options Message content or payload. @returns Created reply. @throws {Error} If detached from a client. */ reply(options: string | {
|
|
40
|
+
/** Updates this message using the same resource operation as edit. @param options Message fields to change. @returns The updated message. @throws {Error} If the message is not attached to a client. */
|
|
41
|
+
update(options: Record<string, unknown> & {
|
|
34
42
|
content?: string;
|
|
35
|
-
[key: string]: unknown;
|
|
36
43
|
}): Promise<Message>;
|
|
44
|
+
/** Deletes this message. @returns A promise fulfilled when Discord confirms deletion. @throws {Error} If the message is not attached to a client. */
|
|
45
|
+
delete(): Promise<void>;
|
|
46
|
+
/** Replies to this message. @param options Message content or payload. @returns The created reply message. @throws {Error} If the message is not attached to a client. */
|
|
47
|
+
reply(options: string | (Record<string, unknown> & {
|
|
48
|
+
content?: string;
|
|
49
|
+
})): Promise<Message>;
|
|
50
|
+
/** Crossposts this message. @returns The resulting message. @throws {Error} If the message is not attached to a client. */
|
|
51
|
+
crosspost(): Promise<Message>;
|
|
52
|
+
/** Adds a reaction to this message. @param emoji Emoji identifier. @returns A promise fulfilled when the reaction is added. @throws {Error} If reactions are unavailable. */
|
|
53
|
+
react(emoji: string): Promise<void>;
|
|
54
|
+
/** Removes a reaction from this message. @param emoji Emoji identifier. @param userId User whose reaction should be removed; omit to remove the current user's reaction. @returns A promise fulfilled when the reaction is removed. @throws {Error} If reaction operations are unavailable. */
|
|
55
|
+
removeReaction(emoji: string, userId?: string): Promise<void>;
|
|
56
|
+
/** Removes all reactions from this message. @returns A promise fulfilled when reactions are removed. @throws {Error} If reaction operations are unavailable. */
|
|
57
|
+
removeAllReactions(): Promise<void>;
|
|
58
|
+
/** Pins this message. @returns A promise fulfilled when the message is pinned. @throws {Error} If pin operations are unavailable. */
|
|
59
|
+
pin(): Promise<void>;
|
|
60
|
+
/** Unpins this message. @returns A promise fulfilled when the message is unpinned. @throws {Error} If pin operations are unavailable. */
|
|
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>;
|
|
37
82
|
}
|
|
38
|
-
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";
|
|
39
84
|
export * from "./interactions.js";
|
|
85
|
+
export { Embed } from "./embed.js";
|
|
86
|
+
export { AuditLog, AuditLogEntry } from "./audit-log.js";
|
|
87
|
+
export { PermissionsBitField } from "@lunibee/core";
|