lunibee 0.2.2 → 0.2.4

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 (70) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +225 -225
  3. package/dist/builders/attachment.d.ts +10 -2
  4. package/dist/builders/commands.d.ts +161 -101
  5. package/dist/builders/components.d.ts +54 -75
  6. package/dist/builders/embed.d.ts +68 -35
  7. package/dist/builders/index.d.ts +1 -1
  8. package/dist/builders/index.js +108 -133
  9. package/dist/builders/index.js.map +8 -8
  10. package/dist/collection/cache.d.ts +13 -6
  11. package/dist/collection/index.d.ts +90 -17
  12. package/dist/collection/index.js +442 -266
  13. package/dist/collection/index.js.map +4 -4
  14. package/dist/core/index.d.ts +9 -0
  15. package/dist/core/index.js +791 -436
  16. package/dist/core/index.js.map +47 -47
  17. package/dist/core/permissions.d.ts +9 -5
  18. package/dist/formatters/index.js +9 -5
  19. package/dist/formatters/index.js.map +3 -3
  20. package/dist/handlers/index.js +5 -10
  21. package/dist/handlers/index.js.map +3 -3
  22. package/dist/index.js +1010 -679
  23. package/dist/index.js.map +66 -65
  24. package/dist/managers/base.d.ts +26 -14
  25. package/dist/managers/emoji.d.ts +7 -1
  26. package/dist/managers/guild-resources.d.ts +11 -3
  27. package/dist/managers/guild.d.ts +13 -5
  28. package/dist/managers/index.d.ts +28 -14
  29. package/dist/managers/index.js +580 -340
  30. package/dist/managers/index.js.map +26 -26
  31. package/dist/managers/member.d.ts +5 -3
  32. package/dist/managers/message.d.ts +7 -3
  33. package/dist/managers/role.d.ts +13 -1
  34. package/dist/rest/error-codes.d.ts +48 -0
  35. package/dist/rest/errors.d.ts +14 -6
  36. package/dist/rest/index.d.ts +25 -12
  37. package/dist/rest/index.js +105 -18
  38. package/dist/rest/index.js.map +15 -14
  39. package/dist/rest/redis.d.ts +1 -1
  40. package/dist/rest/route.d.ts +8 -4
  41. package/dist/rest/routes.d.ts +102 -46
  42. package/dist/rest/transport.d.ts +10 -5
  43. package/dist/rest/webhook.d.ts +9 -5
  44. package/dist/sharding/bus.d.ts +34 -17
  45. package/dist/sharding/index.d.ts +34 -17
  46. package/dist/sharding/index.js +68 -36
  47. package/dist/sharding/index.js.map +17 -17
  48. package/dist/structures/base.d.ts +28 -10
  49. package/dist/structures/channels.d.ts +28 -14
  50. package/dist/structures/index.d.ts +6 -6
  51. package/dist/structures/index.js +81 -99
  52. package/dist/structures/index.js.map +19 -18
  53. package/dist/structures/interactions.d.ts +98 -50
  54. package/dist/structures/resources.d.ts +90 -46
  55. package/dist/types/gateway.d.ts +1 -1
  56. package/dist/types/index.d.ts +43 -18
  57. package/dist/types/index.js +20 -22
  58. package/dist/types/index.js.map +4 -4
  59. package/dist/utils/index.js.map +2 -2
  60. package/dist/voice/index.d.ts +12 -4
  61. package/dist/voice/index.js +17 -20
  62. package/dist/voice/index.js.map +3 -3
  63. package/dist/ws/decoder.d.ts +6 -2
  64. package/dist/ws/index.d.ts +25 -13
  65. package/dist/ws/index.js +63 -31
  66. package/dist/ws/index.js.map +14 -14
  67. package/dist/ws/protocol.d.ts +10 -2
  68. package/dist/ws/session.d.ts +14 -4
  69. package/dist/ws/state.d.ts +22 -11
  70. package/package.json +16 -15
