bakit 3.0.0 → 3.0.1
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/dist/index.cjs +1 -672
- package/dist/index.d.cts +244 -238
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +282 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +8 -8
- package/dist/index.d.ts +0 -276
- package/dist/index.js +0 -522
package/dist/index.d.cts
CHANGED
|
@@ -1,276 +1,282 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import * as discord_api_types_v10 from 'discord-api-types/v10';
|
|
11
|
-
import { APITextBasedChannel, ChannelType, APIGuildVoiceChannel, APIChannelBase, GatewayChannelCreateDispatchData, GatewayChannelUpdateDispatchData, APIChannel, APIGuild, GatewayGuildUpdateDispatchData, GatewayGuildCreateDispatchData, APIUser, GatewayReadyDispatchData, APIEmbed, APIAllowedMentions, APIMessageReference, APIMessage, GatewayMessageCreateDispatchData, GatewayMessageUpdateDispatchData, GatewayIntentBits, GatewayDispatchPayload, GatewayReceivePayload } from 'discord-api-types/v10';
|
|
12
|
-
export { discord_api_types_v10 as DiscordAPIV10 };
|
|
13
|
-
export { GatewayIntentBits as Intent } from 'discord-api-types/v10';
|
|
1
|
+
import { Cluster, ClusterEvents, ClusterOptions, Shard, ShardEvents, ShardOptions, ShardState, ShardStrategy, ShardingManager, ShardingManager as ShardingManager$1, ShardingManagerEvents, ShardingManagerOptions, ShardingManagerOptions as ShardingManagerOptions$1 } from "@bakit/gateway";
|
|
2
|
+
import { BaseRESTEvents, DEFAULT_REST_OPTIONS, DiscordHTTPError, DiscordHTTPErrorRequest, DiscordHTTPFlattenedError, DiscordHTTPValidationError, REST, RESTAdapter, RESTAdapterEvents, RESTEndpoint, RESTEvents, RESTLike, RESTLike as RESTLike$1, RESTMethod, RESTOptions, RESTProxyOptions, RESTRequestFn, RESTRequestOptions, createREST, createRESTAdapter } from "@bakit/rest";
|
|
3
|
+
import { RPCHandler, Service, ServiceClientRuntime, ServiceDriver, ServiceOptions, ServiceProcess, ServiceProcessEvents, ServiceServerRuntime, ServiceState, TransportClient, TransportClientEvents, TransportServer, TransportServerEvents, createService, createTransportClient, createTransportServer } from "@bakit/service";
|
|
4
|
+
import * as _bakit_utils0 from "@bakit/utils";
|
|
5
|
+
import { AbstractConstructor, Awaitable, Constructor, FunctionLike, Promisify, PromisifyValue, RejectFn, ResolveFn, capitalize, instanceToObject, isCommonJS, isESM, isPlainObject, isPromiseLike, promisify, sleep } from "@bakit/utils";
|
|
6
|
+
import EventEmitter from "node:events";
|
|
7
|
+
import { Collection } from "@discordjs/collection";
|
|
8
|
+
import * as discord_api_types_v100 from "discord-api-types/v10";
|
|
9
|
+
import { APIAllowedMentions, APIChannel, APIChannelBase, APIEmbed, APIGuild, APIGuildVoiceChannel, APIMessage, APIMessageReference, APITextBasedChannel, APIUser, ChannelType, GatewayChannelCreateDispatchData, GatewayChannelUpdateDispatchData, GatewayDispatchPayload, GatewayGuildCreateDispatchData, GatewayGuildUpdateDispatchData, GatewayIntentBits, GatewayIntentBits as Intent, GatewayMessageCreateDispatchData, GatewayMessageUpdateDispatchData, GatewayReadyDispatchData, GatewayReceivePayload } from "discord-api-types/v10";
|
|
14
10
|
|
|
11
|
+
//#region src/lib/structures/BaseStructure.d.ts
|
|
15
12
|
declare class BaseStructure {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
client: Client;
|
|
14
|
+
constructor(client: Client);
|
|
15
|
+
toJSON(): {};
|
|
19
16
|
}
|
|
20
|
-
|
|
17
|
+
//#endregion
|
|
18
|
+
//#region src/lib/structures/channel/GuildTextChannel.d.ts
|
|
21
19
|
declare const GuildTextChannel_base: (abstract new (client: Client, data: APITextBasedChannel<ChannelType.GuildText>) => BaseChannel<APITextBasedChannel<ChannelType.GuildText>>) & (abstract new (...args: any[]) => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}) &
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}) &
|
|
47
|
-
declare class GuildTextChannel extends GuildTextChannel_base {
|
|
48
|
-
|
|
49
|
-
|
|
20
|
+
get guildId(): string;
|
|
21
|
+
get guild(): Guild;
|
|
22
|
+
data: discord_api_types_v100.APIGuildChannel<discord_api_types_v100.GuildChannelType>;
|
|
23
|
+
get id(): string;
|
|
24
|
+
get type(): ChannelType;
|
|
25
|
+
toString(): string;
|
|
26
|
+
toJSON(): discord_api_types_v100.APIGuildChannel<discord_api_types_v100.GuildChannelType>;
|
|
27
|
+
isTextBased(): this is TextBasedChannel;
|
|
28
|
+
isVoiceBased(): this is VoiceBasedChannel;
|
|
29
|
+
inGuild(): this is GuildChannel;
|
|
30
|
+
_patch(data: Partial<discord_api_types_v100.APIGuildChannel<discord_api_types_v100.GuildChannelType>>): void;
|
|
31
|
+
client: Client;
|
|
32
|
+
}) & _bakit_utils0.AbstractConstructor<BaseChannel<discord_api_types_v100.APIGuildChannel<discord_api_types_v100.GuildChannelType>>> & (abstract new (...args: any[]) => {
|
|
33
|
+
send(options: MessageCreateOptions): Promise<discord_api_types_v100.APIMessage>;
|
|
34
|
+
data: APITextBasedChannel<ChannelType>;
|
|
35
|
+
get id(): string;
|
|
36
|
+
get type(): ChannelType;
|
|
37
|
+
toString(): string;
|
|
38
|
+
toJSON(): APITextBasedChannel<ChannelType>;
|
|
39
|
+
isTextBased(): this is TextBasedChannel;
|
|
40
|
+
isVoiceBased(): this is VoiceBasedChannel;
|
|
41
|
+
inGuild(): this is GuildChannel;
|
|
42
|
+
_patch(data: Partial<APITextBasedChannel<ChannelType>>): void;
|
|
43
|
+
client: Client;
|
|
44
|
+
}) & _bakit_utils0.AbstractConstructor<BaseChannel<APITextBasedChannel<ChannelType>>>;
|
|
45
|
+
declare class GuildTextChannel extends GuildTextChannel_base {}
|
|
46
|
+
//#endregion
|
|
47
|
+
//#region src/lib/structures/channel/GuildVoiceChannel.d.ts
|
|
50
48
|
declare const GuildVoiceChannel_base: (abstract new (client: Client, data: APIGuildVoiceChannel) => BaseChannel<APIGuildVoiceChannel>) & (abstract new (...args: any[]) => {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}) &
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}) &
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
}) &
|
|
87
|
-
declare class GuildVoiceChannel extends GuildVoiceChannel_base {
|
|
88
|
-
|
|
89
|
-
|
|
49
|
+
get guildId(): string;
|
|
50
|
+
get guild(): Guild;
|
|
51
|
+
data: discord_api_types_v100.APIGuildChannel<discord_api_types_v100.GuildChannelType>;
|
|
52
|
+
get id(): string;
|
|
53
|
+
get type(): discord_api_types_v100.ChannelType;
|
|
54
|
+
toString(): string;
|
|
55
|
+
toJSON(): discord_api_types_v100.APIGuildChannel<discord_api_types_v100.GuildChannelType>;
|
|
56
|
+
isTextBased(): this is TextBasedChannel;
|
|
57
|
+
isVoiceBased(): this is VoiceBasedChannel;
|
|
58
|
+
inGuild(): this is GuildChannel;
|
|
59
|
+
_patch(data: Partial<discord_api_types_v100.APIGuildChannel<discord_api_types_v100.GuildChannelType>>): void;
|
|
60
|
+
client: Client;
|
|
61
|
+
}) & _bakit_utils0.AbstractConstructor<BaseChannel<discord_api_types_v100.APIGuildChannel<discord_api_types_v100.GuildChannelType>>> & (abstract new (...args: any[]) => {
|
|
62
|
+
send(options: MessageCreateOptions): Promise<discord_api_types_v100.APIMessage>;
|
|
63
|
+
data: discord_api_types_v100.APITextBasedChannel<discord_api_types_v100.ChannelType>;
|
|
64
|
+
get id(): string;
|
|
65
|
+
get type(): discord_api_types_v100.ChannelType;
|
|
66
|
+
toString(): string;
|
|
67
|
+
toJSON(): discord_api_types_v100.APITextBasedChannel<discord_api_types_v100.ChannelType>;
|
|
68
|
+
isTextBased(): this is TextBasedChannel;
|
|
69
|
+
isVoiceBased(): this is VoiceBasedChannel;
|
|
70
|
+
inGuild(): this is GuildChannel;
|
|
71
|
+
_patch(data: Partial<discord_api_types_v100.APITextBasedChannel<discord_api_types_v100.ChannelType>>): void;
|
|
72
|
+
client: Client;
|
|
73
|
+
}) & _bakit_utils0.AbstractConstructor<BaseChannel<discord_api_types_v100.APITextBasedChannel<discord_api_types_v100.ChannelType>>> & (abstract new (...args: any[]) => {
|
|
74
|
+
data: discord_api_types_v100.APIVoiceChannelBase<discord_api_types_v100.GuildChannelType>;
|
|
75
|
+
get id(): string;
|
|
76
|
+
get type(): discord_api_types_v100.ChannelType;
|
|
77
|
+
toString(): string;
|
|
78
|
+
toJSON(): discord_api_types_v100.APIVoiceChannelBase<discord_api_types_v100.GuildChannelType>;
|
|
79
|
+
isTextBased(): this is TextBasedChannel;
|
|
80
|
+
isVoiceBased(): this is VoiceBasedChannel;
|
|
81
|
+
inGuild(): this is GuildChannel;
|
|
82
|
+
_patch(data: Partial<discord_api_types_v100.APIVoiceChannelBase<discord_api_types_v100.GuildChannelType>>): void;
|
|
83
|
+
client: Client;
|
|
84
|
+
}) & _bakit_utils0.AbstractConstructor<BaseChannel<discord_api_types_v100.APIVoiceChannelBase<discord_api_types_v100.GuildChannelType>>>;
|
|
85
|
+
declare class GuildVoiceChannel extends GuildVoiceChannel_base {}
|
|
86
|
+
//#endregion
|
|
87
|
+
//#region src/lib/structures/channel/BaseChannel.d.ts
|
|
90
88
|
type BaseChannelPayload = APIChannelBase<ChannelType> | GatewayChannelCreateDispatchData | GatewayChannelUpdateDispatchData | APIChannel;
|
|
91
89
|
type TextBasedChannel = GuildTextChannel | GuildVoiceChannel;
|
|
92
90
|
type VoiceBasedChannel = GuildVoiceChannel;
|
|
93
91
|
type GuildChannel = GuildTextChannel | GuildVoiceChannel;
|
|
94
92
|
type Channel = TextBasedChannel | VoiceBasedChannel | GuildChannel;
|
|
95
93
|
declare abstract class BaseChannel<D extends BaseChannelPayload> extends BaseStructure {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
94
|
+
data: D;
|
|
95
|
+
constructor(client: Client, data: D);
|
|
96
|
+
get id(): string;
|
|
97
|
+
get type(): ChannelType;
|
|
98
|
+
toString(): string;
|
|
99
|
+
toJSON(): D;
|
|
100
|
+
isTextBased(): this is TextBasedChannel;
|
|
101
|
+
isVoiceBased(): this is VoiceBasedChannel;
|
|
102
|
+
inGuild(): this is GuildChannel;
|
|
103
|
+
_patch(data: Partial<D>): void;
|
|
106
104
|
}
|
|
107
|
-
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/lib/structures/Guild.d.ts
|
|
108
107
|
type GuildPayload = APIGuild | GatewayGuildUpdateDispatchData | GatewayGuildCreateDispatchData;
|
|
109
108
|
declare class Guild extends BaseStructure {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
109
|
+
data: GuildPayload;
|
|
110
|
+
private cachedChannels;
|
|
111
|
+
constructor(client: Client, data: GuildPayload);
|
|
112
|
+
get id(): string;
|
|
113
|
+
get name(): string;
|
|
114
|
+
get icon(): string | null;
|
|
115
|
+
get banner(): string | null;
|
|
116
|
+
get owner(): string;
|
|
117
|
+
get mfaLevel(): discord_api_types_v100.GuildMFALevel;
|
|
118
|
+
get verificationLevel(): discord_api_types_v100.GuildVerificationLevel;
|
|
119
|
+
get channels(): Collection<string, Channel>;
|
|
120
|
+
_patch(data: Partial<GuildPayload>): void;
|
|
122
121
|
}
|
|
123
|
-
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region src/lib/structures/User.d.ts
|
|
124
124
|
type UserPayload = APIUser | GatewayReadyDispatchData["user"];
|
|
125
125
|
declare class User extends BaseStructure {
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
126
|
+
data: UserPayload;
|
|
127
|
+
constructor(client: Client, data: UserPayload);
|
|
128
|
+
get id(): string;
|
|
129
|
+
get username(): string;
|
|
130
|
+
get discriminator(): string;
|
|
131
|
+
get globalName(): string | null;
|
|
132
|
+
get tag(): string;
|
|
133
|
+
get displayName(): string;
|
|
134
|
+
get avatar(): string | undefined;
|
|
135
|
+
get bot(): boolean;
|
|
136
|
+
get system(): boolean;
|
|
137
|
+
get mfaEnabled(): boolean | undefined;
|
|
138
|
+
get locale(): string | undefined;
|
|
139
|
+
get verified(): boolean | undefined;
|
|
140
|
+
get email(): string | null | undefined;
|
|
141
|
+
get flags(): discord_api_types_v100.UserFlags | undefined;
|
|
142
|
+
get premiumType(): discord_api_types_v100.UserPremiumType | undefined;
|
|
143
|
+
get publicFlags(): discord_api_types_v100.UserFlags | undefined;
|
|
144
|
+
get banner(): string | null | undefined;
|
|
145
|
+
get accentColor(): number | undefined;
|
|
146
|
+
get createdAt(): Date;
|
|
147
|
+
get createdTimestamp(): number;
|
|
148
|
+
get hexAccentColor(): string | undefined;
|
|
149
|
+
get defaultAvatarURL(): string;
|
|
150
|
+
getAvatarURL(options?: {
|
|
151
|
+
size?: number;
|
|
152
|
+
extension?: "png" | "jpg" | "webp" | "gif";
|
|
153
|
+
}): string | undefined;
|
|
154
|
+
getDisplayAvatarURL(options?: {
|
|
155
|
+
size?: number;
|
|
156
|
+
extension?: "png" | "jpg" | "webp" | "gif";
|
|
157
|
+
}): string;
|
|
158
|
+
equals(other: User | string): boolean;
|
|
159
|
+
toJSON(): APIUser;
|
|
160
|
+
toString(): string;
|
|
161
161
|
}
|
|
162
|
-
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/lib/client/ClientHelper.d.ts
|
|
163
164
|
interface MessageCreateOptions {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
165
|
+
content?: string;
|
|
166
|
+
tts?: boolean;
|
|
167
|
+
embeds?: APIEmbed[];
|
|
168
|
+
allowedMentions?: APIAllowedMentions;
|
|
169
|
+
messageReference?: APIMessageReference;
|
|
170
|
+
flags?: number;
|
|
170
171
|
}
|
|
171
172
|
type MessageReplyOptions = Omit<MessageCreateOptions, "messageReference">;
|
|
172
173
|
declare class ClientHelper {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
174
|
+
readonly client: Client;
|
|
175
|
+
constructor(client: Client);
|
|
176
|
+
fetchMessage(channelId: string, messageId: string): Promise<Message>;
|
|
177
|
+
deleteMessage(channelId: string, messageId: string): Promise<unknown>;
|
|
178
|
+
createMessage(channelId: string, options: MessageCreateOptions): Promise<APIMessage>;
|
|
179
|
+
replyMessage(channelId: string, messageId: string, options: MessageReplyOptions): Promise<APIMessage>;
|
|
180
|
+
fetchGuild(guildId: string): Promise<Guild>;
|
|
181
|
+
static toAPICreateMessagePayload(options: MessageCreateOptions): {
|
|
182
|
+
content: string | undefined;
|
|
183
|
+
tts: boolean | undefined;
|
|
184
|
+
embeds: APIEmbed[] | undefined;
|
|
185
|
+
allowed_mentions: APIAllowedMentions | undefined;
|
|
186
|
+
message_reference: APIMessageReference | undefined;
|
|
187
|
+
flags: number | undefined;
|
|
188
|
+
};
|
|
188
189
|
}
|
|
189
|
-
|
|
190
|
+
//#endregion
|
|
191
|
+
//#region src/lib/structures/Message.d.ts
|
|
190
192
|
type MessagePayload = APIMessage | GatewayMessageCreateDispatchData | GatewayMessageUpdateDispatchData;
|
|
191
193
|
declare class Message extends BaseStructure {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
194
|
+
data: MessagePayload;
|
|
195
|
+
protected cachedAuthor?: User;
|
|
196
|
+
constructor(client: Client, data: MessagePayload);
|
|
197
|
+
get partial(): boolean;
|
|
198
|
+
get content(): string;
|
|
199
|
+
get id(): string;
|
|
200
|
+
get channelId(): string;
|
|
201
|
+
get channel(): TextBasedChannel;
|
|
202
|
+
get guildId(): string | undefined;
|
|
203
|
+
get guild(): Guild | undefined;
|
|
204
|
+
get author(): User;
|
|
205
|
+
get createdAt(): Date;
|
|
206
|
+
get editedAt(): Date | undefined;
|
|
207
|
+
get createdTimestamp(): number;
|
|
208
|
+
get editedTimestamp(): number | undefined;
|
|
209
|
+
get url(): string;
|
|
210
|
+
fetch(): Promise<Message>;
|
|
211
|
+
reply(options: MessageReplyOptions): Promise<APIMessage>;
|
|
212
|
+
sendToChannel(options: MessageReplyOptions): Promise<APIMessage>;
|
|
213
|
+
toJSON(): MessagePayload;
|
|
214
|
+
toString(): string;
|
|
213
215
|
}
|
|
214
|
-
|
|
216
|
+
//#endregion
|
|
217
|
+
//#region src/lib/client/Partial.d.ts
|
|
215
218
|
declare enum Partial$1 {
|
|
216
|
-
|
|
217
|
-
|
|
219
|
+
Message = 0,
|
|
220
|
+
User = 1
|
|
218
221
|
}
|
|
219
|
-
|
|
222
|
+
//#endregion
|
|
223
|
+
//#region src/lib/utils/IntentsBitField.d.ts
|
|
220
224
|
type IntentResolvable = number | bigint | GatewayIntentBits | GatewayIntentBits[];
|
|
221
225
|
declare class IntentsBitField {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
226
|
+
private readonly value;
|
|
227
|
+
constructor(input: IntentResolvable);
|
|
228
|
+
static resolve(input: IntentResolvable): bigint;
|
|
229
|
+
has(intent: GatewayIntentBits): boolean;
|
|
230
|
+
toBigInt(): bigint;
|
|
231
|
+
toNumber(): number;
|
|
232
|
+
toJSON(): string;
|
|
233
|
+
toString(): string;
|
|
230
234
|
}
|
|
231
|
-
|
|
235
|
+
//#endregion
|
|
236
|
+
//#region src/lib/client/Client.d.ts
|
|
232
237
|
interface ClientOptions {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
238
|
+
token: string;
|
|
239
|
+
intents: IntentResolvable | IntentsBitField;
|
|
240
|
+
sharding?: ClientShardingOptions;
|
|
241
|
+
partials?: Partial$1[];
|
|
237
242
|
}
|
|
238
|
-
type ClientShardingOptions = Omit<ShardingManagerOptions, "token" | "intents">;
|
|
243
|
+
type ClientShardingOptions = Omit<ShardingManagerOptions$1, "token" | "intents">;
|
|
239
244
|
interface ClientEvents {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
245
|
+
ready: [user: User];
|
|
246
|
+
error: [error: Error];
|
|
247
|
+
dispatch: [shardId: number, payload: GatewayDispatchPayload];
|
|
248
|
+
raw: [shardId: number, payload: GatewayReceivePayload];
|
|
249
|
+
messageCreate: [message: Message];
|
|
250
|
+
messageUpdate: [message: Message];
|
|
251
|
+
messageDelete: [message: {
|
|
252
|
+
id: string;
|
|
253
|
+
channelId: string;
|
|
254
|
+
guildId?: string;
|
|
255
|
+
}];
|
|
256
|
+
userUpdate: [user: User];
|
|
257
|
+
guildCreate: [guild: Guild];
|
|
258
|
+
guildAvailable: [guild: Guild];
|
|
259
|
+
guildUpdate: [guild: Guild];
|
|
260
|
+
guildDelete: [guild: Guild];
|
|
261
|
+
channelCreate: [channel: Channel];
|
|
262
|
+
channelUpdate: [channel: Channel];
|
|
263
|
+
channelDelete: [channel: Channel];
|
|
259
264
|
}
|
|
260
265
|
declare class Client extends EventEmitter<ClientEvents> {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
266
|
+
#private;
|
|
267
|
+
readonly options: Omit<Required<ClientOptions>, "partials" | "intents"> & {
|
|
268
|
+
partials: Set<Partial$1>;
|
|
269
|
+
intents: IntentsBitField;
|
|
270
|
+
};
|
|
271
|
+
readonly shards: ShardingManager$1;
|
|
272
|
+
readonly rest: RESTLike$1;
|
|
273
|
+
readonly helper: ClientHelper;
|
|
274
|
+
readonly guilds: Collection<string, Guild>;
|
|
275
|
+
constructor(options: ClientOptions, rest?: RESTLike$1);
|
|
276
|
+
get user(): User | undefined;
|
|
277
|
+
login(): Promise<void>;
|
|
273
278
|
}
|
|
274
279
|
declare function createClient(options: ClientOptions): Client;
|
|
275
|
-
|
|
276
|
-
export {
|
|
280
|
+
//#endregion
|
|
281
|
+
export { type AbstractConstructor, type Awaitable, BaseChannel, BaseChannelPayload, type BaseRESTEvents, Channel, Client, ClientEvents, ClientHelper, ClientOptions, ClientShardingOptions, Cluster, type ClusterEvents, type ClusterOptions, type Constructor, DEFAULT_REST_OPTIONS, discord_api_types_v100 as DiscordAPIV10, DiscordHTTPError, type DiscordHTTPErrorRequest, type DiscordHTTPFlattenedError, type DiscordHTTPValidationError, type FunctionLike, Guild, GuildChannel, GuildPayload, GuildTextChannel, GuildVoiceChannel, Intent, IntentResolvable, IntentsBitField, Message, MessageCreateOptions, MessagePayload, MessageReplyOptions, Partial$1 as Partial, type Promisify, type PromisifyValue, REST, RESTAdapter, type RESTAdapterEvents, type RESTEndpoint, type RESTEvents, type RESTLike, RESTMethod, type RESTOptions, type RESTProxyOptions, type RESTRequestFn, type RESTRequestOptions, type RPCHandler, type RejectFn, type ResolveFn, Service, type ServiceClientRuntime, ServiceDriver, type ServiceOptions, ServiceProcess, type ServiceProcessEvents, type ServiceServerRuntime, ServiceState, Shard, type ShardEvents, type ShardOptions, ShardState, ShardStrategy, ShardingManager, type ShardingManagerEvents, type ShardingManagerOptions, TextBasedChannel, TransportClient, type TransportClientEvents, TransportServer, type TransportServerEvents, User, UserPayload, VoiceBasedChannel, capitalize, createClient, createREST, createRESTAdapter, createService, createTransportClient, createTransportServer, instanceToObject, isCommonJS, isESM, isPlainObject, isPromiseLike, promisify, sleep };
|
|
282
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/lib/structures/BaseStructure.ts","../src/lib/structures/channel/GuildTextChannel.ts","../src/lib/structures/channel/GuildVoiceChannel.ts","../src/lib/structures/channel/BaseChannel.ts","../src/lib/structures/Guild.ts","../src/lib/structures/User.ts","../src/lib/client/ClientHelper.ts","../src/lib/structures/Message.ts","../src/lib/client/Partial.ts","../src/lib/utils/IntentsBitField.ts","../src/lib/client/Client.ts"],"mappings":";;;;;;;;;;;cAEa,aAAA;EACG,MAAA,EAAQ,MAAA;cAEJ,MAAA,EAAQ,MAAA;EAQpB,MAAA,CAAA;AAAA;;;cCTsE,qBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;cAEjE,gBAAA,SAAyB,qBAAA;;;cCH4B,sBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAErD,iBAAA,SAA0B,sBAAA;;;KCS3B,kBAAA,GACT,cAAA,CAAe,WAAA,IACf,gCAAA,GACA,gCAAA,GACA,UAAA;AAAA,KAES,gBAAA,GAAmB,gBAAA,GAAmB,iBAAA;AAAA,KACtC,iBAAA,GAAoB,iBAAA;AAAA,KACpB,YAAA,GAAe,gBAAA,GAAmB,iBAAA;AAAA,KAElC,OAAA,GAAU,gBAAA,GAAmB,iBAAA,GAAoB,YAAA;AAAA,uBAEvC,WAAA,WAAsB,kBAAA,UAA4B,aAAA;EAG/D,IAAA,EAAM,CAAA;cADb,MAAA,EAAQ,MAAA,EACD,IAAA,EAAM,CAAA;EAAA,IAKH,EAAA,CAAA;EAAA,IAIA,IAAA,CAAA,GAAI,WAAA;EAIC,QAAA,CAAA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