|
|
@@ -641,7 +641,7 @@ export class ClientUser extends User {
|
|
|
|
public setPresence(data: PresenceData): ClientPresence;
|
|
|
|
public setPresence(data: PresenceData): ClientPresence;
|
|
|
|
public setStatus(status: PresenceStatusData, shardId?: number | number[]): ClientPresence;
|
|
|
|
public setStatus(status: PresenceStatusData, shardId?: number | number[]): ClientPresence;
|
|
|
|
public setUsername(username: string, password: string): Promise<this>;
|
|
|
|
public setUsername(username: string, password: string): Promise<this>;
|
|
|
|
public setHypeSquad(type: HypeSquadOptions<Number|String>): Promise<void>;
|
|
|
|
public setHypeSquad(type: HypeSquadOptions<Number | String>): Promise<void>;
|
|
|
|
public setAccentColor(color: ColorResolvable): Promise<this>;
|
|
|
|
public setAccentColor(color: ColorResolvable): Promise<this>;
|
|
|
|
public setDiscriminator(discriminator: string, password: string): Promise<this>;
|
|
|
|
public setDiscriminator(discriminator: string, password: string): Promise<this>;
|
|
|
|
public setAboutMe(bio: string): Promise<this>;
|
|
|
|
public setAboutMe(bio: string): Promise<this>;
|
|
|
@@ -1046,7 +1046,7 @@ export class GuildAuditLogsEntry<
|
|
|
|
TTargetType extends GuildAuditLogsTarget = TAction extends keyof GuildAuditLogsTypes
|
|
|
|
TTargetType extends GuildAuditLogsTarget = TAction extends keyof GuildAuditLogsTypes
|
|
|
|
? GuildAuditLogsTypes[TAction][0]
|
|
|
|
? GuildAuditLogsTypes[TAction][0]
|
|
|
|
: 'UNKNOWN',
|
|
|
|
: 'UNKNOWN',
|
|
|
|
> {
|
|
|
|
> {
|
|
|
|
private constructor(logs: GuildAuditLogs, guild: Guild, data: RawGuildAuditLogEntryData);
|
|
|
|
private constructor(logs: GuildAuditLogs, guild: Guild, data: RawGuildAuditLogEntryData);
|
|
|
|
public action: TAction;
|
|
|
|
public action: TAction;
|
|
|
|
public actionType: TActionType;
|
|
|
|
public actionType: TActionType;
|
|
|
@@ -1284,7 +1284,7 @@ export class HTTPError extends Error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// tslint:disable-next-line:no-empty-interface - Merge RateLimitData into RateLimitError to not have to type it again
|
|
|
|
// tslint:disable-next-line:no-empty-interface - Merge RateLimitData into RateLimitError to not have to type it again
|
|
|
|
export interface RateLimitError extends RateLimitData {}
|
|
|
|
export interface RateLimitError extends RateLimitData { }
|
|
|
|
export class RateLimitError extends Error {
|
|
|
|
export class RateLimitError extends Error {
|
|
|
|
private constructor(data: RateLimitData);
|
|
|
|
private constructor(data: RateLimitData);
|
|
|
|
public name: 'RateLimitError';
|
|
|
|
public name: 'RateLimitError';
|
|
|
@@ -1337,7 +1337,7 @@ export type CacheTypeReducer<
|
|
|
|
RawType = CachedType,
|
|
|
|
RawType = CachedType,
|
|
|
|
PresentType = CachedType | RawType,
|
|
|
|
PresentType = CachedType | RawType,
|
|
|
|
Fallback = PresentType | null,
|
|
|
|
Fallback = PresentType | null,
|
|
|
|
> = [State] extends ['cached']
|
|
|
|
> = [State] extends ['cached']
|
|
|
|
? CachedType
|
|
|
|
? CachedType
|
|
|
|
: [State] extends ['raw']
|
|
|
|
: [State] extends ['raw']
|
|
|
|
? RawType
|
|
|
|
? RawType
|
|
|
@@ -1489,7 +1489,7 @@ export type MessageCollectorOptionsParams<T extends MessageComponentTypeResolvab
|
|
|
|
export type MessageChannelCollectorOptionsParams<
|
|
|
|
export type MessageChannelCollectorOptionsParams<
|
|
|
|
T extends MessageComponentTypeResolvable,
|
|
|
|
T extends MessageComponentTypeResolvable,
|
|
|
|
Cached extends boolean = boolean,
|
|
|
|
Cached extends boolean = boolean,
|
|
|
|
> =
|
|
|
|
> =
|
|
|
|
| {
|
|
|
|
| {
|
|
|
|
componentType?: T;
|
|
|
|
componentType?: T;
|
|
|
|
} & MessageChannelComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
|
|
|
|
} & MessageChannelComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
|
|
|
@@ -1497,7 +1497,7 @@ export type MessageChannelCollectorOptionsParams<
|
|
|
|
export type AwaitMessageCollectorOptionsParams<
|
|
|
|
export type AwaitMessageCollectorOptionsParams<
|
|
|
|
T extends MessageComponentTypeResolvable,
|
|
|
|
T extends MessageComponentTypeResolvable,
|
|
|
|
Cached extends boolean = boolean,
|
|
|
|
Cached extends boolean = boolean,
|
|
|
|
> =
|
|
|
|
> =
|
|
|
|
| { componentType?: T } & Pick<
|
|
|
|
| { componentType?: T } & Pick<
|
|
|
|
InteractionCollectorOptions<MappedInteractionTypes<Cached>[T]>,
|
|
|
|
InteractionCollectorOptions<MappedInteractionTypes<Cached>[T]>,
|
|
|
|
keyof AwaitMessageComponentOptions<any>
|
|
|
|
keyof AwaitMessageComponentOptions<any>
|
|
|
@@ -1710,7 +1710,7 @@ export class MessageComponentInteraction<Cached extends CacheType = CacheType> e
|
|
|
|
|
|
|
|
|
|
|
|
export class MessageContextMenuInteraction<
|
|
|
|
export class MessageContextMenuInteraction<
|
|
|
|
Cached extends CacheType = CacheType,
|
|
|
|
Cached extends CacheType = CacheType,
|
|
|
|
> extends ContextMenuInteraction<Cached> {
|
|
|
|
> extends ContextMenuInteraction<Cached> {
|
|
|
|
public readonly targetMessage: NonNullable<CommandInteractionOption<Cached>['message']>;
|
|
|
|
public readonly targetMessage: NonNullable<CommandInteractionOption<Cached>['message']>;
|
|
|
|
public inGuild(): this is MessageContextMenuInteraction<'present'>;
|
|
|
|
public inGuild(): this is MessageContextMenuInteraction<'present'>;
|
|
|
|
public inCachedGuild(): this is MessageContextMenuInteraction<'cached'>;
|
|
|
|
public inCachedGuild(): this is MessageContextMenuInteraction<'cached'>;
|
|
|
@@ -2965,7 +2965,7 @@ export class ApplicationCommandManager<
|
|
|
|
ApplicationCommandScope = ApplicationCommand<{ guild: GuildResolvable }>,
|
|
|
|
ApplicationCommandScope = ApplicationCommand<{ guild: GuildResolvable }>,
|
|
|
|
PermissionsOptionsExtras = { guild: GuildResolvable },
|
|
|
|
PermissionsOptionsExtras = { guild: GuildResolvable },
|
|
|
|
PermissionsGuildType = null,
|
|
|
|
PermissionsGuildType = null,
|
|
|
|
> extends CachedManager<Snowflake, ApplicationCommandScope, ApplicationCommandResolvable> {
|
|
|
|
> extends CachedManager<Snowflake, ApplicationCommandScope, ApplicationCommandResolvable> {
|
|
|
|
protected constructor(client: Client, iterable?: Iterable<unknown>, user: User);
|
|
|
|
protected constructor(client: Client, iterable?: Iterable<unknown>, user: User);
|
|
|
|
public permissions: ApplicationCommandPermissionsManager<
|
|
|
|
public permissions: ApplicationCommandPermissionsManager<
|
|
|
|
{ command?: ApplicationCommandResolvable } & PermissionsOptionsExtras,
|
|
|
|
{ command?: ApplicationCommandResolvable } & PermissionsOptionsExtras,
|
|
|
@@ -3012,7 +3012,7 @@ export class ApplicationCommandPermissionsManager<
|
|
|
|
FullPermissionsOptions,
|
|
|
|
FullPermissionsOptions,
|
|
|
|
GuildType,
|
|
|
|
GuildType,
|
|
|
|
CommandIdType,
|
|
|
|
CommandIdType,
|
|
|
|
> extends BaseManager {
|
|
|
|
> extends BaseManager {
|
|
|
|
private constructor(manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand, user: User);
|
|
|
|
private constructor(manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand, user: User);
|
|
|
|
private manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand;
|
|
|
|
private manager: ApplicationCommandManager | GuildApplicationCommandManager | ApplicationCommand;
|
|
|
|
|
|
|
|
|
|
|
@@ -4140,6 +4140,10 @@ export interface ClientOptions {
|
|
|
|
ws?: WebSocketOptions;
|
|
|
|
ws?: WebSocketOptions;
|
|
|
|
http?: HTTPOptions;
|
|
|
|
http?: HTTPOptions;
|
|
|
|
rejectOnRateLimit?: string[] | ((data: RateLimitData) => boolean | Promise<boolean>);
|
|
|
|
rejectOnRateLimit?: string[] | ((data: RateLimitData) => boolean | Promise<boolean>);
|
|
|
|
|
|
|
|
// add
|
|
|
|
|
|
|
|
checkUpdate?: boolean;
|
|
|
|
|
|
|
|
readyStatus?: boolean;
|
|
|
|
|
|
|
|
autoCookie?: boolean;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export type ClientPresenceStatus = 'online' | 'idle' | 'dnd';
|
|
|
|
export type ClientPresenceStatus = 'online' | 'idle' | 'dnd';
|
|
|
@@ -4714,8 +4718,8 @@ export interface GuildAuditLogsEntryTargetField<TActionType extends GuildAuditLo
|
|
|
|
INVITE: Invite;
|
|
|
|
INVITE: Invite;
|
|
|
|
MESSAGE: TActionType extends 'MESSAGE_BULK_DELETE' ? Guild | { id: Snowflake } : User;
|
|
|
|
MESSAGE: TActionType extends 'MESSAGE_BULK_DELETE' ? Guild | { id: Snowflake } : User;
|
|
|
|
INTEGRATION: Integration;
|
|
|
|
INTEGRATION: Integration;
|
|
|
|
CHANNEL: NonThreadGuildBasedChannel | { id: Snowflake; [x: string]: unknown };
|
|
|
|
CHANNEL: NonThreadGuildBasedChannel | { id: Snowflake;[x: string]: unknown };
|
|
|
|
THREAD: ThreadChannel | { id: Snowflake; [x: string]: unknown };
|
|
|
|
THREAD: ThreadChannel | { id: Snowflake;[x: string]: unknown };
|
|
|
|
STAGE_INSTANCE: StageInstance;
|
|
|
|
STAGE_INSTANCE: StageInstance;
|
|
|
|
STICKER: Sticker;
|
|
|
|
STICKER: Sticker;
|
|
|
|
GUILD_SCHEDULED_EVENT: GuildScheduledEvent;
|
|
|
|
GUILD_SCHEDULED_EVENT: GuildScheduledEvent;
|
|
|
@@ -4901,7 +4905,7 @@ export interface GuildScheduledEventCreateOptions {
|
|
|
|
export interface GuildScheduledEventEditOptions<
|
|
|
|
export interface GuildScheduledEventEditOptions<
|
|
|
|
S extends GuildScheduledEventStatus,
|
|
|
|
S extends GuildScheduledEventStatus,
|
|
|
|
T extends GuildScheduledEventSetStatusArg<S>,
|
|
|
|
T extends GuildScheduledEventSetStatusArg<S>,
|
|
|
|
> extends Omit<Partial<GuildScheduledEventCreateOptions>, 'channel'> {
|
|
|
|
> extends Omit<Partial<GuildScheduledEventCreateOptions>, 'channel'> {
|
|
|
|
channel?: GuildVoiceChannelResolvable | null;
|
|
|
|
channel?: GuildVoiceChannelResolvable | null;
|
|
|
|
status?: T | number;
|
|
|
|
status?: T | number;
|
|
|
|
}
|
|
|
|
}
|
|
|
@@ -4918,7 +4922,7 @@ export type GuildScheduledEventEntityType = keyof typeof GuildScheduledEventEnti
|
|
|
|
|
|
|
|
|
|
|
|
export type GuildScheduledEventManagerFetchResult<
|
|
|
|
export type GuildScheduledEventManagerFetchResult<
|
|
|
|
T extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions | FetchGuildScheduledEventsOptions,
|
|
|
|
T extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions | FetchGuildScheduledEventsOptions,
|
|
|
|
> = T extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions
|
|
|
|
> = T extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions
|
|
|
|
? GuildScheduledEvent
|
|
|
|
? GuildScheduledEvent
|
|
|
|
: Collection<Snowflake, GuildScheduledEvent>;
|
|
|
|
: Collection<Snowflake, GuildScheduledEvent>;
|
|
|
|
|
|
|
|
|
|
|
@@ -5475,24 +5479,24 @@ export type Partialize<
|
|
|
|
N extends keyof T | null = null,
|
|
|
|
N extends keyof T | null = null,
|
|
|
|
M extends keyof T | null = null,
|
|
|
|
M extends keyof T | null = null,
|
|
|
|
E extends keyof T | '' = '',
|
|
|
|
E extends keyof T | '' = '',
|
|
|
|
> = {
|
|
|
|
> = {
|
|
|
|
readonly client: Client;
|
|
|
|
readonly client: Client;
|
|
|
|
id: Snowflake;
|
|
|
|
id: Snowflake;
|
|
|
|
partial: true;
|
|
|
|
partial: true;
|
|
|
|
} & {
|
|
|
|
} & {
|
|
|
|
[K in keyof Omit<T, 'client' | 'id' | 'partial' | E>]: K extends N ? null : K extends M ? T[K] | null : T[K];
|
|
|
|
[K in keyof Omit<T, 'client' | 'id' | 'partial' | E>]: K extends N ? null : K extends M ? T[K] | null : T[K];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
export interface PartialDMChannel extends Partialize<DMChannel, null, null, 'lastMessageId'> {
|
|
|
|
export interface PartialDMChannel extends Partialize<DMChannel, null, null, 'lastMessageId'> {
|
|
|
|
lastMessageId: undefined;
|
|
|
|
lastMessageId: undefined;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
export interface PartialGuildMember extends Partialize<GuildMember, 'joinedAt' | 'joinedTimestamp'> {}
|
|
|
|
export interface PartialGuildMember extends Partialize<GuildMember, 'joinedAt' | 'joinedTimestamp'> { }
|
|
|
|
|
|
|
|
|
|
|
|
export interface PartialMessage
|
|
|
|
export interface PartialMessage
|
|
|
|
extends Partialize<Message, 'type' | 'system' | 'pinned' | 'tts', 'content' | 'cleanContent' | 'author'> {}
|
|
|
|
extends Partialize<Message, 'type' | 'system' | 'pinned' | 'tts', 'content' | 'cleanContent' | 'author'> { }
|
|
|
|
|
|
|
|
|
|
|
|
export interface PartialMessageReaction extends Partialize<MessageReaction, 'count'> {}
|
|
|
|
export interface PartialMessageReaction extends Partialize<MessageReaction, 'count'> { }
|
|
|
|
|
|
|
|
|
|
|
|
export interface PartialOverwriteData {
|
|
|
|
export interface PartialOverwriteData {
|
|
|
|
id: Snowflake | number;
|
|
|
|
id: Snowflake | number;
|
|
|
@@ -5507,7 +5511,7 @@ export interface PartialRoleData extends RoleData {
|
|
|
|
|
|
|
|
|
|
|
|
export type PartialTypes = 'USER' | 'CHANNEL' | 'GUILD_MEMBER' | 'MESSAGE' | 'REACTION' | 'GUILD_SCHEDULED_EVENT';
|
|
|
|
export type PartialTypes = 'USER' | 'CHANNEL' | 'GUILD_MEMBER' | 'MESSAGE' | 'REACTION' | 'GUILD_SCHEDULED_EVENT';
|
|
|
|
|
|
|
|
|
|
|
|
export interface PartialUser extends Partialize<User, 'username' | 'tag' | 'discriminator'> {}
|
|
|
|
export interface PartialUser extends Partialize<User, 'username' | 'tag' | 'discriminator'> { }
|
|
|
|
|
|
|
|
|
|
|
|
export type PresenceStatusData = ClientPresenceStatus | 'invisible';
|
|
|
|
export type PresenceStatusData = ClientPresenceStatus | 'invisible';
|
|
|
|
|
|
|
|
|
|
|
|