Selfbot update
added headers to discord hard to detect selfbot 'x-fingerprint' cookies 'x-super-properties'
This commit is contained in:
parent
590a778c4a
commit
f361bed628
@ -34,6 +34,7 @@ const client = new Client({
|
|||||||
new Client({
|
new Client({
|
||||||
checkUpdate: true, // Check Package Update (Bot Ready) [Enable Default]
|
checkUpdate: true, // Check Package Update (Bot Ready) [Enable Default]
|
||||||
readyStatus: false, // Set Custom Status sync from Account (Bot Ready) [Disable Default]
|
readyStatus: false, // Set Custom Status sync from Account (Bot Ready) [Disable Default]
|
||||||
|
autoCookie: true, // Auto added Cookie and Fingerprint [Enable Default](https://github.com/aiko-chan-ai/discord.js-selfbot-v13/blob/main/DOCUMENT.md#http-options)
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
</details>
|
</details>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "discord.js-selfbot-v13",
|
"name": "discord.js-selfbot-v13",
|
||||||
"version": "1.2.8",
|
"version": "1.3.0",
|
||||||
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
|
"description": "A unofficial discord.js fork for creating selfbots [Based on discord.js v13]",
|
||||||
"main": "./src/index.js",
|
"main": "./src/index.js",
|
||||||
"types": "./typings/index.d.ts",
|
"types": "./typings/index.d.ts",
|
||||||
|
@ -260,6 +260,46 @@ class Client extends BaseClient {
|
|||||||
.join('.')}`,
|
.join('.')}`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (this.options.autoCookie) {
|
||||||
|
/* Auto find fingerprint and add Cookie */
|
||||||
|
let cookie = '';
|
||||||
|
await require('axios')({
|
||||||
|
method: 'get',
|
||||||
|
url: 'https://discord.com/api/v9/experiments',
|
||||||
|
headers: this.options.http.headers,
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
|
if (!'set-cookie' in res.headers) return;
|
||||||
|
res.headers['set-cookie'].map((line) => {
|
||||||
|
line.split('; ').map((arr) => {
|
||||||
|
if (
|
||||||
|
arr.startsWith('Expires') ||
|
||||||
|
arr.startsWith('Path') ||
|
||||||
|
arr.startsWith('Domain') ||
|
||||||
|
arr.startsWith('HttpOnly') ||
|
||||||
|
arr.startsWith('Secure') ||
|
||||||
|
arr.startsWith('Max-Age') ||
|
||||||
|
arr.startsWith('SameSite')
|
||||||
|
) {
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
cookie += `${arr}; `;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.options.http.headers['Cookie'] = `${cookie}locale=en`;
|
||||||
|
this.options.http.headers['x-fingerprint'] = res.data.fingerprint;
|
||||||
|
this.emit(Events.DEBUG, `Added Cookie: ${cookie}`);
|
||||||
|
this.emit(Events.DEBUG, `Added Fingerprint: ${res.data.fingerprint}`);
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
this.emit(
|
||||||
|
Events.DEBUG,
|
||||||
|
`Finding Cookie and Fingerprint failed: ${err.message}`,
|
||||||
|
);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (this.options.presence) {
|
if (this.options.presence) {
|
||||||
this.options.ws.presence = this.presence._parse(this.options.presence);
|
this.options.ws.presence = this.presence._parse(this.options.presence);
|
||||||
}
|
}
|
||||||
|
@ -132,91 +132,93 @@ class Options extends null {
|
|||||||
*/
|
*/
|
||||||
static createDefault() {
|
static createDefault() {
|
||||||
return {
|
return {
|
||||||
jsonTransformer: (object) => JSONBig.stringify(object),
|
jsonTransformer: (object) => JSONBig.stringify(object),
|
||||||
checkUpdate: true,
|
checkUpdate: true,
|
||||||
readyStatus: false,
|
readyStatus: false,
|
||||||
waitGuildTimeout: 15_000,
|
autoCookie: true,
|
||||||
shardCount: 1,
|
waitGuildTimeout: 15_000,
|
||||||
makeCache: this.cacheWithLimits(this.defaultMakeCacheSettings),
|
shardCount: 1,
|
||||||
messageCacheLifetime: 0,
|
makeCache: this.cacheWithLimits(this.defaultMakeCacheSettings),
|
||||||
messageSweepInterval: 0,
|
messageCacheLifetime: 0,
|
||||||
invalidRequestWarningInterval: 0,
|
messageSweepInterval: 0,
|
||||||
intents: 65535,
|
invalidRequestWarningInterval: 0,
|
||||||
partials: [
|
intents: 65535,
|
||||||
'USER',
|
partials: [
|
||||||
'CHANNEL',
|
'USER',
|
||||||
'GUILD_MEMBER',
|
'CHANNEL',
|
||||||
'MESSAGE',
|
'GUILD_MEMBER',
|
||||||
'REACTION',
|
'MESSAGE',
|
||||||
'GUILD_SCHEDULED_EVENT',
|
'REACTION',
|
||||||
], // Enable the partials
|
'GUILD_SCHEDULED_EVENT',
|
||||||
restWsBridgeTimeout: 5_000,
|
], // Enable the partials
|
||||||
restRequestTimeout: 15_000,
|
restWsBridgeTimeout: 5_000,
|
||||||
restGlobalRateLimit: 0,
|
restRequestTimeout: 15_000,
|
||||||
retryLimit: 1,
|
restGlobalRateLimit: 0,
|
||||||
restTimeOffset: 500,
|
retryLimit: 1,
|
||||||
restSweepInterval: 60,
|
restTimeOffset: 500,
|
||||||
failIfNotExists: false,
|
restSweepInterval: 60,
|
||||||
userAgentSuffix: [],
|
failIfNotExists: false,
|
||||||
presence: {},
|
userAgentSuffix: [],
|
||||||
sweepers: {},
|
presence: {},
|
||||||
ws: {
|
sweepers: {},
|
||||||
large_threshold: 50,
|
ws: {
|
||||||
compress: false,
|
large_threshold: 50,
|
||||||
properties: {
|
compress: false,
|
||||||
//$os: 'iPhone14,5',
|
properties: {
|
||||||
//$browser: 'Discord iOS',
|
//$os: 'iPhone14,5',
|
||||||
//$device: 'iPhone14,5 OS 15.2',
|
//$browser: 'Discord iOS',
|
||||||
$os: 'Windows',
|
//$device: 'iPhone14,5 OS 15.2',
|
||||||
$browser: 'Discord Client',
|
$os: 'Windows',
|
||||||
$device: 'ASUS ROG Phone 5',
|
$browser: 'Discord Client',
|
||||||
},
|
$device: 'ASUS ROG Phone 5',
|
||||||
version: 9,
|
},
|
||||||
},
|
version: 9,
|
||||||
http: {
|
},
|
||||||
headers: {
|
http: {
|
||||||
Accept: '*/*',
|
headers: {
|
||||||
'Accept-Encoding': 'gzip, deflate, br',
|
Accept: '*/*',
|
||||||
'Accept-Language': 'en-US,en;q=0.9',
|
// 'Accept-Encoding': 'gzip, deflate, br', => cause axios bug
|
||||||
'Cache-Control': 'no-cache',
|
'Accept-Language': 'en-US,en;q=0.9',
|
||||||
Pragma: 'no-cache',
|
'Cache-Control': 'no-cache',
|
||||||
Referer: 'https://discord.com/channels/@me',
|
Pragma: 'no-cache',
|
||||||
'Sec-Ch-Ua': '" Not A;Brand";v="99" "',
|
Referer: 'https://discord.com/channels/@me',
|
||||||
'Sec-Ch-Ua-Mobile': '?0',
|
'Sec-Ch-Ua':
|
||||||
'Sec-Ch-Ua-Platform': '"iOS"',
|
'"Not A;Brand";v="99", "Chromium";v="100", "Google Chrome";v="100',
|
||||||
'Sec-Fetch-Dest': 'empty',
|
'Sec-Ch-Ua-Mobile': '?0',
|
||||||
'Sec-Fetch-Mode': 'cors',
|
'Sec-Ch-Ua-Platform': '"Windows"',
|
||||||
'Sec-Fetch-Site': 'same-origin',
|
'Sec-Fetch-Dest': 'empty',
|
||||||
'X-Debug-Options': 'bugReporterEnabled',
|
'Sec-Fetch-Mode': 'cors',
|
||||||
// https://github.com/Merubokkusu/Discord-S.C.U.M/issues/66#issuecomment-1009171667
|
'Sec-Fetch-Site': 'same-origin',
|
||||||
'x-super-properties': `${Buffer.from(
|
'X-Debug-Options': 'bugReporterEnabled',
|
||||||
JSONBig.stringify({
|
// https://github.com/Merubokkusu/Discord-S.C.U.M/issues/66#issuecomment-1009171667
|
||||||
os: 'Windows',
|
'x-super-properties': `${Buffer.from(
|
||||||
browser: 'Discord Client',
|
JSONBig.stringify({
|
||||||
release_channel: 'stable',
|
os: 'Windows',
|
||||||
client_version: '1.0.9004',
|
browser: 'Discord Client',
|
||||||
os_version: '10.0.22000',
|
release_channel: 'stable',
|
||||||
os_arch: 'x64',
|
client_version: '1.0.9004',
|
||||||
system_locale: 'en-US',
|
os_version: '10.0.22000',
|
||||||
client_build_number: 122087,
|
os_arch: 'x64',
|
||||||
client_event_source: null,
|
system_locale: 'en-US',
|
||||||
}),
|
client_build_number: 122087,
|
||||||
'ascii',
|
client_event_source: null,
|
||||||
).toString('base64')}`,
|
}),
|
||||||
'X-Discord-Locale': 'en-US',
|
'ascii',
|
||||||
Origin: 'https://discord.com',
|
).toString('base64')}`,
|
||||||
'user-agent':
|
'X-Discord-Locale': 'en-US',
|
||||||
'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.9004 Chrome/91.0.4472.164 Electron/13.6.6 Safari/537.36',
|
Origin: 'https://discord.com',
|
||||||
},
|
'user-agent':
|
||||||
agent: {},
|
'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) discord/1.0.9004 Chrome/91.0.4472.164 Electron/13.6.6 Safari/537.36',
|
||||||
version: 9,
|
},
|
||||||
api: 'https://discord.com/api',
|
agent: {},
|
||||||
cdn: 'https://cdn.discordapp.com',
|
version: 9,
|
||||||
invite: 'https://discord.gg',
|
api: 'https://discord.com/api',
|
||||||
template: 'https://discord.new',
|
cdn: 'https://cdn.discordapp.com',
|
||||||
scheduledEvent: 'https://discord.com/events',
|
invite: 'https://discord.gg',
|
||||||
},
|
template: 'https://discord.new',
|
||||||
};
|
scheduledEvent: 'https://discord.com/events',
|
||||||
|
},
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
162
typings/index.d.ts
vendored
162
typings/index.d.ts
vendored
@ -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>;
|
||||||
@ -652,15 +652,15 @@ export class ClientUser extends User {
|
|||||||
public deleteAccount(password: string): Promise<this>;
|
public deleteAccount(password: string): Promise<this>;
|
||||||
// Selfbot
|
// Selfbot
|
||||||
public readonly nitro: boolean;
|
public readonly nitro: boolean;
|
||||||
/**
|
/**
|
||||||
* Nitro Status
|
* Nitro Status
|
||||||
* `0`: None
|
* `0`: None
|
||||||
* `1`: Classic
|
* `1`: Classic
|
||||||
* `2`: Boost
|
* `2`: Boost
|
||||||
* @external
|
* @external
|
||||||
* https://discord.com/developers/docs/resources/user#user-object-premium-types
|
* https://discord.com/developers/docs/resources/user#user-object-premium-types
|
||||||
* @type {Number}
|
* @type {Number}
|
||||||
*/
|
*/
|
||||||
public readonly nitroType: NitroType;
|
public readonly nitroType: NitroType;
|
||||||
public readonly phoneNumber: String;
|
public readonly phoneNumber: String;
|
||||||
public readonly nsfwAllowed: boolean;
|
public readonly nsfwAllowed: boolean;
|
||||||
@ -1036,17 +1036,17 @@ export class GuildAuditLogs<T extends GuildAuditLogsResolvable = 'ALL'> {
|
|||||||
export class GuildAuditLogsEntry<
|
export class GuildAuditLogsEntry<
|
||||||
TActionRaw extends GuildAuditLogsResolvable = 'ALL',
|
TActionRaw extends GuildAuditLogsResolvable = 'ALL',
|
||||||
TAction = TActionRaw extends keyof GuildAuditLogsIds
|
TAction = TActionRaw extends keyof GuildAuditLogsIds
|
||||||
? GuildAuditLogsIds[TActionRaw]
|
? GuildAuditLogsIds[TActionRaw]
|
||||||
: TActionRaw extends null
|
: TActionRaw extends null
|
||||||
? 'ALL'
|
? 'ALL'
|
||||||
: TActionRaw,
|
: TActionRaw,
|
||||||
TActionType extends GuildAuditLogsActionType = TAction extends keyof GuildAuditLogsTypes
|
TActionType extends GuildAuditLogsActionType = TAction extends keyof GuildAuditLogsTypes
|
||||||
? GuildAuditLogsTypes[TAction][1]
|
? GuildAuditLogsTypes[TAction][1]
|
||||||
: 'ALL',
|
: 'ALL',
|
||||||
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
|
||||||
@ -1483,25 +1483,25 @@ export class LimitedCollection<K, V> extends Collection<K, V> {
|
|||||||
|
|
||||||
export type MessageCollectorOptionsParams<T extends MessageComponentTypeResolvable, Cached extends boolean = boolean> =
|
export type MessageCollectorOptionsParams<T extends MessageComponentTypeResolvable, Cached extends boolean = boolean> =
|
||||||
| {
|
| {
|
||||||
componentType?: T;
|
componentType?: T;
|
||||||
} & MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
|
} & MessageComponentCollectorOptions<MappedInteractionTypes<Cached>[T]>;
|
||||||
|
|
||||||
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]>;
|
||||||
|
|
||||||
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>
|
||||||
>;
|
>;
|
||||||
|
|
||||||
export interface StringMappedInteractionTypes<Cached extends CacheType = CacheType> {
|
export interface StringMappedInteractionTypes<Cached extends CacheType = CacheType> {
|
||||||
BUTTON: ButtonInteraction<Cached>;
|
BUTTON: ButtonInteraction<Cached>;
|
||||||
@ -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;
|
||||||
|
|
||||||
@ -3029,13 +3029,13 @@ export class ApplicationCommandPermissionsManager<
|
|||||||
public remove(
|
public remove(
|
||||||
options:
|
options:
|
||||||
| (FetchSingleOptions & {
|
| (FetchSingleOptions & {
|
||||||
users: UserResolvable | UserResolvable[];
|
users: UserResolvable | UserResolvable[];
|
||||||
roles?: RoleResolvable | RoleResolvable[];
|
roles?: RoleResolvable | RoleResolvable[];
|
||||||
})
|
})
|
||||||
| (FetchSingleOptions & {
|
| (FetchSingleOptions & {
|
||||||
users?: UserResolvable | UserResolvable[];
|
users?: UserResolvable | UserResolvable[];
|
||||||
roles: RoleResolvable | RoleResolvable[];
|
roles: RoleResolvable | RoleResolvable[];
|
||||||
}),
|
}),
|
||||||
): Promise<ApplicationCommandPermissions[]>;
|
): Promise<ApplicationCommandPermissions[]>;
|
||||||
public set(
|
public set(
|
||||||
options: FetchSingleOptions & { permissions: ApplicationCommandPermissionData[] },
|
options: FetchSingleOptions & { permissions: ApplicationCommandPermissionData[] },
|
||||||
@ -3197,7 +3197,7 @@ export class GuildScheduledEventManager extends CachedManager<
|
|||||||
public fetch(): Promise<Collection<Snowflake, GuildScheduledEvent>>;
|
public fetch(): Promise<Collection<Snowflake, GuildScheduledEvent>>;
|
||||||
public fetch<
|
public fetch<
|
||||||
T extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions | FetchGuildScheduledEventsOptions,
|
T extends GuildScheduledEventResolvable | FetchGuildScheduledEventOptions | FetchGuildScheduledEventsOptions,
|
||||||
>(options?: T): Promise<GuildScheduledEventManagerFetchResult<T>>;
|
>(options?: T): Promise<GuildScheduledEventManagerFetchResult<T>>;
|
||||||
public edit<S extends GuildScheduledEventStatus, T extends GuildScheduledEventSetStatusArg<S>>(
|
public edit<S extends GuildScheduledEventStatus, T extends GuildScheduledEventSetStatusArg<S>>(
|
||||||
guildScheduledEvent: GuildScheduledEventResolvable,
|
guildScheduledEvent: GuildScheduledEventResolvable,
|
||||||
options: GuildScheduledEventEditOptions<S, T>,
|
options: GuildScheduledEventEditOptions<S, T>,
|
||||||
@ -3734,12 +3734,12 @@ export interface ApplicationCommandChannelOption extends BaseApplicationCommandO
|
|||||||
|
|
||||||
export interface ApplicationCommandAutocompleteOption extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
|
export interface ApplicationCommandAutocompleteOption extends Omit<BaseApplicationCommandOptionsData, 'autocomplete'> {
|
||||||
type:
|
type:
|
||||||
| 'STRING'
|
| 'STRING'
|
||||||
| 'NUMBER'
|
| 'NUMBER'
|
||||||
| 'INTEGER'
|
| 'INTEGER'
|
||||||
| ApplicationCommandOptionTypes.STRING
|
| ApplicationCommandOptionTypes.STRING
|
||||||
| ApplicationCommandOptionTypes.NUMBER
|
| ApplicationCommandOptionTypes.NUMBER
|
||||||
| ApplicationCommandOptionTypes.INTEGER;
|
| ApplicationCommandOptionTypes.INTEGER;
|
||||||
autocomplete: true;
|
autocomplete: true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3939,8 +3939,8 @@ export type CacheFactory = (
|
|||||||
|
|
||||||
export type CacheWithLimitsOptions = {
|
export type CacheWithLimitsOptions = {
|
||||||
[K in keyof Caches]?: Caches[K][0]['prototype'] extends DataManager<infer K, infer V, any>
|
[K in keyof Caches]?: Caches[K][0]['prototype'] extends DataManager<infer K, infer V, any>
|
||||||
? LimitedCollectionOptions<K, V> | number
|
? LimitedCollectionOptions<K, V> | number
|
||||||
: never;
|
: never;
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface CategoryCreateChannelOptions {
|
export interface CategoryCreateChannelOptions {
|
||||||
@ -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';
|
||||||
@ -4688,20 +4692,20 @@ export interface GuildAuditLogsEntryExtraField {
|
|||||||
MESSAGE_UNPIN: { channel: GuildTextBasedChannel | { id: Snowflake }; messageId: Snowflake };
|
MESSAGE_UNPIN: { channel: GuildTextBasedChannel | { id: Snowflake }; messageId: Snowflake };
|
||||||
MEMBER_DISCONNECT: { count: number };
|
MEMBER_DISCONNECT: { count: number };
|
||||||
CHANNEL_OVERWRITE_CREATE:
|
CHANNEL_OVERWRITE_CREATE:
|
||||||
| Role
|
| Role
|
||||||
| GuildMember
|
| GuildMember
|
||||||
| { id: Snowflake; name: string; type: OverwriteTypes.role }
|
| { id: Snowflake; name: string; type: OverwriteTypes.role }
|
||||||
| { id: Snowflake; type: OverwriteTypes.member };
|
| { id: Snowflake; type: OverwriteTypes.member };
|
||||||
CHANNEL_OVERWRITE_UPDATE:
|
CHANNEL_OVERWRITE_UPDATE:
|
||||||
| Role
|
| Role
|
||||||
| GuildMember
|
| GuildMember
|
||||||
| { id: Snowflake; name: string; type: OverwriteTypes.role }
|
| { id: Snowflake; name: string; type: OverwriteTypes.role }
|
||||||
| { id: Snowflake; type: OverwriteTypes.member };
|
| { id: Snowflake; type: OverwriteTypes.member };
|
||||||
CHANNEL_OVERWRITE_DELETE:
|
CHANNEL_OVERWRITE_DELETE:
|
||||||
| Role
|
| Role
|
||||||
| GuildMember
|
| GuildMember
|
||||||
| { id: Snowflake; name: string; type: OverwriteTypes.role }
|
| { id: Snowflake; name: string; type: OverwriteTypes.role }
|
||||||
| { id: Snowflake; type: OverwriteTypes.member };
|
| { id: Snowflake; type: OverwriteTypes.member };
|
||||||
STAGE_INSTANCE_CREATE: StageChannel | { id: Snowflake };
|
STAGE_INSTANCE_CREATE: StageChannel | { id: Snowflake };
|
||||||
STAGE_INSTANCE_DELETE: StageChannel | { id: Snowflake };
|
STAGE_INSTANCE_DELETE: StageChannel | { id: Snowflake };
|
||||||
STAGE_INSTANCE_UPDATE: StageChannel | { id: Snowflake };
|
STAGE_INSTANCE_UPDATE: StageChannel | { id: Snowflake };
|
||||||
@ -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,14 +4922,14 @@ 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>;
|
||||||
|
|
||||||
export type GuildScheduledEventManagerFetchSubscribersResult<T extends FetchGuildScheduledEventSubscribersOptions> =
|
export type GuildScheduledEventManagerFetchSubscribersResult<T extends FetchGuildScheduledEventSubscribersOptions> =
|
||||||
T extends { withMember: true }
|
T extends { withMember: true }
|
||||||
? Collection<Snowflake, GuildScheduledEventUser<true>>
|
? Collection<Snowflake, GuildScheduledEventUser<true>>
|
||||||
: Collection<Snowflake, GuildScheduledEventUser<false>>;
|
: Collection<Snowflake, GuildScheduledEventUser<false>>;
|
||||||
|
|
||||||
export type GuildScheduledEventPrivacyLevel = keyof typeof GuildScheduledEventPrivacyLevels;
|
export type GuildScheduledEventPrivacyLevel = keyof typeof GuildScheduledEventPrivacyLevels;
|
||||||
|
|
||||||
@ -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';
|
||||||
|
|
||||||
@ -5691,8 +5695,8 @@ export interface SweeperDefinitions {
|
|||||||
|
|
||||||
export type SweeperOptions = {
|
export type SweeperOptions = {
|
||||||
[K in keyof SweeperDefinitions]?: SweeperDefinitions[K][2] extends true
|
[K in keyof SweeperDefinitions]?: SweeperDefinitions[K][2] extends true
|
||||||
? SweepOptions<SweeperDefinitions[K][0], SweeperDefinitions[K][1]> | LifetimeSweepOptions
|
? SweepOptions<SweeperDefinitions[K][0], SweeperDefinitions[K][1]> | LifetimeSweepOptions
|
||||||
: SweepOptions<SweeperDefinitions[K][0], SweeperDefinitions[K][1]>;
|
: SweepOptions<SweeperDefinitions[K][0], SweeperDefinitions[K][1]>;
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface LimitedCollectionOptions<K, V> {
|
export interface LimitedCollectionOptions<K, V> {
|
||||||
|
Loading…
Reference in New Issue
Block a user