bakit 2.2.4 → 3.0.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/dist/index.cjs +672 -0
- package/dist/index.d.cts +276 -0
- package/dist/index.d.ts +254 -126
- package/dist/index.js +502 -344
- package/package.json +19 -12
- package/dist/cli.js +0 -79
package/dist/index.d.ts
CHANGED
|
@@ -1,148 +1,276 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
export {
|
|
5
|
-
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { ShardingManagerOptions, ShardingManager } from '@bakit/gateway';
|
|
2
|
+
export { Cluster, ClusterEvents, ClusterOptions, Shard, ShardEvents, ShardOptions, ShardState, ShardStrategy, ShardingManager, ShardingManagerEvents, ShardingManagerOptions } from '@bakit/gateway';
|
|
3
|
+
import { RESTLike } from '@bakit/rest';
|
|
4
|
+
export { BaseRESTEvents, DEFAULT_REST_OPTIONS, DiscordHTTPError, DiscordHTTPErrorRequest, DiscordHTTPFlattenedError, DiscordHTTPValidationError, REST, RESTAdapter, RESTAdapterEvents, RESTEndpoint, RESTEvents, RESTLike, RESTMethod, RESTOptions, RESTProxyOptions, RESTRequestFn, RESTRequestOptions, createREST, createRESTAdapter } from '@bakit/rest';
|
|
5
|
+
export { RPCHandler, Service, ServiceClientRuntime, ServiceDriver, ServiceOptions, ServiceProcess, ServiceProcessEvents, ServiceServerRuntime, ServiceState, TransportClient, TransportClientEvents, TransportServer, TransportServerEvents, createService, createTransportClient, createTransportServer } from '@bakit/service';
|
|
6
|
+
import * as _bakit_utils from '@bakit/utils';
|
|
7
|
+
export { AbstractConstructor, Awaitable, Constructor, FunctionLike, Promisify, PromisifyValue, RejectFn, ResolveFn, capitalize, instanceToObject, isCommonJS, isESM, isPlainObject, isPromiseLike, promisify, sleep } from '@bakit/utils';
|
|
8
|
+
import EventEmitter from 'node:events';
|
|
9
|
+
import { Collection } from '@discordjs/collection';
|
|
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';
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
readonly discriminator: string;
|
|
16
|
-
readonly globalName?: string | null;
|
|
17
|
-
readonly avatar?: string | null;
|
|
18
|
-
readonly system?: boolean;
|
|
19
|
-
readonly mfaEnabled?: boolean;
|
|
20
|
-
readonly banner?: string | null;
|
|
21
|
-
readonly accentColor?: number;
|
|
22
|
-
readonly locale?: string;
|
|
23
|
-
readonly verified?: boolean;
|
|
24
|
-
readonly email?: string | null;
|
|
25
|
-
readonly flags?: number;
|
|
26
|
-
readonly premiumType?: number;
|
|
27
|
-
readonly publicFlags?: number;
|
|
15
|
+
declare class BaseStructure {
|
|
16
|
+
client: Client;
|
|
17
|
+
constructor(client: Client);
|
|
18
|
+
toJSON(): {};
|
|
28
19
|
}
|
|
29
|
-
declare function createUser(client: Client, data: APIUser): User;
|
|
30
20
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
21
|
+
declare const GuildTextChannel_base: (abstract new (client: Client, data: APITextBasedChannel<ChannelType.GuildText>) => BaseChannel<APITextBasedChannel<ChannelType.GuildText>>) & (abstract new (...args: any[]) => {
|
|
22
|
+
get guildId(): string;
|
|
23
|
+
get guild(): Guild;
|
|
24
|
+
data: discord_api_types_v10.APIGuildChannel<discord_api_types_v10.GuildChannelType>;
|
|
25
|
+
get id(): string;
|
|
26
|
+
get type(): ChannelType;
|
|
27
|
+
toString(): string;
|
|
28
|
+
toJSON(): discord_api_types_v10.APIGuildChannel<discord_api_types_v10.GuildChannelType>;
|
|
29
|
+
isTextBased(): this is TextBasedChannel;
|
|
30
|
+
isVoiceBased(): this is VoiceBasedChannel;
|
|
31
|
+
inGuild(): this is GuildChannel;
|
|
32
|
+
_patch(data: Partial<discord_api_types_v10.APIGuildChannel<discord_api_types_v10.GuildChannelType>>): void;
|
|
33
|
+
client: Client;
|
|
34
|
+
}) & _bakit_utils.AbstractConstructor<BaseChannel<discord_api_types_v10.APIGuildChannel<discord_api_types_v10.GuildChannelType>>> & (abstract new (...args: any[]) => {
|
|
35
|
+
send(options: MessageCreateOptions): Promise<discord_api_types_v10.APIMessage>;
|
|
36
|
+
data: APITextBasedChannel<ChannelType>;
|
|
37
|
+
get id(): string;
|
|
38
|
+
get type(): ChannelType;
|
|
39
|
+
toString(): string;
|
|
40
|
+
toJSON(): APITextBasedChannel<ChannelType>;
|
|
41
|
+
isTextBased(): this is TextBasedChannel;
|
|
42
|
+
isVoiceBased(): this is VoiceBasedChannel;
|
|
43
|
+
inGuild(): this is GuildChannel;
|
|
44
|
+
_patch(data: Partial<APITextBasedChannel<ChannelType>>): void;
|
|
45
|
+
client: Client;
|
|
46
|
+
}) & _bakit_utils.AbstractConstructor<BaseChannel<APITextBasedChannel<ChannelType>>>;
|
|
47
|
+
declare class GuildTextChannel extends GuildTextChannel_base {
|
|
52
48
|
}
|
|
53
|
-
declare function createMessage(client: Client, data: APIMessage | GatewayMessageCreateDispatchData): Message;
|
|
54
49
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
50
|
+
declare const GuildVoiceChannel_base: (abstract new (client: Client, data: APIGuildVoiceChannel) => BaseChannel<APIGuildVoiceChannel>) & (abstract new (...args: any[]) => {
|
|
51
|
+
get guildId(): string;
|
|
52
|
+
get guild(): Guild;
|
|
53
|
+
data: discord_api_types_v10.APIGuildChannel<discord_api_types_v10.GuildChannelType>;
|
|
54
|
+
get id(): string;
|
|
55
|
+
get type(): discord_api_types_v10.ChannelType;
|
|
56
|
+
toString(): string;
|
|
57
|
+
toJSON(): discord_api_types_v10.APIGuildChannel<discord_api_types_v10.GuildChannelType>;
|
|
58
|
+
isTextBased(): this is TextBasedChannel;
|
|
59
|
+
isVoiceBased(): this is VoiceBasedChannel;
|
|
60
|
+
inGuild(): this is GuildChannel;
|
|
61
|
+
_patch(data: Partial<discord_api_types_v10.APIGuildChannel<discord_api_types_v10.GuildChannelType>>): void;
|
|
62
|
+
client: Client;
|
|
63
|
+
}) & _bakit_utils.AbstractConstructor<BaseChannel<discord_api_types_v10.APIGuildChannel<discord_api_types_v10.GuildChannelType>>> & (abstract new (...args: any[]) => {
|
|
64
|
+
send(options: MessageCreateOptions): Promise<discord_api_types_v10.APIMessage>;
|
|
65
|
+
data: discord_api_types_v10.APITextBasedChannel<discord_api_types_v10.ChannelType>;
|
|
66
|
+
get id(): string;
|
|
67
|
+
get type(): discord_api_types_v10.ChannelType;
|
|
68
|
+
toString(): string;
|
|
69
|
+
toJSON(): discord_api_types_v10.APITextBasedChannel<discord_api_types_v10.ChannelType>;
|
|
70
|
+
isTextBased(): this is TextBasedChannel;
|
|
71
|
+
isVoiceBased(): this is VoiceBasedChannel;
|
|
72
|
+
inGuild(): this is GuildChannel;
|
|
73
|
+
_patch(data: Partial<discord_api_types_v10.APITextBasedChannel<discord_api_types_v10.ChannelType>>): void;
|
|
74
|
+
client: Client;
|
|
75
|
+
}) & _bakit_utils.AbstractConstructor<BaseChannel<discord_api_types_v10.APITextBasedChannel<discord_api_types_v10.ChannelType>>> & (abstract new (...args: any[]) => {
|
|
76
|
+
data: discord_api_types_v10.APIVoiceChannelBase<discord_api_types_v10.GuildChannelType>;
|
|
77
|
+
get id(): string;
|
|
78
|
+
get type(): discord_api_types_v10.ChannelType;
|
|
79
|
+
toString(): string;
|
|
80
|
+
toJSON(): discord_api_types_v10.APIVoiceChannelBase<discord_api_types_v10.GuildChannelType>;
|
|
81
|
+
isTextBased(): this is TextBasedChannel;
|
|
82
|
+
isVoiceBased(): this is VoiceBasedChannel;
|
|
83
|
+
inGuild(): this is GuildChannel;
|
|
84
|
+
_patch(data: Partial<discord_api_types_v10.APIVoiceChannelBase<discord_api_types_v10.GuildChannelType>>): void;
|
|
85
|
+
client: Client;
|
|
86
|
+
}) & _bakit_utils.AbstractConstructor<BaseChannel<discord_api_types_v10.APIVoiceChannelBase<discord_api_types_v10.GuildChannelType>>>;
|
|
87
|
+
declare class GuildVoiceChannel extends GuildVoiceChannel_base {
|
|
60
88
|
}
|
|
61
|
-
|
|
62
|
-
|
|
89
|
+
|
|
90
|
+
type BaseChannelPayload = APIChannelBase<ChannelType> | GatewayChannelCreateDispatchData | GatewayChannelUpdateDispatchData | APIChannel;
|
|
91
|
+
type TextBasedChannel = GuildTextChannel | GuildVoiceChannel;
|
|
92
|
+
type VoiceBasedChannel = GuildVoiceChannel;
|
|
93
|
+
type GuildChannel = GuildTextChannel | GuildVoiceChannel;
|
|
94
|
+
type Channel = TextBasedChannel | VoiceBasedChannel | GuildChannel;
|
|
95
|
+
declare abstract class BaseChannel<D extends BaseChannelPayload> extends BaseStructure {
|
|
96
|
+
data: D;
|
|
97
|
+
constructor(client: Client, data: D);
|
|
98
|
+
get id(): string;
|
|
99
|
+
get type(): ChannelType;
|
|
100
|
+
toString(): string;
|
|
101
|
+
toJSON(): D;
|
|
102
|
+
isTextBased(): this is TextBasedChannel;
|
|
103
|
+
isVoiceBased(): this is VoiceBasedChannel;
|
|
104
|
+
inGuild(): this is GuildChannel;
|
|
105
|
+
_patch(data: Partial<D>): void;
|
|
63
106
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
107
|
+
|
|
108
|
+
type GuildPayload = APIGuild | GatewayGuildUpdateDispatchData | GatewayGuildCreateDispatchData;
|
|
109
|
+
declare class Guild extends BaseStructure {
|
|
110
|
+
data: GuildPayload;
|
|
111
|
+
private cachedChannels;
|
|
112
|
+
constructor(client: Client, data: GuildPayload);
|
|
113
|
+
get id(): string;
|
|
114
|
+
get name(): string;
|
|
115
|
+
get icon(): string | null;
|
|
116
|
+
get banner(): string | null;
|
|
117
|
+
get owner(): string;
|
|
118
|
+
get mfaLevel(): discord_api_types_v10.GuildMFALevel;
|
|
119
|
+
get verificationLevel(): discord_api_types_v10.GuildVerificationLevel;
|
|
120
|
+
get channels(): Collection<string, Channel>;
|
|
121
|
+
_patch(data: Partial<GuildPayload>): void;
|
|
68
122
|
}
|
|
69
|
-
|
|
123
|
+
|
|
124
|
+
type UserPayload = APIUser | GatewayReadyDispatchData["user"];
|
|
125
|
+
declare class User extends BaseStructure {
|
|
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_v10.UserFlags | undefined;
|
|
142
|
+
get premiumType(): discord_api_types_v10.UserPremiumType | undefined;
|
|
143
|
+
get publicFlags(): discord_api_types_v10.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;
|
|
70
161
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
162
|
+
|
|
163
|
+
interface MessageCreateOptions {
|
|
164
|
+
content?: string;
|
|
165
|
+
tts?: boolean;
|
|
166
|
+
embeds?: APIEmbed[];
|
|
167
|
+
allowedMentions?: APIAllowedMentions;
|
|
168
|
+
messageReference?: APIMessageReference;
|
|
169
|
+
flags?: number;
|
|
77
170
|
}
|
|
78
|
-
|
|
171
|
+
type MessageReplyOptions = Omit<MessageCreateOptions, "messageReference">;
|
|
172
|
+
declare class ClientHelper {
|
|
79
173
|
readonly client: Client;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
readonly recipients?: User[];
|
|
95
|
-
}
|
|
96
|
-
interface GuildTextChannel extends BaseChannel, GuildTextBasedChannelSingleton {
|
|
97
|
-
}
|
|
98
|
-
interface VoiceChannel extends GuildTextChannel, VoiceBasedChannelSingleton {
|
|
99
|
-
}
|
|
100
|
-
interface StageChannel extends GuildTextChannel, VoiceBasedChannelSingleton {
|
|
101
|
-
}
|
|
102
|
-
interface PublicThreadChannel extends BaseChannel, ThreadBasedChannelSingleton {
|
|
174
|
+
constructor(client: Client);
|
|
175
|
+
fetchMessage(channelId: string, messageId: string): Promise<Message>;
|
|
176
|
+
deleteMessage(channelId: string, messageId: string): Promise<unknown>;
|
|
177
|
+
createMessage(channelId: string, options: MessageCreateOptions): Promise<APIMessage>;
|
|
178
|
+
replyMessage(channelId: string, messageId: string, options: MessageReplyOptions): Promise<APIMessage>;
|
|
179
|
+
fetchGuild(guildId: string): Promise<Guild>;
|
|
180
|
+
static toAPICreateMessagePayload(options: MessageCreateOptions): {
|
|
181
|
+
content: string | undefined;
|
|
182
|
+
tts: boolean | undefined;
|
|
183
|
+
embeds: APIEmbed[] | undefined;
|
|
184
|
+
allowed_mentions: APIAllowedMentions | undefined;
|
|
185
|
+
message_reference: APIMessageReference | undefined;
|
|
186
|
+
flags: number | undefined;
|
|
187
|
+
};
|
|
103
188
|
}
|
|
104
|
-
|
|
189
|
+
|
|
190
|
+
type MessagePayload = APIMessage | GatewayMessageCreateDispatchData | GatewayMessageUpdateDispatchData;
|
|
191
|
+
declare class Message extends BaseStructure {
|
|
192
|
+
data: MessagePayload;
|
|
193
|
+
protected cachedAuthor?: User;
|
|
194
|
+
constructor(client: Client, data: MessagePayload);
|
|
195
|
+
get partial(): boolean;
|
|
196
|
+
get content(): string;
|
|
197
|
+
get id(): string;
|
|
198
|
+
get channelId(): string;
|
|
199
|
+
get channel(): TextBasedChannel;
|
|
200
|
+
get guildId(): string | undefined;
|
|
201
|
+
get guild(): Guild | undefined;
|
|
202
|
+
get author(): User;
|
|
203
|
+
get createdAt(): Date;
|
|
204
|
+
get editedAt(): Date | undefined;
|
|
205
|
+
get createdTimestamp(): number;
|
|
206
|
+
get editedTimestamp(): number | undefined;
|
|
207
|
+
get url(): string;
|
|
208
|
+
fetch(): Promise<Message>;
|
|
209
|
+
reply(options: MessageReplyOptions): Promise<APIMessage>;
|
|
210
|
+
sendToChannel(options: MessageReplyOptions): Promise<APIMessage>;
|
|
211
|
+
toJSON(): MessagePayload;
|
|
212
|
+
toString(): string;
|
|
105
213
|
}
|
|
106
|
-
type Channel = GuildTextChannel | DMChannel | PublicThreadChannel | VoiceChannel | StageChannel | BaseChannel;
|
|
107
|
-
declare function createChannel(client: Client, data: APIChannel): Channel;
|
|
108
|
-
declare function createBaseChannel(client: Client, data: APIChannelBase<ChannelType>): BaseChannel;
|
|
109
|
-
declare function createGuildTextChannel(client: Client, data: APIGuildTextChannel<ChannelType.GuildText>): GuildTextChannel;
|
|
110
|
-
declare function createDMChannel(client: Client, data: APIDMChannel): DMChannel;
|
|
111
|
-
declare function createPublicThreadChannel(client: Client, data: APIPublicThreadChannel): PublicThreadChannel;
|
|
112
|
-
declare function createPrivateThreadChannel(client: Client, data: APIPrivateThreadChannel): PrivateThreadChannel;
|
|
113
|
-
declare function createVoiceChannel(client: Client, data: APIGuildTextChannel<ChannelType.GuildVoice>): VoiceChannel;
|
|
114
|
-
declare function createStageChannel(client: Client, data: APIGuildTextChannel<ChannelType.GuildStageVoice>): StageChannel;
|
|
115
|
-
declare function createTextBasedChannelSingleton(client: Client, data: APITextBasedChannel<TextChannelType>): TextBasedChannelSingleton;
|
|
116
|
-
declare function createVoiceBasedChannelSingleton(_client: Client, _data: APIChannelBase<ChannelType.GuildVoice> | APIChannelBase<ChannelType.GuildStageVoice>): VoiceBasedChannelSingleton;
|
|
117
|
-
declare function createGuildBasedChannelSingleton(data: APIGuildChannel): GuildBasedChannelSingleton;
|
|
118
|
-
declare function createGuildTextBasedChannelSingleton(client: Client, data: APIGuildTextChannel<GuildTextChannelType>): GuildTextBasedChannelSingleton;
|
|
119
|
-
declare function createThreadBasedChannelSingleton(client: Client, data: APIThreadChannel): ThreadBasedChannelSingleton;
|
|
120
214
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
215
|
+
declare enum Partial$1 {
|
|
216
|
+
Message = 0,
|
|
217
|
+
User = 1
|
|
124
218
|
}
|
|
125
219
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
}
|
|
220
|
+
type IntentResolvable = number | bigint | GatewayIntentBits | GatewayIntentBits[];
|
|
221
|
+
declare class IntentsBitField {
|
|
222
|
+
private readonly value;
|
|
223
|
+
constructor(input: IntentResolvable);
|
|
224
|
+
static resolve(input: IntentResolvable): bigint;
|
|
225
|
+
has(intent: GatewayIntentBits): boolean;
|
|
226
|
+
toBigInt(): bigint;
|
|
227
|
+
toNumber(): number;
|
|
228
|
+
toJSON(): string;
|
|
229
|
+
toString(): string;
|
|
230
|
+
}
|
|
137
231
|
|
|
138
|
-
interface
|
|
139
|
-
|
|
140
|
-
|
|
232
|
+
interface ClientOptions {
|
|
233
|
+
token: string;
|
|
234
|
+
intents: IntentResolvable | IntentsBitField;
|
|
235
|
+
sharding?: ClientShardingOptions;
|
|
236
|
+
partials?: Partial$1[];
|
|
141
237
|
}
|
|
238
|
+
type ClientShardingOptions = Omit<ShardingManagerOptions, "token" | "intents">;
|
|
142
239
|
interface ClientEvents {
|
|
143
|
-
|
|
240
|
+
ready: [user: User];
|
|
241
|
+
error: [error: Error];
|
|
242
|
+
dispatch: [shardId: number, payload: GatewayDispatchPayload];
|
|
243
|
+
raw: [shardId: number, payload: GatewayReceivePayload];
|
|
144
244
|
messageCreate: [message: Message];
|
|
245
|
+
messageUpdate: [message: Message];
|
|
246
|
+
messageDelete: [message: {
|
|
247
|
+
id: string;
|
|
248
|
+
channelId: string;
|
|
249
|
+
guildId?: string;
|
|
250
|
+
}];
|
|
251
|
+
userUpdate: [user: User];
|
|
252
|
+
guildCreate: [guild: Guild];
|
|
253
|
+
guildAvailable: [guild: Guild];
|
|
254
|
+
guildUpdate: [guild: Guild];
|
|
255
|
+
guildDelete: [guild: Guild];
|
|
256
|
+
channelCreate: [channel: Channel];
|
|
257
|
+
channelUpdate: [channel: Channel];
|
|
258
|
+
channelDelete: [channel: Channel];
|
|
259
|
+
}
|
|
260
|
+
declare class Client extends EventEmitter<ClientEvents> {
|
|
261
|
+
#private;
|
|
262
|
+
readonly options: Omit<Required<ClientOptions>, "partials" | "intents"> & {
|
|
263
|
+
partials: Set<Partial$1>;
|
|
264
|
+
intents: IntentsBitField;
|
|
265
|
+
};
|
|
266
|
+
readonly shards: ShardingManager;
|
|
267
|
+
readonly rest: RESTLike;
|
|
268
|
+
readonly helper: ClientHelper;
|
|
269
|
+
readonly guilds: Collection<string, Guild>;
|
|
270
|
+
constructor(options: ClientOptions, rest?: RESTLike);
|
|
271
|
+
get user(): User | undefined;
|
|
272
|
+
login(): Promise<void>;
|
|
145
273
|
}
|
|
146
|
-
declare function createClient(
|
|
274
|
+
declare function createClient(options: ClientOptions): Client;
|
|
147
275
|
|
|
148
|
-
export { type
|
|
276
|
+
export { BaseChannel, type BaseChannelPayload, type Channel, Client, type ClientEvents, ClientHelper, type ClientOptions, type ClientShardingOptions, Guild, type GuildChannel, type GuildPayload, GuildTextChannel, GuildVoiceChannel, type IntentResolvable, IntentsBitField, Message, type MessageCreateOptions, type MessagePayload, type MessageReplyOptions, Partial$1 as Partial, type TextBasedChannel, User, type UserPayload, type VoiceBasedChannel, createClient };
|