@wlix/ceres 0.0.1 → 0.0.2
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 +4 -4
- package/dist/index.cjs +6 -27
- package/dist/index.d.cts +6 -32
- package/dist/index.d.mts +6 -32
- package/dist/index.mjs +2 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ bun add @wlix/ceres
|
|
|
17
17
|
## Example
|
|
18
18
|
|
|
19
19
|
```js
|
|
20
|
-
import { Client,
|
|
20
|
+
import { Client, GatewayIntentBits } from "@wlix/ceres";
|
|
21
21
|
|
|
22
22
|
const client = new Client({
|
|
23
23
|
// replace TOKEN with the bot's token
|
|
@@ -25,9 +25,9 @@ const client = new Client({
|
|
|
25
25
|
token: "TOKEN",
|
|
26
26
|
intents: [
|
|
27
27
|
// include client intents here
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
GatewayIntentBits.Guilds,
|
|
29
|
+
GatewayIntentBits.GuildMembers,
|
|
30
|
+
GatewayIntentBits.GuildMessages,
|
|
31
31
|
],
|
|
32
32
|
});
|
|
33
33
|
|
package/dist/index.cjs
CHANGED
|
@@ -124,32 +124,6 @@ async function handleClientEvent(client, packet) {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region src/utils/intents.ts
|
|
129
|
-
const ClientIntents = {
|
|
130
|
-
AutoModerationConfiguration: 1 << 20,
|
|
131
|
-
AutoModerationExecution: 1 << 21,
|
|
132
|
-
DirectMessagePolls: 1 << 25,
|
|
133
|
-
DirectMessageReactions: 8192,
|
|
134
|
-
DirectMessages: 4096,
|
|
135
|
-
DirectMessageTyping: 16384,
|
|
136
|
-
GuildExpressions: 8,
|
|
137
|
-
GuildIntegrations: 16,
|
|
138
|
-
GuildInvites: 64,
|
|
139
|
-
GuildMembers: 2,
|
|
140
|
-
GuildMessagePolls: 1 << 24,
|
|
141
|
-
GuildMessageReactions: 1024,
|
|
142
|
-
GuildMessages: 512,
|
|
143
|
-
GuildMessageTyping: 2048,
|
|
144
|
-
GuildModeration: 4,
|
|
145
|
-
GuildPresences: 256,
|
|
146
|
-
Guilds: 1,
|
|
147
|
-
GuildScheduledEvents: 65536,
|
|
148
|
-
GuildVoiceStates: 128,
|
|
149
|
-
GuildWebhooks: 32,
|
|
150
|
-
MessageContent: 32768
|
|
151
|
-
};
|
|
152
|
-
|
|
153
127
|
//#endregion
|
|
154
128
|
//#region src/structures/Client.ts
|
|
155
129
|
/**
|
|
@@ -530,7 +504,6 @@ Object.defineProperty(exports, 'ChannelType', {
|
|
|
530
504
|
}
|
|
531
505
|
});
|
|
532
506
|
exports.Client = Client;
|
|
533
|
-
exports.ClientIntents = ClientIntents;
|
|
534
507
|
exports.EventHandler = EventHandler;
|
|
535
508
|
Object.defineProperty(exports, 'GatewayDispatchEvents', {
|
|
536
509
|
enumerable: true,
|
|
@@ -538,6 +511,12 @@ Object.defineProperty(exports, 'GatewayDispatchEvents', {
|
|
|
538
511
|
return discord_api_types_v10.GatewayDispatchEvents;
|
|
539
512
|
}
|
|
540
513
|
});
|
|
514
|
+
Object.defineProperty(exports, 'GatewayIntentBits', {
|
|
515
|
+
enumerable: true,
|
|
516
|
+
get: function () {
|
|
517
|
+
return discord_api_types_v10.GatewayIntentBits;
|
|
518
|
+
}
|
|
519
|
+
});
|
|
541
520
|
exports.Message = Message;
|
|
542
521
|
exports.User = User;
|
|
543
522
|
exports.handleClientEvent = handleClientEvent;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APIAllowedMentions, APIChannel, APIEmbed, APIMessage, APIMessageComponent, APIMessageReference, APIUser, ActivityType, ActivityType as ActivityType$1, ChannelType, ChannelType as ChannelType$1, GatewayDispatchEvents } from "discord-api-types/v10";
|
|
1
|
+
import { APIAllowedMentions, APIChannel, APIEmbed, APIMessage, APIMessageComponent, APIMessageReference, APIUser, ActivityType, ActivityType as ActivityType$1, ChannelType, ChannelType as ChannelType$1, GatewayDispatchEvents, GatewayIntentBits, GatewayIntentBits as GatewayIntentBits$1 } from "discord-api-types/v10";
|
|
2
2
|
|
|
3
3
|
//#region src/structures/EventHandler.d.ts
|
|
4
4
|
declare class EventHandler<Events extends Record<string, any[]>> {
|
|
@@ -67,34 +67,6 @@ declare class User {
|
|
|
67
67
|
constructor(client: Client<true>, data: APIUser);
|
|
68
68
|
}
|
|
69
69
|
//#endregion
|
|
70
|
-
//#region src/utils/client-events.d.ts
|
|
71
|
-
declare function handleClientEvent(client: Client<true>, packet: any): Promise<void>;
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/utils/intents.d.ts
|
|
74
|
-
declare const ClientIntents: {
|
|
75
|
-
readonly AutoModerationConfiguration: number;
|
|
76
|
-
readonly AutoModerationExecution: number;
|
|
77
|
-
readonly DirectMessagePolls: number;
|
|
78
|
-
readonly DirectMessageReactions: number;
|
|
79
|
-
readonly DirectMessages: number;
|
|
80
|
-
readonly DirectMessageTyping: number;
|
|
81
|
-
readonly GuildExpressions: number;
|
|
82
|
-
readonly GuildIntegrations: number;
|
|
83
|
-
readonly GuildInvites: number;
|
|
84
|
-
readonly GuildMembers: number;
|
|
85
|
-
readonly GuildMessagePolls: number;
|
|
86
|
-
readonly GuildMessageReactions: number;
|
|
87
|
-
readonly GuildMessages: number;
|
|
88
|
-
readonly GuildMessageTyping: number;
|
|
89
|
-
readonly GuildModeration: number;
|
|
90
|
-
readonly GuildPresences: number;
|
|
91
|
-
readonly Guilds: number;
|
|
92
|
-
readonly GuildScheduledEvents: number;
|
|
93
|
-
readonly GuildVoiceStates: number;
|
|
94
|
-
readonly GuildWebhooks: number;
|
|
95
|
-
readonly MessageContent: number;
|
|
96
|
-
};
|
|
97
|
-
//#endregion
|
|
98
70
|
//#region src/types.d.ts
|
|
99
71
|
interface ClientActivity {
|
|
100
72
|
name: string;
|
|
@@ -109,10 +81,9 @@ type ClientEvents = {
|
|
|
109
81
|
messageCreate: [message: Message];
|
|
110
82
|
ready: [readyClient: Client<true>];
|
|
111
83
|
};
|
|
112
|
-
type ClientIntent = (typeof ClientIntents)[keyof typeof ClientIntents];
|
|
113
84
|
interface ClientOptions {
|
|
114
85
|
token: string;
|
|
115
|
-
intents:
|
|
86
|
+
intents: (typeof GatewayIntentBits$1)[keyof typeof GatewayIntentBits$1][];
|
|
116
87
|
presence?: ClientPresence;
|
|
117
88
|
}
|
|
118
89
|
interface ClientPresence {
|
|
@@ -140,4 +111,7 @@ interface CreateMessagePropsObject {
|
|
|
140
111
|
type If<Condition extends boolean, True, False = null> = Condition extends true ? True : False;
|
|
141
112
|
type UserStatus = "online" | "idle" | "dnd" | "offline";
|
|
142
113
|
//#endregion
|
|
143
|
-
|
|
114
|
+
//#region src/utils/client-events.d.ts
|
|
115
|
+
declare function handleClientEvent(client: Client<true>, packet: any): Promise<void>;
|
|
116
|
+
//#endregion
|
|
117
|
+
export { ActivityType, Channel, ChannelType, Client, ClientActivity, ClientEvents, ClientOptions, ClientPresence, CreateMessageProps, CreateMessagePropsObject, EventHandler, GatewayDispatchEvents, GatewayIntentBits, If, Message, User, UserStatus, handleClientEvent };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APIAllowedMentions, APIChannel, APIEmbed, APIMessage, APIMessageComponent, APIMessageReference, APIUser, ActivityType, ActivityType as ActivityType$1, ChannelType, ChannelType as ChannelType$1, GatewayDispatchEvents } from "discord-api-types/v10";
|
|
1
|
+
import { APIAllowedMentions, APIChannel, APIEmbed, APIMessage, APIMessageComponent, APIMessageReference, APIUser, ActivityType, ActivityType as ActivityType$1, ChannelType, ChannelType as ChannelType$1, GatewayDispatchEvents, GatewayIntentBits, GatewayIntentBits as GatewayIntentBits$1 } from "discord-api-types/v10";
|
|
2
2
|
|
|
3
3
|
//#region src/structures/EventHandler.d.ts
|
|
4
4
|
declare class EventHandler<Events extends Record<string, any[]>> {
|
|
@@ -67,34 +67,6 @@ declare class User {
|
|
|
67
67
|
constructor(client: Client<true>, data: APIUser);
|
|
68
68
|
}
|
|
69
69
|
//#endregion
|
|
70
|
-
//#region src/utils/client-events.d.ts
|
|
71
|
-
declare function handleClientEvent(client: Client<true>, packet: any): Promise<void>;
|
|
72
|
-
//#endregion
|
|
73
|
-
//#region src/utils/intents.d.ts
|
|
74
|
-
declare const ClientIntents: {
|
|
75
|
-
readonly AutoModerationConfiguration: number;
|
|
76
|
-
readonly AutoModerationExecution: number;
|
|
77
|
-
readonly DirectMessagePolls: number;
|
|
78
|
-
readonly DirectMessageReactions: number;
|
|
79
|
-
readonly DirectMessages: number;
|
|
80
|
-
readonly DirectMessageTyping: number;
|
|
81
|
-
readonly GuildExpressions: number;
|
|
82
|
-
readonly GuildIntegrations: number;
|
|
83
|
-
readonly GuildInvites: number;
|
|
84
|
-
readonly GuildMembers: number;
|
|
85
|
-
readonly GuildMessagePolls: number;
|
|
86
|
-
readonly GuildMessageReactions: number;
|
|
87
|
-
readonly GuildMessages: number;
|
|
88
|
-
readonly GuildMessageTyping: number;
|
|
89
|
-
readonly GuildModeration: number;
|
|
90
|
-
readonly GuildPresences: number;
|
|
91
|
-
readonly Guilds: number;
|
|
92
|
-
readonly GuildScheduledEvents: number;
|
|
93
|
-
readonly GuildVoiceStates: number;
|
|
94
|
-
readonly GuildWebhooks: number;
|
|
95
|
-
readonly MessageContent: number;
|
|
96
|
-
};
|
|
97
|
-
//#endregion
|
|
98
70
|
//#region src/types.d.ts
|
|
99
71
|
interface ClientActivity {
|
|
100
72
|
name: string;
|
|
@@ -109,10 +81,9 @@ type ClientEvents = {
|
|
|
109
81
|
messageCreate: [message: Message];
|
|
110
82
|
ready: [readyClient: Client<true>];
|
|
111
83
|
};
|
|
112
|
-
type ClientIntent = (typeof ClientIntents)[keyof typeof ClientIntents];
|
|
113
84
|
interface ClientOptions {
|
|
114
85
|
token: string;
|
|
115
|
-
intents:
|
|
86
|
+
intents: (typeof GatewayIntentBits$1)[keyof typeof GatewayIntentBits$1][];
|
|
116
87
|
presence?: ClientPresence;
|
|
117
88
|
}
|
|
118
89
|
interface ClientPresence {
|
|
@@ -140,4 +111,7 @@ interface CreateMessagePropsObject {
|
|
|
140
111
|
type If<Condition extends boolean, True, False = null> = Condition extends true ? True : False;
|
|
141
112
|
type UserStatus = "online" | "idle" | "dnd" | "offline";
|
|
142
113
|
//#endregion
|
|
143
|
-
|
|
114
|
+
//#region src/utils/client-events.d.ts
|
|
115
|
+
declare function handleClientEvent(client: Client<true>, packet: any): Promise<void>;
|
|
116
|
+
//#endregion
|
|
117
|
+
export { ActivityType, Channel, ChannelType, Client, ClientActivity, ClientEvents, ClientOptions, ClientPresence, CreateMessageProps, CreateMessagePropsObject, EventHandler, GatewayDispatchEvents, GatewayIntentBits, If, Message, User, UserStatus, handleClientEvent };
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActivityType, ChannelType, ChannelType as ChannelType$1, GatewayDispatchEvents, GatewayDispatchEvents as GatewayDispatchEvents$1, GatewayOpcodes, Routes } from "discord-api-types/v10";
|
|
1
|
+
import { ActivityType, ChannelType, ChannelType as ChannelType$1, GatewayDispatchEvents, GatewayDispatchEvents as GatewayDispatchEvents$1, GatewayIntentBits, GatewayOpcodes, Routes } from "discord-api-types/v10";
|
|
2
2
|
|
|
3
3
|
//#region src/structures/EventHandler.ts
|
|
4
4
|
/**
|
|
@@ -124,32 +124,6 @@ async function handleClientEvent(client, packet) {
|
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
//#endregion
|
|
128
|
-
//#region src/utils/intents.ts
|
|
129
|
-
const ClientIntents = {
|
|
130
|
-
AutoModerationConfiguration: 1 << 20,
|
|
131
|
-
AutoModerationExecution: 1 << 21,
|
|
132
|
-
DirectMessagePolls: 1 << 25,
|
|
133
|
-
DirectMessageReactions: 8192,
|
|
134
|
-
DirectMessages: 4096,
|
|
135
|
-
DirectMessageTyping: 16384,
|
|
136
|
-
GuildExpressions: 8,
|
|
137
|
-
GuildIntegrations: 16,
|
|
138
|
-
GuildInvites: 64,
|
|
139
|
-
GuildMembers: 2,
|
|
140
|
-
GuildMessagePolls: 1 << 24,
|
|
141
|
-
GuildMessageReactions: 1024,
|
|
142
|
-
GuildMessages: 512,
|
|
143
|
-
GuildMessageTyping: 2048,
|
|
144
|
-
GuildModeration: 4,
|
|
145
|
-
GuildPresences: 256,
|
|
146
|
-
Guilds: 1,
|
|
147
|
-
GuildScheduledEvents: 65536,
|
|
148
|
-
GuildVoiceStates: 128,
|
|
149
|
-
GuildWebhooks: 32,
|
|
150
|
-
MessageContent: 32768
|
|
151
|
-
};
|
|
152
|
-
|
|
153
127
|
//#endregion
|
|
154
128
|
//#region src/structures/Client.ts
|
|
155
129
|
/**
|
|
@@ -516,4 +490,4 @@ var User = class {
|
|
|
516
490
|
};
|
|
517
491
|
|
|
518
492
|
//#endregion
|
|
519
|
-
export { ActivityType, Channel, ChannelType, Client,
|
|
493
|
+
export { ActivityType, Channel, ChannelType, Client, EventHandler, GatewayDispatchEvents, GatewayIntentBits, Message, User, handleClientEvent };
|