package/LICENSE CHANGED
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Ekretos
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Ekretos
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,225 +1,225 @@
1
- # Lunibee 🐝
2
-
3
- [![npm version](https://badge.fury.io/js/lunibee.svg)](https://www.npmjs.com/package/lunibee)
4
- [![NPM Downloads](https://img.shields.io/npm/dt/lunibee.svg?style=flat-square)](https://www.npmjs.com/package/lunibee)
5
- [![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?style=flat-square&logo=discord&logoColor=white)](https://discord.gg/SSADgyBpgw)
6
-
7
- [![NPM Graph](https://nodei.co/npm/lunibee.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/lunibee)
8
-
9
- A lightweight, Bun-first Discord API library for TypeScript.
10
-
11
- ## Requirements
12
-
13
- - [Bun](https://bun.sh/) for the supported runtime and package manager
14
- - TypeScript for typed application development
15
- - A Discord bot token for connecting to Discord
16
-
17
- ## Installation
18
-
19
- For repository development:
20
-
21
- ```bash
22
- bun install
23
- ```
24
-
25
- For application usage, install the published `lunibee` package when a release is available:
26
-
27
- ```bash
28
- bun add lunibee
29
- ```
30
-
31
- ## Documentation
32
-
33
- Full documentation, practical guides, and API references are available at **[lunibee.js.org](https://lunibee.js.org)**.
34
-
35
- ## Getting started
36
-
37
- ```ts
38
- import { Client, GatewayIntentBits } from "lunibee";
39
-
40
- const client = new Client({
41
- token: process.env.DISCORD_TOKEN!,
42
- intents: GatewayIntentBits.Guilds | GatewayIntentBits.GuildMessages
43
- });
44
-
45
- client.on("ready", user => {
46
- console.log(`Ready as ${user.username}`);
47
- });
48
-
49
- client.on("messageCreate", message => {
50
- console.log(message.content);
51
- });
52
-
53
- await client.login();
54
- ```
55
-
56
- Destroy the client when the application is shutting down:
57
-
58
- ```ts
59
- client.destroy();
60
- ```
61
-
62
- ## Client
63
-
64
- `Client` is the main application entry point. It coordinates the REST transport, resource managers, Gateway, event dispatch, interactions, and lifecycle state.
65
-
66
- ### Lifecycle
67
-
68
- ```text
69
- idle → connecting → ready
70
- ↑ ↓
71
- └──── reconnect ──┘
72
-
73
- ready → destroyed
74
- ```
75
-
76
- Useful APIs include:
77
-
78
- - `client.login()` — authenticate and connect to Discord.
79
- - `client.isReady()` — type guard for a ready client.
80
- - `client.destroy()` — close the Gateway and clear client-managed resources.
81
- - `client.rest` — access the REST transport.
82
- - `client.users`, `client.guilds`, `client.channels` — resource managers.
83
-
84
- ## Gateway
85
-
86
- The Gateway package implements the Discord WebSocket lifecycle:
87
-
88
- ```text
89
- CONNECT → HELLO → IDENTIFY/RESUME → READY → DISPATCH
90
- ↘ HEARTBEAT / ACK
91
- ↓
92
- RECONNECT
93
- ```
94
-
95
- The Gateway tracks sequence numbers and sessions, handles Discord resume URLs, heartbeat acknowledgement timeouts, invalid sessions, server reconnect requests, and stale/zombie connections.
96
-
97
- ```ts
98
- import { Gateway } from "@lunibee/ws";
99
-
100
- const gateway = new Gateway({
101
- token: process.env.DISCORD_TOKEN!,
102
- intents: 513
103
- });
104
-
105
- await gateway.connect();
106
- ```
107
-
108
- ## REST
109
-
110
- The REST client supports Discord bucket-aware rate limiting and retries. It consumes Discord's rate-limit headers including bucket identifiers, remaining requests, reset information, and `Retry-After`.
111
-
112
- Requests accept an `AbortSignal`:
113
-
114
- ```ts
115
- const controller = new AbortController();
116
-
117
- const request = client.rest.get("/users/@me", {
118
- signal: controller.signal
119
- });
120
-
121
- controller.abort();
122
- await request;
123
- ```
124
-
125
- `RESTError` includes HTTP status, Discord error code, method, path, and the raw error payload when available.
126
-
127
- ## Structures and caching
128
-
129
- Resource managers maintain canonical instances by Discord resource ID. Re-resolving an already cached resource returns the same structure instance, allowing identity-sensitive application code to remain consistent.
130
-
131
- REST-created and Gateway-updated resources are routed through manager cache mutation APIs so the same resource is not represented by unrelated structure instances.
132
-
133
- Discord resources are stored with `Collection.setWithoutTTL()` and leave the cache only through Gateway delete events or an explicit `delete()`, never through expiry. Messages are cached only with the `messageCache: { maxSize?, ttl? }` client option, and `cache: { users, members, roles, emojis }` turns off per-resource caching on large bots. For your own data, `new Collection(null, { ttl, maxSize, onEvict })` is a TTL/LRU cache. See the [0.2.0 upgrade guide](https://lunibee.js.org/getting-started/upgrading/).
134
-
135
- ## Permissions
136
-
137
- `PermissionSet` provides named and raw permission checks:
138
-
139
- ```ts
140
- if (member.permissions.has(Permission.manageMessages)) {
141
- // permitted
142
- }
143
- ```
144
-
145
- Multiple permissions can be checked together, and immutable `add()` / `remove()` operations return a new bitfield.
146
-
147
- ## Interactions
148
-
149
- Interactions expose an ergonomic acknowledgement lifecycle:
150
-
151
- ```ts
152
- if (interaction.isChatInputCommand()) {
153
- await interaction.deferReply();
154
- await interaction.editReply({ content: "Done!" });
155
- await interaction.followUp({ content: "Follow-up" });
156
- }
157
- ```
158
-
159
- Available lifecycle methods include `reply()`, `deferReply()`, `editReply()`, `deleteReply()`, and `followUp()`.
160
-
161
- ## Builders
162
-
163
- Lunibee provides strict builders for Discord payloads (Discord.js V2 compatible), including:
164
-
165
- - `CreateActionRow`
166
- - `CreateButton`
167
- - `CreateStringSelect`
168
- - `CreateEmbed`
169
- - `CreateModal`
170
- - `CreateTextInput`
171
-
172
- Builders validate Discord limits before serialization and expose typed `toJSON()` payloads.
173
-
174
- ## Sharding
175
-
176
- `@lunibee/sharding` manages multiple Gateway connections and supports explicit shard counts or Discord's recommended shard count.
177
-
178
- ```ts
179
- import { ShardManager } from "@lunibee/sharding";
180
-
181
- const shards = new ShardManager({
182
- token: process.env.DISCORD_TOKEN!,
183
- intents: 513,
184
- shardCount: "auto"
185
- });
186
-
187
- await shards.connect();
188
- ```
189
-
190
- Call `destroy()` during shutdown. The manager releases its Gateway instances and can initialize a fresh shard set on a later `connect()`.
191
-
192
- ## Package layout
193
-
194
- The monorepo is organized into focused packages:
195
-
196
- | Package | Responsibility |
197
- | --- | --- |
198
- | `@lunibee/types` | Discord API and shared TypeScript types |
199
- | `@lunibee/structures` | Discord resource and interaction structures |
200
- | `@lunibee/managers` | Resource caches and REST-backed managers |
201
- | `@lunibee/rest` | HTTP transport, routes, rate limits, retries |
202
- | `@lunibee/ws` | Discord Gateway connection |
203
- | `@lunibee/core` | Main client and high-level orchestration |
204
- | `@lunibee/builders` | Typed Discord payload builders |
205
- | `@lunibee/sharding` | Multi-Gateway shard management |
206
- | `lunibee` | End-user package entry point |
207
-
208
- ## Development
209
-
210
- Run the repository's checks before submitting changes:
211
-
212
- ```bash
213
- bun install
214
- bunx tsc --noEmit
215
- ```
216
-
217
- ## Documentation & API Reference
218
-
219
- The full, official API reference and practical guides are available at **[lunibee.js.org](https://lunibee.js.org)**.
220
-
221
- The source remains the authoritative API surface while Lunibee is pre-1.0. Public exports are intentionally split by responsibility so applications can import either the high-level `lunibee` package or individual packages when appropriate.
222
-
223
- ## Status
224
-
225
- Lunibee is in active development and the API may change before the first stable release.
1
+ # Lunibee 🐝
2
+
3
+ [![npm version](https://badge.fury.io/js/lunibee.svg)](https://www.npmjs.com/package/lunibee)
4
+ [![NPM Downloads](https://img.shields.io/npm/dt/lunibee.svg?style=flat-square)](https://www.npmjs.com/package/lunibee)
5
+ [![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?style=flat-square&logo=discord&logoColor=white)](https://discord.gg/SSADgyBpgw)
6
+
7
+ [![NPM Graph](https://nodei.co/npm/lunibee.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/lunibee)
8
+
9
+ A lightweight, Bun-first Discord API library for TypeScript.
10
+
11
+ ## Requirements
12
+
13
+ - [Bun](https://bun.sh/) for the supported runtime and package manager
14
+ - TypeScript for typed application development
15
+ - A Discord bot token for connecting to Discord
16
+
17
+ ## Installation
18
+
19
+ For repository development:
20
+
21
+ ```bash
22
+ bun install
23
+ ```
24
+
25
+ For application usage, install the published `lunibee` package when a release is available:
26
+
27
+ ```bash
28
+ bun add lunibee
29
+ ```
30
+
31
+ ## Documentation
32
+
33
+ Full documentation, practical guides, and API references are available at **[lunibee.js.org](https://lunibee.js.org)**.
34
+
35
+ ## Getting started
36
+
37
+ ```ts
38
+ import { Client, GatewayIntentBits } from "lunibee";
39
+
40
+ const client = new Client({
41
+ token: process.env.DISCORD_TOKEN!,
42
+ intents: GatewayIntentBits.Guilds | GatewayIntentBits.GuildMessages
43
+ });
44
+
45
+ client.on("ready", user => {
46
+ console.log(`Ready as ${user.username}`);
47
+ });
48
+
49
+ client.on("messageCreate", message => {
50
+ console.log(message.content);
51
+ });
52
+
53
+ await client.login();
54
+ ```
55
+
56
+ Destroy the client when the application is shutting down:
57
+
58
+ ```ts
59
+ client.destroy();
60
+ ```
61
+
62
+ ## Client
63
+
64
+ `Client` is the main application entry point. It coordinates the REST transport, resource managers, Gateway, event dispatch, interactions, and lifecycle state.
65
+
66
+ ### Lifecycle
67
+
68
+ ```text
69
+ idle → connecting → ready
70
+ ↑ ↓
71
+ └──── reconnect ──┘
72
+
73
+ ready → destroyed
74
+ ```
75
+
76
+ Useful APIs include:
77
+
78
+ - `client.login()` — authenticate and connect to Discord.
79
+ - `client.isReady()` — type guard for a ready client.
80
+ - `client.destroy()` — close the Gateway and clear client-managed resources.
81
+ - `client.rest` — access the REST transport.
82
+ - `client.users`, `client.guilds`, `client.channels` — resource managers.
83
+
84
+ ## Gateway
85
+
86
+ The Gateway package implements the Discord WebSocket lifecycle:
87
+
88
+ ```text
89
+ CONNECT → HELLO → IDENTIFY/RESUME → READY → DISPATCH
90
+ ↘ HEARTBEAT / ACK
91
+ ↓
92
+ RECONNECT
93
+ ```
94
+
95
+ The Gateway tracks sequence numbers and sessions, handles Discord resume URLs, heartbeat acknowledgement timeouts, invalid sessions, server reconnect requests, and stale/zombie connections.
96
+
97
+ ```ts
98
+ import { Gateway } from "@lunibee/ws";
99
+
100
+ const gateway = new Gateway({
101
+ token: process.env.DISCORD_TOKEN!,
102
+ intents: 513
103
+ });
104
+
105
+ await gateway.connect();
106
+ ```
107
+
108
+ ## REST
109
+
110
+ The REST client supports Discord bucket-aware rate limiting and retries. It consumes Discord's rate-limit headers including bucket identifiers, remaining requests, reset information, and `Retry-After`.
111
+
112
+ Requests accept an `AbortSignal`:
113
+
114
+ ```ts
115
+ const controller = new AbortController();
116
+
117
+ const request = client.rest.get("/users/@me", {
118
+ signal: controller.signal
119
+ });
120
+
121
+ controller.abort();
122
+ await request;
123
+ ```
124
+
125
+ `RESTError` includes HTTP status, Discord error code, method, path, and the raw error payload when available.
126
+
127
+ ## Structures and caching
128
+
129
+ Resource managers maintain canonical instances by Discord resource ID. Re-resolving an already cached resource returns the same structure instance, allowing identity-sensitive application code to remain consistent.
130
+
131
+ REST-created and Gateway-updated resources are routed through manager cache mutation APIs so the same resource is not represented by unrelated structure instances.
132
+
133
+ Discord resources are stored with `Collection.setWithoutTTL()` and leave the cache only through Gateway delete events or an explicit `delete()`, never through expiry. Messages are cached only with the `messageCache: { maxSize?, ttl? }` client option, and `cache: { users, members, roles, emojis }` turns off per-resource caching on large bots. For your own data, `new Collection(null, { ttl, maxSize, onEvict })` is a TTL/LRU cache. See the [0.2.0 upgrade guide](https://lunibee.js.org/getting-started/upgrading/).
134
+
135
+ ## Permissions
136
+
137
+ `PermissionSet` provides named and raw permission checks:
138
+
139
+ ```ts
140
+ if (member.permissions.has(Permission.manageMessages)) {
141
+ // permitted
142
+ }
143
+ ```
144
+
145
+ Multiple permissions can be checked together, and immutable `add()` / `remove()` operations return a new bitfield.
146
+
147
+ ## Interactions
148
+
149
+ Interactions expose an ergonomic acknowledgement lifecycle:
150
+
151
+ ```ts
152
+ if (interaction.isChatInputCommand()) {
153
+ await interaction.deferReply();
154
+ await interaction.editReply({ content: "Done!" });
155
+ await interaction.followUp({ content: "Follow-up" });
156
+ }
157
+ ```
158
+
159
+ Available lifecycle methods include `reply()`, `deferReply()`, `editReply()`, `deleteReply()`, and `followUp()`.
160
+
161
+ ## Builders
162
+
163
+ Lunibee provides strict builders for Discord payloads (Discord.js V2 compatible), including:
164
+
165
+ - `CreateActionRow`
166
+ - `CreateButton`
167
+ - `CreateStringSelect`
168
+ - `CreateEmbed`
169
+ - `CreateModal`
170
+ - `CreateTextInput`
171
+
172
+ Builders validate Discord limits before serialization and expose typed `toJSON()` payloads.
173
+
174
+ ## Sharding
175
+
176
+ `@lunibee/sharding` manages multiple Gateway connections and supports explicit shard counts or Discord's recommended shard count.
177
+
178
+ ```ts
179
+ import { ShardManager } from "@lunibee/sharding";
180
+
181
+ const shards = new ShardManager({
182
+ token: process.env.DISCORD_TOKEN!,
183
+ intents: 513,
184
+ shardCount: "auto"
185
+ });
186
+
187
+ await shards.connect();
188
+ ```
189
+
190
+ Call `destroy()` during shutdown. The manager releases its Gateway instances and can initialize a fresh shard set on a later `connect()`.
191
+
192
+ ## Package layout
193
+
194
+ The monorepo is organized into focused packages:
195
+
196
+ | Package | Responsibility |
197
+ | --- | --- |
198
+ | `@lunibee/types` | Discord API and shared TypeScript types |
199
+ | `@lunibee/structures` | Discord resource and interaction structures |
200
+ | `@lunibee/managers` | Resource caches and REST-backed managers |
201
+ | `@lunibee/rest` | HTTP transport, routes, rate limits, retries |
202
+ | `@lunibee/ws` | Discord Gateway connection |
203
+ | `@lunibee/core` | Main client and high-level orchestration |
204
+ | `@lunibee/builders` | Typed Discord payload builders |
205
+ | `@lunibee/sharding` | Multi-Gateway shard management |
206
+ | `lunibee` | End-user package entry point |
207
+
208
+ ## Development
209
+
210
+ Run the repository's checks before submitting changes:
211
+
212
+ ```bash
213
+ bun install
214
+ bunx tsc --noEmit
215
+ ```
216
+
217
+ ## Documentation & API Reference
218
+
219
+ The full, official API reference and practical guides are available at **[lunibee.js.org](https://lunibee.js.org)**.
220
+
221
+ The source remains the authoritative API surface while Lunibee is pre-1.0. Public exports are intentionally split by responsibility so applications can import either the high-level `lunibee` package or individual packages when appropriate.
222
+
223
+ ## Status
224
+
225
+ Lunibee is in active development and the API may change before the first stable release.
@@ -2,12 +2,20 @@ export interface AttachmentData {
2
2
  name: string;
3
3
  description?: string;
4
4
  file: Uint8Array | ArrayBuffer | Blob | Buffer | string;
5
+ /**
6
+ * Folder a string `file` must stay inside (symlinks included). Set it
7
+ * whenever the path is not one you wrote yourself, e.g. from a command
8
+ * option: without it, any readable file on the machine can be uploaded.
9
+ */
10
+ root?: string;
5
11
  }
6
12
  /** Builder for message attachments and file uploads. */
7
13
  export declare class CreateAttachment {
8
14
  name: string;
9
15
  description?: string;
10
16
  file: Uint8Array | ArrayBuffer | Blob | Buffer | string;
17
+ /** Folder a string `file` must stay inside; see {@link AttachmentData.root}. */
18
+ root?: string;
11
19
  constructor(file: Uint8Array | ArrayBuffer | Blob | Buffer | string, data?: Partial<Omit<AttachmentData, "file">> | string);
12
20
  /** Sets the attachment filename. */
13
21
  setName(name: string): this;
@@ -18,7 +26,7 @@ export declare class CreateAttachment {
18
26
  /** Resolves the attachment payload to a binary Uint8Array. */
19
27
  toBuffer(): Promise<Uint8Array>;
20
28
  }
21
- /** @deprecated Use {@link CreateAttachment}. Removed in 2.0. */
29
+ /** @deprecated Use {@link CreateAttachment}. Removed in 0.3.0. */
22
30
  export declare const AttachmentBuilder: typeof CreateAttachment;
23
- /** @deprecated Use {@link CreateAttachment}. Removed in 2.0. */
31
+ /** @deprecated Use {@link CreateAttachment}. Removed in 0.3.0. */
24
32
  export type AttachmentBuilder = CreateAttachment;