lunibee 0.1.4 → 0.1.6
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 +12 -23
- package/dist/builders/components.d.ts +108 -0
- package/dist/builders/index.d.ts +1 -1
- package/dist/builders/index.js +178 -2
- package/dist/builders/index.js.map +3 -3
- package/dist/collection/index.d.ts +6 -0
- package/dist/collection/index.js +33 -2
- package/dist/collection/index.js.map +4 -4
- package/dist/core/events.d.ts +67 -3
- package/dist/core/index.d.ts +120 -90
- package/dist/core/index.js +816 -1021
- package/dist/core/index.js.map +20 -21
- package/dist/formatters/index.js.map +1 -1
- package/dist/index.d.ts +5 -4
- package/dist/index.js +2215 -1392
- package/dist/index.js.map +29 -26
- package/dist/managers/guild.d.ts +30 -0
- package/dist/managers/index.d.ts +56 -75
- package/dist/managers/index.js +339 -48
- package/dist/managers/index.js.map +16 -12
- package/dist/managers/message.d.ts +7 -12
- package/dist/managers/user.d.ts +20 -0
- package/dist/rest/index.d.ts +83 -1
- package/dist/rest/index.js +48 -8
- package/dist/rest/index.js.map +4 -4
- package/dist/rest/routes.d.ts +4 -1
- package/dist/sharding/index.js +4 -1
- package/dist/sharding/index.js.map +4 -4
- package/dist/structures/base.d.ts +99 -48
- package/dist/structures/embed.d.ts +65 -0
- package/dist/structures/index.d.ts +45 -25
- package/dist/structures/index.js +569 -36
- package/dist/structures/index.js.map +10 -8
- package/dist/structures/interactions.d.ts +72 -17
- package/dist/structures/resources.d.ts +9 -5
- package/dist/types/index.d.ts +530 -85
- package/dist/types/index.js +71 -1
- package/dist/types/index.js.map +3 -3
- package/dist/voice/index.js.map +1 -1
- package/dist/ws/index.js +4 -1
- package/dist/ws/index.js.map +4 -4
- package/package.json +15 -15
|
@@ -1,39 +1,59 @@
|
|
|
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
|
+
/** 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
|
+
edit(options: Record<string, unknown> & {
|
|
29
32
|
content?: string;
|
|
30
33
|
}): 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 | {
|
|
34
|
+
/** 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. */
|
|
35
|
+
update(options: Record<string, unknown> & {
|
|
34
36
|
content?: string;
|
|
35
|
-
[key: string]: unknown;
|
|
36
37
|
}): Promise<Message>;
|
|
38
|
+
/** Deletes this message. @returns A promise fulfilled when Discord confirms deletion. @throws {Error} If the message is not attached to a client. */
|
|
39
|
+
delete(): Promise<void>;
|
|
40
|
+
/** 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. */
|
|
41
|
+
reply(options: string | (Record<string, unknown> & {
|
|
42
|
+
content?: string;
|
|
43
|
+
})): Promise<Message>;
|
|
44
|
+
/** Crossposts this message. @returns The resulting message. @throws {Error} If the message is not attached to a client. */
|
|
45
|
+
crosspost(): Promise<Message>;
|
|
46
|
+
/** 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. */
|
|
47
|
+
react(emoji: string): Promise<void>;
|
|
48
|
+
/** 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. */
|
|
49
|
+
removeReaction(emoji: string, userId?: string): Promise<void>;
|
|
50
|
+
/** Removes all reactions from this message. @returns A promise fulfilled when reactions are removed. @throws {Error} If reaction operations are unavailable. */
|
|
51
|
+
removeAllReactions(): Promise<void>;
|
|
52
|
+
/** Pins this message. @returns A promise fulfilled when the message is pinned. @throws {Error} If pin operations are unavailable. */
|
|
53
|
+
pin(): Promise<void>;
|
|
54
|
+
/** Unpins this message. @returns A promise fulfilled when the message is unpinned. @throws {Error} If pin operations are unavailable. */
|
|
55
|
+
unpin(): Promise<void>;
|
|
37
56
|
}
|
|
38
57
|
export { GuildMember, Role, TextChannel } from "./resources.js";
|
|
39
58
|
export * from "./interactions.js";
|
|
59
|
+
export { Embed } from "./embed.js";
|