lunibee 0.3.2 → 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.
- package/README.md +1 -1
- package/dist/builders/commands.d.ts +1 -1
- package/dist/builders/components.d.ts +9 -11
- package/dist/builders/embed.d.ts +1 -1
- package/dist/builders/index.d.ts +1 -1
- package/dist/builders/index.js +87 -1298
- package/dist/builders/index.js.map +3 -11
- package/dist/chunks/index-0wn81eng.js +2492 -0
- package/dist/chunks/index-0wn81eng.js.map +17 -0
- package/dist/chunks/index-2en489j6.js +40 -0
- package/dist/chunks/index-2en489j6.js.map +10 -0
- package/dist/chunks/index-3hyps48a.js +203 -0
- package/dist/chunks/index-3hyps48a.js.map +11 -0
- package/dist/chunks/index-57c5n3ms.js +2274 -0
- package/dist/chunks/index-57c5n3ms.js.map +19 -0
- package/dist/chunks/index-5yx92e36.js +1170 -0
- package/dist/chunks/index-5yx92e36.js.map +14 -0
- package/dist/chunks/index-690bp093.js +95 -0
- package/dist/chunks/index-690bp093.js.map +10 -0
- package/dist/chunks/index-7fp2hvmg.js +2155 -0
- package/dist/chunks/index-7fp2hvmg.js.map +24 -0
- package/dist/chunks/index-cnmsajvk.js +1119 -0
- package/dist/chunks/index-cnmsajvk.js.map +12 -0
- package/dist/chunks/index-fdvgk2sw.js +1310 -0
- package/dist/chunks/index-fdvgk2sw.js.map +21 -0
- package/dist/chunks/index-gyvps8b9.js +214 -0
- package/dist/chunks/index-gyvps8b9.js.map +12 -0
- package/dist/chunks/index-jzg4bh99.js +1533 -0
- package/dist/chunks/index-jzg4bh99.js.map +21 -0
- package/dist/chunks/index-mgw2yvrm.js +3547 -0
- package/dist/chunks/index-mgw2yvrm.js.map +25 -0
- package/dist/chunks/index-yh76b55h.js +3449 -0
- package/dist/chunks/index-yh76b55h.js.map +29 -0
- package/dist/collection/index.js +9 -1118
- package/dist/collection/index.js.map +3 -6
- package/dist/core/api.d.ts +3 -3
- package/dist/core/channel-create.d.ts +2 -2
- package/dist/core/commands.d.ts +3 -3
- package/dist/core/events.d.ts +4 -4
- package/dist/core/handles.d.ts +4 -4
- package/dist/core/index.d.ts +25 -20
- package/dist/core/index.js +68 -10118
- package/dist/core/index.js.map +3 -65
- package/dist/core/permissions.d.ts +1 -1
- package/dist/core/redis-cache.d.ts +1 -1
- package/dist/formatters/index.js +41 -110
- package/dist/formatters/index.js.map +3 -4
- package/dist/handlers/index.js +5 -37
- package/dist/handlers/index.js.map +3 -4
- package/dist/index.d.ts +21 -21
- package/dist/index.js +642 -15961
- package/dist/index.js.map +3 -90
- package/dist/managers/advanced.d.ts +3 -3
- package/dist/managers/application.d.ts +2 -2
- package/dist/managers/base.d.ts +8 -1
- package/dist/managers/emoji.d.ts +2 -2
- package/dist/managers/guild-resources.d.ts +6 -6
- package/dist/managers/guild.d.ts +3 -3
- package/dist/managers/index.d.ts +4 -8
- package/dist/managers/index.js +51 -4048
- package/dist/managers/index.js.map +3 -29
- package/dist/managers/member.d.ts +2 -2
- package/dist/managers/message.d.ts +14 -6
- package/dist/managers/role.d.ts +2 -2
- package/dist/managers/thread.d.ts +3 -3
- package/dist/managers/user.d.ts +7 -4
- package/dist/rest/index.d.ts +10 -35
- package/dist/rest/index.js +57 -2179
- package/dist/rest/index.js.map +3 -18
- package/dist/rest/limiter.d.ts +9 -1
- package/dist/rest/webhook.d.ts +2 -8
- package/dist/sharding/bus.d.ts +2 -2
- package/dist/sharding/cluster.d.ts +73 -5
- package/dist/sharding/context.d.ts +45 -3
- package/dist/sharding/gateway-bot.d.ts +2 -1
- package/dist/sharding/health.d.ts +1 -1
- package/dist/sharding/host.d.ts +7 -2
- package/dist/sharding/identify.d.ts +12 -0
- package/dist/sharding/index.d.ts +46 -11
- package/dist/sharding/index.js +60 -4272
- package/dist/sharding/index.js.map +3 -31
- package/dist/sharding/leader.d.ts +34 -0
- package/dist/sharding/remote.d.ts +18 -0
- package/dist/sharding/supervisor.d.ts +4 -2
- package/dist/sharding/thread.d.ts +30 -0
- package/dist/structures/audit-log.d.ts +1 -1
- package/dist/structures/base.d.ts +6 -6
- package/dist/structures/channels.d.ts +1 -1
- package/dist/structures/embed.d.ts +1 -1
- package/dist/structures/index.d.ts +14 -14
- package/dist/structures/index.js +109 -2382
- package/dist/structures/index.js.map +3 -16
- package/dist/structures/interactions.d.ts +13 -9
- package/dist/structures/options.d.ts +1 -1
- package/dist/structures/permissions.d.ts +2 -2
- package/dist/structures/resources.d.ts +10 -10
- package/dist/structures/sticker.d.ts +1 -1
- package/dist/types/gateway.d.ts +2 -79
- package/dist/types/index.d.ts +0 -6
- package/dist/types/index.js +41 -272
- package/dist/types/index.js.map +3 -6
- package/dist/utils/index.js +23 -209
- package/dist/utils/index.js.map +3 -5
- package/dist/voice/connection.d.ts +200 -0
- package/dist/voice/crypto.d.ts +50 -0
- package/dist/voice/dave.d.ts +85 -0
- package/dist/voice/effects.d.ts +31 -0
- package/dist/voice/emitter.d.ts +14 -0
- package/dist/voice/gateway.d.ts +59 -0
- package/dist/voice/index.d.ts +25 -228
- package/dist/voice/index.js +111 -442
- package/dist/voice/index.js.map +3 -4
- package/dist/voice/libopus.d.ts +88 -0
- package/dist/voice/networking.d.ts +80 -0
- package/dist/voice/ogg.d.ts +24 -0
- package/dist/voice/opus.d.ts +18 -0
- package/dist/voice/player.d.ts +79 -0
- package/dist/voice/protocol.d.ts +76 -0
- package/dist/voice/receiver.d.ts +59 -0
- package/dist/voice/resource.d.ts +102 -0
- package/dist/voice/udp.d.ts +40 -0
- package/dist/ws/close-codes.d.ts +1 -1
- package/dist/ws/index.d.ts +25 -4
- package/dist/ws/index.js +47 -1336
- package/dist/ws/index.js.map +3 -17
- package/dist/ws/protocol.d.ts +1 -1
- package/dist/ws/send-budget.d.ts +0 -2
- package/dist/ws/state.d.ts +0 -10
- package/package.json +20 -16
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Leadership between several coordinators, so a standby `ClusterManager` can
|
|
3
|
+
* take over when the active one dies. Only the holder of the lock runs
|
|
4
|
+
* clusters; see `ClusterManagerOptions.leader`.
|
|
5
|
+
*/
|
|
6
|
+
export interface LeaderLock {
|
|
7
|
+
/**
|
|
8
|
+
* Takes the lock for `ttlMs`, or extends it when this process already
|
|
9
|
+
* holds it. Resolves `true` while this process is the leader, `false` when
|
|
10
|
+
* another one holds it. A rejection counts as "unknown".
|
|
11
|
+
*/
|
|
12
|
+
acquire(ttlMs: number): Promise<boolean>;
|
|
13
|
+
/** Gives the lock up if this process holds it. */
|
|
14
|
+
release(): Promise<void>;
|
|
15
|
+
}
|
|
16
|
+
/** The part of a Redis client the lock uses. `Bun.RedisClient` works as it is; for ioredis pass `{ send: (c, a) => redis.call(c, ...a) }`. */
|
|
17
|
+
export interface LeaderRedisClient {
|
|
18
|
+
send(command: string, args: string[]): Promise<unknown>;
|
|
19
|
+
}
|
|
20
|
+
/** Options for {@link RedisLeaderLock}. */
|
|
21
|
+
export interface RedisLeaderLockOptions {
|
|
22
|
+
client: LeaderRedisClient;
|
|
23
|
+
/** The key every coordinator of one deployment shares. Default `lunibee:cluster:leader`. */
|
|
24
|
+
key?: string;
|
|
25
|
+
/** This coordinator's identity in the key. Default: a random UUID. Must differ between coordinators. */
|
|
26
|
+
token?: string;
|
|
27
|
+
}
|
|
28
|
+
/** A {@link LeaderLock} on one Redis key, with an expiry so a dead leader's lock lapses on its own. */
|
|
29
|
+
export declare class RedisLeaderLock implements LeaderLock {
|
|
30
|
+
#private;
|
|
31
|
+
constructor(options: RedisLeaderLockOptions);
|
|
32
|
+
acquire(ttlMs: number): Promise<boolean>;
|
|
33
|
+
release(): Promise<void>;
|
|
34
|
+
}
|
|
@@ -62,6 +62,14 @@ export interface RemoteOptions {
|
|
|
62
62
|
clientAddress?: (request: Request, peer: string | undefined) => string;
|
|
63
63
|
/** Also run clusters on the coordinator's own machine. Default false: clusters run on the hosts only. */
|
|
64
64
|
local?: boolean;
|
|
65
|
+
/**
|
|
66
|
+
* When a host is lost, restart its clusters on the connected host (or
|
|
67
|
+
* `local`) running the fewest, once the lost host has certainly fenced
|
|
68
|
+
* itself (two leases after the coordinator dropped it). They stay there
|
|
69
|
+
* when the host comes back. Default true; `false` restarts them on the
|
|
70
|
+
* same host only, so they wait for it.
|
|
71
|
+
*/
|
|
72
|
+
moveClusters?: boolean;
|
|
65
73
|
}
|
|
66
74
|
/** A host as the coordinator sees it. */
|
|
67
75
|
export interface HostStatus {
|
|
@@ -115,6 +123,16 @@ export declare class RemoteHosts {
|
|
|
115
123
|
get port(): number | undefined;
|
|
116
124
|
/** Host IDs that are connected now, sorted. */
|
|
117
125
|
connected(): string[];
|
|
126
|
+
/** Whether `hostId` is connected now. */
|
|
127
|
+
isConnected(hostId: string): boolean;
|
|
128
|
+
/**
|
|
129
|
+
* When workers that ran on a lost host are certainly gone (epoch ms), or 0
|
|
130
|
+
* for a host that is connected or was never dropped. The host fences
|
|
131
|
+
* itself one lease after it last heard from the coordinator, checking
|
|
132
|
+
* every third of a lease; the coordinator sends nothing after the drop,
|
|
133
|
+
* and two leases leave room for the kill itself.
|
|
134
|
+
*/
|
|
135
|
+
fencedAt(hostId: string): number;
|
|
118
136
|
/** Opens the listener. Safe to call twice. */
|
|
119
137
|
start(): void;
|
|
120
138
|
/** Closes the listener and every host connection. */
|
|
@@ -8,9 +8,9 @@ export interface SupervisorOptions {
|
|
|
8
8
|
maxDelay?: number;
|
|
9
9
|
/** Random spread added to each delay, as a fraction of it (0-1, default 0). */
|
|
10
10
|
jitter?: number;
|
|
11
|
-
/** Give up after this many restarts
|
|
11
|
+
/** Give up after this many restarts without a stable `window` between them (default unlimited). */
|
|
12
12
|
maxRestarts?: number;
|
|
13
|
-
/**
|
|
13
|
+
/** How long a restarted cluster must run before its earlier crashes are forgiven (default 60,000). */
|
|
14
14
|
window?: number;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
@@ -27,6 +27,8 @@ export declare class ShardSupervisor {
|
|
|
27
27
|
* `maxRestarts` times inside `window`.
|
|
28
28
|
*/
|
|
29
29
|
next(id: number, now?: number): number | null;
|
|
30
|
+
/** Restarts of a cluster since it last ran stably for a whole `window`. */
|
|
31
|
+
attempts(id: number): number;
|
|
30
32
|
/** Forgets a cluster's crashes, e.g. after a deliberate respawn. */
|
|
31
33
|
reset(id?: number): void;
|
|
32
34
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ChildProcess } from "node:child_process";
|
|
2
|
+
import { type ResourceLimits } from "node:worker_threads";
|
|
3
|
+
/** Options for {@link threadFork}. */
|
|
4
|
+
export interface ThreadForkOptions {
|
|
5
|
+
/** Heap limits for each cluster thread (`worker_threads` `resourceLimits`). */
|
|
6
|
+
resourceLimits?: ResourceLimits;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Runs each cluster as a worker thread of the manager's process instead of a
|
|
10
|
+
* forked process: pass it as `ClusterManager`'s `fork`. Threads start faster
|
|
11
|
+
* and use less memory; a crash that takes the process down (an out-of-memory
|
|
12
|
+
* abort, a native fault) takes every cluster with it. The worker script is the
|
|
13
|
+
* same: `ShardManager`, `ShardBus` and `ClusterWorker` find the parent through
|
|
14
|
+
* `parentPort`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function threadFork(options?: ThreadForkOptions): (script: string, env: Record<string, string | undefined>) => ChildProcess;
|
|
17
|
+
/** The parent link of a cluster thread: the part of `process` a worker uses. */
|
|
18
|
+
export interface ThreadEndpoint {
|
|
19
|
+
send(message: unknown): boolean;
|
|
20
|
+
on(event: string, listener: (...args: never[]) => void): ThreadEndpoint;
|
|
21
|
+
off(event: string, listener: (...args: never[]) => void): ThreadEndpoint;
|
|
22
|
+
}
|
|
23
|
+
/** The parent link when this code runs in a cluster thread started by {@link threadFork}, otherwise `undefined`. */
|
|
24
|
+
export declare function threadEndpoint(): ThreadEndpoint | undefined;
|
|
25
|
+
/** Wraps a message port as a worker endpoint. @internal */
|
|
26
|
+
export declare function portEndpoint(port: {
|
|
27
|
+
postMessage(message: unknown): void;
|
|
28
|
+
on(event: "message", listener: (frame: unknown) => void): unknown;
|
|
29
|
+
off(event: "message", listener: (frame: unknown) => void): unknown;
|
|
30
|
+
}): ThreadEndpoint;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseStructure } from "./base.js";
|
|
2
|
-
import type { APIAuditLog, APIAuditLogEntry, APIAuditLogChange, APIAuditLogOptions } from "
|
|
2
|
+
import type { APIAuditLog, APIAuditLogEntry, APIAuditLogChange, APIAuditLogOptions } from "../types/index.js";
|
|
3
3
|
/** What `info` holds for each action type that carries extra details (numbers are parsed from Discord's strings). */
|
|
4
4
|
export interface AuditLogInfoByType {
|
|
5
5
|
/** Overwrite created, updated or deleted: a role (`type` 0) or a member (`type` 1). */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ChannelKind, type MessageCreateOptions, type MessageEditOptions, type UnknownChannelKind } from "
|
|
1
|
+
import { type ChannelKind, type MessageCreateOptions, type MessageEditOptions, type UnknownChannelKind } from "../types/index.js";
|
|
2
2
|
import type { ChannelOfKind } from "./channels.js";
|
|
3
3
|
/** Common Discord snowflake-backed structure. */
|
|
4
4
|
export declare class BaseStructure {
|
|
@@ -42,7 +42,7 @@ export interface ResourceContext {
|
|
|
42
42
|
addMemberRole?(guildId: string, userId: string, roleId: string, reason?: string): Promise<void>;
|
|
43
43
|
removeMemberRole?(guildId: string, userId: string, roleId: string, reason?: string): Promise<void>;
|
|
44
44
|
/** Collects the client's interactions (a `Collector` over `interactionCreate`). Used by message and interaction collectors. */
|
|
45
|
-
collectInteractions?(options: import("
|
|
45
|
+
collectInteractions?(options: import("../core/index.js").CollectorOptions<import("./interactions.js").Interaction>): import("../core/index.js").Collector<string, import("./interactions.js").Interaction>;
|
|
46
46
|
editPermissionOverwrite?(channelId: string, targetId: string, changes: PermissionOverwriteChanges, options?: {
|
|
47
47
|
type?: 0 | 1;
|
|
48
48
|
reason?: string;
|
|
@@ -73,7 +73,7 @@ export declare class User extends BaseStructure {
|
|
|
73
73
|
system: boolean;
|
|
74
74
|
flags: number;
|
|
75
75
|
discriminator: string | null;
|
|
76
|
-
constructor(data: import("
|
|
76
|
+
constructor(data: import("../types/index.js").UserData);
|
|
77
77
|
/** Effective display name — global name, falling back to username. */
|
|
78
78
|
get displayName(): string;
|
|
79
79
|
/** Returns the user's avatar URL, or null if they have no avatar. */
|
|
@@ -96,7 +96,7 @@ export declare class Channel extends BaseStructure {
|
|
|
96
96
|
rateLimitPerUser?: number;
|
|
97
97
|
position?: number;
|
|
98
98
|
/** Role and member permission overwrites (empty for DMs and when not provided). */
|
|
99
|
-
permissionOverwrites: import("
|
|
99
|
+
permissionOverwrites: import("../types/index.js").APIOverwrite[];
|
|
100
100
|
/**
|
|
101
101
|
* A placeholder built from a message's `channel_id`, not from channel
|
|
102
102
|
* data: its `type`, `name`, `parentId` and `permissionOverwrites` are not
|
|
@@ -104,7 +104,7 @@ export declare class Channel extends BaseStructure {
|
|
|
104
104
|
*/
|
|
105
105
|
partial: boolean;
|
|
106
106
|
/** Creates a channel structure from Discord channel data. `options.partial` marks a placeholder. */
|
|
107
|
-
constructor(data: import("
|
|
107
|
+
constructor(data: import("../types/index.js").APIChannel, context?: ResourceContext, options?: {
|
|
108
108
|
partial?: boolean;
|
|
109
109
|
});
|
|
110
110
|
/** 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. */
|
|
@@ -207,7 +207,7 @@ export declare class Guild extends BaseStructure {
|
|
|
207
207
|
maxVideoChannelUsers?: number;
|
|
208
208
|
/** Whether the boost progress bar shows. */
|
|
209
209
|
premiumProgressBarEnabled: boolean;
|
|
210
|
-
constructor(data: import("
|
|
210
|
+
constructor(data: import("../types/index.js").APIGuild);
|
|
211
211
|
/** Returns the guild icon URL, or null if no icon is set. */
|
|
212
212
|
iconURL(options?: ImageURLOptions): string | null;
|
|
213
213
|
/** Returns the guild splash URL, or null if none. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Channel, User, type ResourceContext } from "./base.js";
|
|
2
2
|
import { TextChannel } from "./resources.js";
|
|
3
|
-
import type { APIChannel, APIForumTag, APIPartialEmoji, APIThreadMetadata } from "
|
|
3
|
+
import type { APIChannel, APIForumTag, APIPartialEmoji, APIThreadMetadata } from "../types/index.js";
|
|
4
4
|
/** A guild announcement (news) channel. */
|
|
5
5
|
export declare class NewsChannel extends TextChannel {
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedMedia } from "
|
|
1
|
+
import type { APIEmbed, APIEmbedAuthor, APIEmbedField, APIEmbedFooter, APIEmbedMedia } from "../types/index.js";
|
|
2
2
|
/**
|
|
3
3
|
* A rich Embed structure that wraps a Discord API embed object.
|
|
4
4
|
* Provides typed accessors and a fluent builder interface.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/** Resource structures for Discord messages and related entities. */
|
|
2
|
-
import type { MessageCreateOptions, MessageEditOptions } from "
|
|
2
|
+
import type { MessageCreateOptions, MessageEditOptions } from "../types/index.js";
|
|
3
3
|
import { BaseStructure, Channel, User } from "./base.js";
|
|
4
4
|
import { GuildMember } from "./resources.js";
|
|
5
5
|
import type { ComponentInteraction } from "./interactions.js";
|
|
6
|
-
import type { Collector, CollectorOptions } from "
|
|
6
|
+
import type { Collector, CollectorOptions } from "../core/index.js";
|
|
7
7
|
/** Options for {@link Message.createComponentCollector}. */
|
|
8
8
|
export interface ComponentCollectorOptions extends CollectorOptions<ComponentInteraction> {
|
|
9
9
|
/** Only this component type (2 button, 3 string select...). */
|
|
@@ -22,22 +22,22 @@ export declare class Message extends BaseStructure {
|
|
|
22
22
|
flags: number;
|
|
23
23
|
/** Message creation timestamp (from timestamp field or snowflake). */
|
|
24
24
|
readonly timestamp: Date;
|
|
25
|
-
readonly attachments: import("
|
|
26
|
-
readonly embeds: import("
|
|
25
|
+
readonly attachments: import("../types/index.js").APIAttachment[];
|
|
26
|
+
readonly embeds: import("../types/index.js").APIEmbed[];
|
|
27
27
|
readonly mentions: User[];
|
|
28
28
|
readonly mentionRoles: string[];
|
|
29
29
|
pinned: boolean;
|
|
30
30
|
mentionEveryone: boolean;
|
|
31
31
|
type: number;
|
|
32
|
-
readonly reference?: import("
|
|
33
|
-
readonly components: import("
|
|
32
|
+
readonly reference?: import("../types/index.js").APIMessageReference;
|
|
33
|
+
readonly components: import("../types/index.js").APIMessageComponent[];
|
|
34
34
|
readonly referencedMessage?: Message | null;
|
|
35
35
|
/** Stickers sent with the message (`sticker_items`). */
|
|
36
|
-
readonly stickers: import("
|
|
36
|
+
readonly stickers: import("../types/index.js").APIStickerItem[];
|
|
37
37
|
/** The poll, when the message is one. */
|
|
38
|
-
readonly poll: import("
|
|
38
|
+
readonly poll: import("../types/index.js").APIPoll | null;
|
|
39
39
|
/** For a forwarded message, the snapshot of the original. */
|
|
40
|
-
readonly messageSnapshots: import("
|
|
40
|
+
readonly messageSnapshots: import("../types/index.js").APIMessageSnapshot[];
|
|
41
41
|
/**
|
|
42
42
|
* The author as a guild member, on guild messages from the Gateway. Its
|
|
43
43
|
* `permissions` are computed from the cached roles; `member.kick()` and the
|
|
@@ -45,13 +45,13 @@ export declare class Message extends BaseStructure {
|
|
|
45
45
|
*/
|
|
46
46
|
member: GuildMember | null;
|
|
47
47
|
/** Creates a message structure from Discord message data. */
|
|
48
|
-
constructor(data: import("
|
|
48
|
+
constructor(data: import("../types/index.js").APIMessage, context?: ResourceContext);
|
|
49
49
|
/** Whether embeds are suppressed on this message. */
|
|
50
50
|
get embedsSuppressed(): boolean;
|
|
51
|
-
/** Unix timestamp (ms) at which the message was created
|
|
51
|
+
/** Unix timestamp (ms) at which the message was created.
|
|
52
52
|
* Derived from the message `timestamp`, which itself falls back to the id snowflake. */
|
|
53
53
|
get createdTimestamp(): number;
|
|
54
|
-
/** Date at which the message was created
|
|
54
|
+
/** Date at which the message was created. Overrides the
|
|
55
55
|
* snowflake-only `BaseStructure.createdAt` to honour the message `timestamp`. */
|
|
56
56
|
get createdAt(): Date;
|
|
57
57
|
/** Edits this message. @param options Message fields to change. @returns The updated message. @throws {Error} If the message is not attached to a client. */
|
|
@@ -93,8 +93,8 @@ export declare class Message extends BaseStructure {
|
|
|
93
93
|
get isEphemeral(): boolean;
|
|
94
94
|
/** Whether this message is currently pinned in its channel. */
|
|
95
95
|
get isPinned(): boolean;
|
|
96
|
-
/** Whether this is a system-generated message (join, boost, etc).
|
|
97
|
-
*
|
|
96
|
+
/** Whether this is a system-generated message (join, boost, etc).
|
|
97
|
+
* A message is "system" unless its type is one of the user-authored
|
|
98
98
|
* types — Default (0), Reply (19), ChatInputCommand (20) or ContextMenuCommand (23). */
|
|
99
99
|
get isSystemMessage(): boolean;
|
|
100
100
|
/** Whether this message was crossposted from an announcement channel. */
|