fluxer.ts 0.1.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 +169 -0
- package/dist/client.d.ts +154 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +260 -0
- package/dist/client.js.map +1 -0
- package/dist/gateway.d.ts +34 -0
- package/dist/gateway.d.ts.map +1 -0
- package/dist/gateway.js +175 -0
- package/dist/gateway.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/dist/rest.d.ts +43 -0
- package/dist/rest.d.ts.map +1 -0
- package/dist/rest.js +113 -0
- package/dist/rest.js.map +1 -0
- package/dist/routes.d.ts +51 -0
- package/dist/routes.d.ts.map +1 -0
- package/dist/routes.js +58 -0
- package/dist/routes.js.map +1 -0
- package/dist/types.d.ts +292 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +73 -0
- package/dist/types.js.map +1 -0
- package/package.json +40 -0
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/** Snowflake ID — 64-bit unsigned integer as string */
|
|
2
|
+
export type Snowflake = string;
|
|
3
|
+
/** Fluxer epoch: 2015-01-01 00:00:00 UTC */
|
|
4
|
+
export declare const FLUXER_EPOCH = 1420070400000;
|
|
5
|
+
export interface User {
|
|
6
|
+
id: Snowflake;
|
|
7
|
+
username: string;
|
|
8
|
+
discriminator: string;
|
|
9
|
+
global_name?: string | null;
|
|
10
|
+
avatar?: string | null;
|
|
11
|
+
avatar_color?: number | null;
|
|
12
|
+
flags?: number | null;
|
|
13
|
+
bot?: boolean;
|
|
14
|
+
system?: boolean;
|
|
15
|
+
banner?: string | null;
|
|
16
|
+
}
|
|
17
|
+
export declare enum ChannelType {
|
|
18
|
+
GuildText = 0,
|
|
19
|
+
DM = 1,
|
|
20
|
+
GuildVoice = 2,
|
|
21
|
+
GroupDM = 3,
|
|
22
|
+
GuildCategory = 4,
|
|
23
|
+
GuildLink = 5,
|
|
24
|
+
GuildLinkExtended = 998
|
|
25
|
+
}
|
|
26
|
+
export interface ChannelOverwrite {
|
|
27
|
+
id: Snowflake;
|
|
28
|
+
type: 0 | 1;
|
|
29
|
+
allow: string;
|
|
30
|
+
deny: string;
|
|
31
|
+
}
|
|
32
|
+
export interface Channel {
|
|
33
|
+
id: Snowflake;
|
|
34
|
+
type: ChannelType | number;
|
|
35
|
+
guild_id?: Snowflake | null;
|
|
36
|
+
name: string | null;
|
|
37
|
+
topic?: string | null;
|
|
38
|
+
url?: string | null;
|
|
39
|
+
position?: number;
|
|
40
|
+
parent_id: Snowflake | null;
|
|
41
|
+
bitrate?: number | null;
|
|
42
|
+
user_limit?: number | null;
|
|
43
|
+
last_message_id?: Snowflake | null;
|
|
44
|
+
permission_overwrites?: ChannelOverwrite[];
|
|
45
|
+
nsfw?: boolean;
|
|
46
|
+
rate_limit_per_user?: number;
|
|
47
|
+
recipients?: User[];
|
|
48
|
+
}
|
|
49
|
+
export interface Guild {
|
|
50
|
+
id: Snowflake;
|
|
51
|
+
name: string;
|
|
52
|
+
icon: string | null;
|
|
53
|
+
banner: string | null;
|
|
54
|
+
owner_id: Snowflake;
|
|
55
|
+
system_channel_id?: Snowflake | null;
|
|
56
|
+
rules_channel_id?: Snowflake | null;
|
|
57
|
+
afk_channel_id?: Snowflake | null;
|
|
58
|
+
afk_timeout: number;
|
|
59
|
+
features: string[];
|
|
60
|
+
verification_level: number;
|
|
61
|
+
mfa_level: number;
|
|
62
|
+
nsfw_level: number;
|
|
63
|
+
permissions?: string | null;
|
|
64
|
+
}
|
|
65
|
+
export interface GuildMember {
|
|
66
|
+
user: User;
|
|
67
|
+
nick?: string | null;
|
|
68
|
+
avatar?: string | null;
|
|
69
|
+
roles: Snowflake[];
|
|
70
|
+
joined_at: string;
|
|
71
|
+
mute?: boolean;
|
|
72
|
+
deaf?: boolean;
|
|
73
|
+
communication_disabled_until?: string | null;
|
|
74
|
+
premium_since?: string | null;
|
|
75
|
+
}
|
|
76
|
+
export interface Role {
|
|
77
|
+
id: Snowflake;
|
|
78
|
+
name: string;
|
|
79
|
+
color: number;
|
|
80
|
+
position: number;
|
|
81
|
+
permissions: string;
|
|
82
|
+
hoist: boolean;
|
|
83
|
+
mentionable: boolean;
|
|
84
|
+
unicode_emoji?: string | null;
|
|
85
|
+
}
|
|
86
|
+
export declare enum MessageType {
|
|
87
|
+
Default = 0,
|
|
88
|
+
RecipientAdd = 1,
|
|
89
|
+
RecipientRemove = 2,
|
|
90
|
+
Call = 3,
|
|
91
|
+
ChannelNameChange = 4,
|
|
92
|
+
ChannelIconChange = 5,
|
|
93
|
+
ChannelPinnedMessage = 6,
|
|
94
|
+
UserJoin = 7,
|
|
95
|
+
Reply = 19
|
|
96
|
+
}
|
|
97
|
+
export declare enum MessageFlags {
|
|
98
|
+
SuppressEmbeds = 4,
|
|
99
|
+
SuppressNotifications = 4096,
|
|
100
|
+
VoiceMessage = 8192
|
|
101
|
+
}
|
|
102
|
+
export interface Attachment {
|
|
103
|
+
id: Snowflake;
|
|
104
|
+
filename: string;
|
|
105
|
+
title?: string | null;
|
|
106
|
+
description?: string | null;
|
|
107
|
+
content_type?: string | null;
|
|
108
|
+
size: number;
|
|
109
|
+
url?: string | null;
|
|
110
|
+
proxy_url?: string | null;
|
|
111
|
+
width?: number | null;
|
|
112
|
+
height?: number | null;
|
|
113
|
+
flags?: number | null;
|
|
114
|
+
}
|
|
115
|
+
export interface EmbedAuthor {
|
|
116
|
+
name?: string;
|
|
117
|
+
url?: string;
|
|
118
|
+
icon_url?: string;
|
|
119
|
+
}
|
|
120
|
+
export interface EmbedFooter {
|
|
121
|
+
text: string;
|
|
122
|
+
icon_url?: string;
|
|
123
|
+
}
|
|
124
|
+
export interface EmbedMedia {
|
|
125
|
+
url: string;
|
|
126
|
+
proxy_url?: string | null;
|
|
127
|
+
width?: number | null;
|
|
128
|
+
height?: number | null;
|
|
129
|
+
}
|
|
130
|
+
export interface EmbedField {
|
|
131
|
+
name: string;
|
|
132
|
+
value: string;
|
|
133
|
+
inline?: boolean;
|
|
134
|
+
}
|
|
135
|
+
export interface Embed {
|
|
136
|
+
type?: 'rich' | 'image' | 'video' | 'gifv' | 'article' | 'link';
|
|
137
|
+
url?: string | null;
|
|
138
|
+
title?: string | null;
|
|
139
|
+
color?: number | null;
|
|
140
|
+
timestamp?: string | null;
|
|
141
|
+
description?: string | null;
|
|
142
|
+
author?: EmbedAuthor | null;
|
|
143
|
+
image?: EmbedMedia | null;
|
|
144
|
+
thumbnail?: EmbedMedia | null;
|
|
145
|
+
footer?: EmbedFooter | null;
|
|
146
|
+
fields?: EmbedField[] | null;
|
|
147
|
+
video?: EmbedMedia | null;
|
|
148
|
+
}
|
|
149
|
+
export interface MessageReference {
|
|
150
|
+
channel_id: Snowflake;
|
|
151
|
+
message_id: Snowflake;
|
|
152
|
+
guild_id?: Snowflake | null;
|
|
153
|
+
type?: number;
|
|
154
|
+
}
|
|
155
|
+
export interface Reaction {
|
|
156
|
+
emoji: {
|
|
157
|
+
id: Snowflake | null;
|
|
158
|
+
name: string;
|
|
159
|
+
animated?: boolean | null;
|
|
160
|
+
};
|
|
161
|
+
count: number;
|
|
162
|
+
me?: boolean | null;
|
|
163
|
+
}
|
|
164
|
+
export interface Message {
|
|
165
|
+
id: Snowflake;
|
|
166
|
+
channel_id: Snowflake;
|
|
167
|
+
guild_id?: Snowflake | null;
|
|
168
|
+
author: User;
|
|
169
|
+
webhook_id?: Snowflake | null;
|
|
170
|
+
type: MessageType;
|
|
171
|
+
flags: number;
|
|
172
|
+
content: string;
|
|
173
|
+
timestamp: string;
|
|
174
|
+
edited_timestamp: string | null;
|
|
175
|
+
pinned: boolean;
|
|
176
|
+
mention_everyone?: boolean;
|
|
177
|
+
tts?: boolean;
|
|
178
|
+
mentions?: User[] | null;
|
|
179
|
+
mention_roles?: Snowflake[] | null;
|
|
180
|
+
embeds?: Embed[] | null;
|
|
181
|
+
attachments?: Attachment[] | null;
|
|
182
|
+
reactions?: Reaction[] | null;
|
|
183
|
+
message_reference?: MessageReference | null;
|
|
184
|
+
referenced_message?: Message | null;
|
|
185
|
+
nonce?: string | null;
|
|
186
|
+
member?: GuildMember | null;
|
|
187
|
+
}
|
|
188
|
+
export declare enum InteractionType {
|
|
189
|
+
Ping = 1,
|
|
190
|
+
ApplicationCommand = 2,
|
|
191
|
+
MessageComponent = 3,
|
|
192
|
+
Autocomplete = 4,
|
|
193
|
+
ModalSubmit = 5
|
|
194
|
+
}
|
|
195
|
+
export declare enum ApplicationCommandType {
|
|
196
|
+
ChatInput = 1,
|
|
197
|
+
User = 2,
|
|
198
|
+
Message = 3
|
|
199
|
+
}
|
|
200
|
+
export interface InteractionOption {
|
|
201
|
+
name: string;
|
|
202
|
+
type: number;
|
|
203
|
+
value?: string | number | boolean;
|
|
204
|
+
options?: InteractionOption[];
|
|
205
|
+
focused?: boolean;
|
|
206
|
+
}
|
|
207
|
+
export interface Interaction {
|
|
208
|
+
id: Snowflake;
|
|
209
|
+
type: InteractionType;
|
|
210
|
+
application_id: Snowflake;
|
|
211
|
+
guild_id?: Snowflake | null;
|
|
212
|
+
channel_id?: Snowflake | null;
|
|
213
|
+
member?: GuildMember | null;
|
|
214
|
+
user?: User | null;
|
|
215
|
+
token: string;
|
|
216
|
+
data?: {
|
|
217
|
+
id?: Snowflake;
|
|
218
|
+
name?: string;
|
|
219
|
+
type?: ApplicationCommandType;
|
|
220
|
+
options?: InteractionOption[];
|
|
221
|
+
custom_id?: string;
|
|
222
|
+
component_type?: number;
|
|
223
|
+
values?: string[];
|
|
224
|
+
components?: unknown[];
|
|
225
|
+
resolved?: unknown;
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
export declare enum InteractionCallbackType {
|
|
229
|
+
Pong = 1,
|
|
230
|
+
ChannelMessageWithSource = 4,
|
|
231
|
+
DeferredChannelMessageWithSource = 5,
|
|
232
|
+
DeferredUpdateMessage = 6,
|
|
233
|
+
UpdateMessage = 7,
|
|
234
|
+
AutocompleteResult = 8,
|
|
235
|
+
Modal = 9
|
|
236
|
+
}
|
|
237
|
+
export interface Webhook {
|
|
238
|
+
id: Snowflake;
|
|
239
|
+
type: number;
|
|
240
|
+
guild_id?: Snowflake | null;
|
|
241
|
+
channel_id: Snowflake;
|
|
242
|
+
name: string | null;
|
|
243
|
+
avatar: string | null;
|
|
244
|
+
token?: string;
|
|
245
|
+
}
|
|
246
|
+
export interface Emoji {
|
|
247
|
+
id: Snowflake;
|
|
248
|
+
name: string;
|
|
249
|
+
animated: boolean;
|
|
250
|
+
}
|
|
251
|
+
export interface Sticker {
|
|
252
|
+
id: Snowflake;
|
|
253
|
+
name: string;
|
|
254
|
+
description: string;
|
|
255
|
+
tags: string[];
|
|
256
|
+
animated: boolean;
|
|
257
|
+
}
|
|
258
|
+
export declare enum GatewayOpcode {
|
|
259
|
+
Dispatch = 0,
|
|
260
|
+
Heartbeat = 1,
|
|
261
|
+
Identify = 2,
|
|
262
|
+
PresenceUpdate = 3,
|
|
263
|
+
VoiceStateUpdate = 4,
|
|
264
|
+
Resume = 6,
|
|
265
|
+
Reconnect = 7,
|
|
266
|
+
RequestGuildMembers = 8,
|
|
267
|
+
InvalidSession = 9,
|
|
268
|
+
Hello = 10,
|
|
269
|
+
HeartbeatAck = 11
|
|
270
|
+
}
|
|
271
|
+
export interface GatewayPayload {
|
|
272
|
+
op: GatewayOpcode;
|
|
273
|
+
d: unknown;
|
|
274
|
+
s: number | null;
|
|
275
|
+
t: string | null;
|
|
276
|
+
}
|
|
277
|
+
export interface MessageSendOptions {
|
|
278
|
+
content?: string;
|
|
279
|
+
embeds?: Embed[];
|
|
280
|
+
files?: Array<{
|
|
281
|
+
name: string;
|
|
282
|
+
data: Buffer | ArrayBuffer;
|
|
283
|
+
filename?: string;
|
|
284
|
+
}>;
|
|
285
|
+
attachments?: Array<{
|
|
286
|
+
id: number;
|
|
287
|
+
filename: string;
|
|
288
|
+
}>;
|
|
289
|
+
flags?: number;
|
|
290
|
+
message_reference?: MessageReference;
|
|
291
|
+
}
|
|
292
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAE/B,4CAA4C;AAC5C,eAAO,MAAM,YAAY,gBAAgB,CAAC;AAI1C,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,SAAS,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAID,oBAAY,WAAW;IACrB,SAAS,IAAI;IACb,EAAE,IAAI;IACN,UAAU,IAAI;IACd,OAAO,IAAI;IACX,aAAa,IAAI;IACjB,SAAS,IAAI;IACb,iBAAiB,MAAM;CACxB;AAED,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,SAAS,CAAC;IACd,IAAI,EAAE,WAAW,GAAG,MAAM,CAAC;IAC3B,QAAQ,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC5B,IAAI,EAAE,MAAM,GAA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AE,MAAM,GAAG,IAAI,CAAC;IACjB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClB;AAID,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC/E,WAAW,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iBAAiB,CAAC,EAAE,gBAAgB,CAAC;CACtC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/** Fluxer epoch: 2015-01-01 00:00:00 UTC */
|
|
2
|
+
export const FLUXER_EPOCH = 1420070400000;
|
|
3
|
+
// ─── Channels ───────────────────────────────────────────────────
|
|
4
|
+
export var ChannelType;
|
|
5
|
+
(function (ChannelType) {
|
|
6
|
+
ChannelType[ChannelType["GuildText"] = 0] = "GuildText";
|
|
7
|
+
ChannelType[ChannelType["DM"] = 1] = "DM";
|
|
8
|
+
ChannelType[ChannelType["GuildVoice"] = 2] = "GuildVoice";
|
|
9
|
+
ChannelType[ChannelType["GroupDM"] = 3] = "GroupDM";
|
|
10
|
+
ChannelType[ChannelType["GuildCategory"] = 4] = "GuildCategory";
|
|
11
|
+
ChannelType[ChannelType["GuildLink"] = 5] = "GuildLink";
|
|
12
|
+
ChannelType[ChannelType["GuildLinkExtended"] = 998] = "GuildLinkExtended";
|
|
13
|
+
})(ChannelType || (ChannelType = {}));
|
|
14
|
+
// ─── Messages ───────────────────────────────────────────────────
|
|
15
|
+
export var MessageType;
|
|
16
|
+
(function (MessageType) {
|
|
17
|
+
MessageType[MessageType["Default"] = 0] = "Default";
|
|
18
|
+
MessageType[MessageType["RecipientAdd"] = 1] = "RecipientAdd";
|
|
19
|
+
MessageType[MessageType["RecipientRemove"] = 2] = "RecipientRemove";
|
|
20
|
+
MessageType[MessageType["Call"] = 3] = "Call";
|
|
21
|
+
MessageType[MessageType["ChannelNameChange"] = 4] = "ChannelNameChange";
|
|
22
|
+
MessageType[MessageType["ChannelIconChange"] = 5] = "ChannelIconChange";
|
|
23
|
+
MessageType[MessageType["ChannelPinnedMessage"] = 6] = "ChannelPinnedMessage";
|
|
24
|
+
MessageType[MessageType["UserJoin"] = 7] = "UserJoin";
|
|
25
|
+
MessageType[MessageType["Reply"] = 19] = "Reply";
|
|
26
|
+
})(MessageType || (MessageType = {}));
|
|
27
|
+
export var MessageFlags;
|
|
28
|
+
(function (MessageFlags) {
|
|
29
|
+
MessageFlags[MessageFlags["SuppressEmbeds"] = 4] = "SuppressEmbeds";
|
|
30
|
+
MessageFlags[MessageFlags["SuppressNotifications"] = 4096] = "SuppressNotifications";
|
|
31
|
+
MessageFlags[MessageFlags["VoiceMessage"] = 8192] = "VoiceMessage";
|
|
32
|
+
})(MessageFlags || (MessageFlags = {}));
|
|
33
|
+
// ─── Interactions ───────────────────────────────────────────────
|
|
34
|
+
export var InteractionType;
|
|
35
|
+
(function (InteractionType) {
|
|
36
|
+
InteractionType[InteractionType["Ping"] = 1] = "Ping";
|
|
37
|
+
InteractionType[InteractionType["ApplicationCommand"] = 2] = "ApplicationCommand";
|
|
38
|
+
InteractionType[InteractionType["MessageComponent"] = 3] = "MessageComponent";
|
|
39
|
+
InteractionType[InteractionType["Autocomplete"] = 4] = "Autocomplete";
|
|
40
|
+
InteractionType[InteractionType["ModalSubmit"] = 5] = "ModalSubmit";
|
|
41
|
+
})(InteractionType || (InteractionType = {}));
|
|
42
|
+
export var ApplicationCommandType;
|
|
43
|
+
(function (ApplicationCommandType) {
|
|
44
|
+
ApplicationCommandType[ApplicationCommandType["ChatInput"] = 1] = "ChatInput";
|
|
45
|
+
ApplicationCommandType[ApplicationCommandType["User"] = 2] = "User";
|
|
46
|
+
ApplicationCommandType[ApplicationCommandType["Message"] = 3] = "Message";
|
|
47
|
+
})(ApplicationCommandType || (ApplicationCommandType = {}));
|
|
48
|
+
export var InteractionCallbackType;
|
|
49
|
+
(function (InteractionCallbackType) {
|
|
50
|
+
InteractionCallbackType[InteractionCallbackType["Pong"] = 1] = "Pong";
|
|
51
|
+
InteractionCallbackType[InteractionCallbackType["ChannelMessageWithSource"] = 4] = "ChannelMessageWithSource";
|
|
52
|
+
InteractionCallbackType[InteractionCallbackType["DeferredChannelMessageWithSource"] = 5] = "DeferredChannelMessageWithSource";
|
|
53
|
+
InteractionCallbackType[InteractionCallbackType["DeferredUpdateMessage"] = 6] = "DeferredUpdateMessage";
|
|
54
|
+
InteractionCallbackType[InteractionCallbackType["UpdateMessage"] = 7] = "UpdateMessage";
|
|
55
|
+
InteractionCallbackType[InteractionCallbackType["AutocompleteResult"] = 8] = "AutocompleteResult";
|
|
56
|
+
InteractionCallbackType[InteractionCallbackType["Modal"] = 9] = "Modal";
|
|
57
|
+
})(InteractionCallbackType || (InteractionCallbackType = {}));
|
|
58
|
+
// ─── Gateway ────────────────────────────────────────────────────
|
|
59
|
+
export var GatewayOpcode;
|
|
60
|
+
(function (GatewayOpcode) {
|
|
61
|
+
GatewayOpcode[GatewayOpcode["Dispatch"] = 0] = "Dispatch";
|
|
62
|
+
GatewayOpcode[GatewayOpcode["Heartbeat"] = 1] = "Heartbeat";
|
|
63
|
+
GatewayOpcode[GatewayOpcode["Identify"] = 2] = "Identify";
|
|
64
|
+
GatewayOpcode[GatewayOpcode["PresenceUpdate"] = 3] = "PresenceUpdate";
|
|
65
|
+
GatewayOpcode[GatewayOpcode["VoiceStateUpdate"] = 4] = "VoiceStateUpdate";
|
|
66
|
+
GatewayOpcode[GatewayOpcode["Resume"] = 6] = "Resume";
|
|
67
|
+
GatewayOpcode[GatewayOpcode["Reconnect"] = 7] = "Reconnect";
|
|
68
|
+
GatewayOpcode[GatewayOpcode["RequestGuildMembers"] = 8] = "RequestGuildMembers";
|
|
69
|
+
GatewayOpcode[GatewayOpcode["InvalidSession"] = 9] = "InvalidSession";
|
|
70
|
+
GatewayOpcode[GatewayOpcode["Hello"] = 10] = "Hello";
|
|
71
|
+
GatewayOpcode[GatewayOpcode["HeartbeatAck"] = 11] = "HeartbeatAck";
|
|
72
|
+
})(GatewayOpcode || (GatewayOpcode = {}));
|
|
73
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAGA,4CAA4C;AAC5C,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAC;AAiB1C,mEAAmE;AAEnE,MAAM,CAAN,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,uDAAa,CAAA;IACb,yCAAM,CAAA;IACN,yDAAc,CAAA;IACd,mDAAW,CAAA;IACX,+DAAiB,CAAA;IACjB,uDAAa,CAAA;IACb,yEAAuB,CAAA;AACzB,CAAC,EARW,WAAW,KAAX,WAAW,QAQtB;AAqED,mEAAmE;AAEnE,MAAM,CAAN,IAAY,WAUX;AAVD,WAAY,WAAW;IACrB,mDAAW,CAAA;IACX,6DAAgB,CAAA;IAChB,mEAAmB,CAAA;IACnB,6CAAQ,CAAA;IACR,uEAAqB,CAAA;IACrB,uEAAqB,CAAA;IACrB,6EAAwB,CAAA;IACxB,qDAAY,CAAA;IACZ,gDAAU,CAAA;AACZ,CAAC,EAVW,WAAW,KAAX,WAAW,QAUtB;AAED,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACtB,mEAAuB,CAAA;IACvB,oFAA+B,CAAA;IAC/B,kEAAsB,CAAA;AACxB,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AA0ED,mEAAmE;AAEnE,MAAM,CAAN,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,qDAAQ,CAAA;IACR,iFAAsB,CAAA;IACtB,6EAAoB,CAAA;IACpB,qEAAgB,CAAA;IAChB,mEAAe,CAAA;AACjB,CAAC,EANW,eAAe,KAAf,eAAe,QAM1B;AAED,MAAM,CAAN,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,6EAAa,CAAA;IACb,mEAAQ,CAAA;IACR,yEAAW,CAAA;AACb,CAAC,EAJW,sBAAsB,KAAtB,sBAAsB,QAIjC;AAgCD,MAAM,CAAN,IAAY,uBAQX;AARD,WAAY,uBAAuB;IACjC,qEAAQ,CAAA;IACR,6GAA4B,CAAA;IAC5B,6HAAoC,CAAA;IACpC,uGAAyB,CAAA;IACzB,uFAAiB,CAAA;IACjB,iGAAsB,CAAA;IACtB,uEAAS,CAAA;AACX,CAAC,EARW,uBAAuB,KAAvB,uBAAuB,QAQlC;AA8BD,mEAAmE;AAEnE,MAAM,CAAN,IAAY,aAYX;AAZD,WAAY,aAAa;IACvB,yDAAY,CAAA;IACZ,2DAAa,CAAA;IACb,yDAAY,CAAA;IACZ,qEAAkB,CAAA;IAClB,yEAAoB,CAAA;IACpB,qDAAU,CAAA;IACV,2DAAa,CAAA;IACb,+EAAuB,CAAA;IACvB,qEAAkB,CAAA;IAClB,oDAAU,CAAA;IACV,kEAAiB,CAAA;AACnB,CAAC,EAZW,aAAa,KAAb,aAAa,QAYxB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "fluxer.ts",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Lightweight, TypeScript-first SDK for building Fluxer bots",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"files": ["dist"],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc",
|
|
17
|
+
"dev": "tsc --watch",
|
|
18
|
+
"clean": "rm -rf dist"
|
|
19
|
+
},
|
|
20
|
+
"keywords": ["fluxer", "bot", "sdk", "api", "typescript", "discord"],
|
|
21
|
+
"author": "Sharon Fox & Vigil",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/zeroxs/fluxer.ts"
|
|
25
|
+
},
|
|
26
|
+
"bugs": "https://github.com/zeroxs/fluxer.ts/issues",
|
|
27
|
+
"homepage": "https://github.com/zeroxs/fluxer.ts#readme",
|
|
28
|
+
"license": "MIT",
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=18.0.0"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"ws": "^8.18.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@types/node": "^22.0.0",
|
|
37
|
+
"@types/ws": "^8.5.0",
|
|
38
|
+
"typescript": "^5.6.0"
|
|
39
|
+
}
|
|
40
|
+
}
|