mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-16 03:23:29 +01:00
docs: general cleanup and improvements (#6299)
Co-authored-by: DaStormer <40336269+DaStormer@users.noreply.github.com> Co-authored-by: Sugden <28943913+NotSugden@users.noreply.github.com> Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
This commit is contained in:
1
typings/enums.d.ts
vendored
1
typings/enums.d.ts
vendored
@@ -143,4 +143,5 @@ export enum VerificationLevels {
|
||||
export enum WebhookTypes {
|
||||
Incoming = 1,
|
||||
'Channel Follower' = 2,
|
||||
Application = 3,
|
||||
}
|
||||
|
||||
68
typings/index.d.ts
vendored
68
typings/index.d.ts
vendored
@@ -647,7 +647,7 @@ export class Guild extends AnonymousGuild {
|
||||
public members: GuildMemberManager;
|
||||
public mfaLevel: MFALevel;
|
||||
public ownerId: Snowflake;
|
||||
public preferredLocale: string;
|
||||
public preferredLocale?: string;
|
||||
public premiumSubscriptionCount: number | null;
|
||||
public premiumTier: PremiumTier;
|
||||
public presences: PresenceManager;
|
||||
@@ -2141,22 +2141,32 @@ export const Constants: {
|
||||
CDN: (root: string) => {
|
||||
Asset: (name: string) => string;
|
||||
DefaultAvatar: (id: Snowflake | number) => string;
|
||||
Emoji: (emojiId: Snowflake, format: 'png' | 'gif') => string;
|
||||
Avatar: (
|
||||
Emoji: (emojiId: Snowflake, format: DynamicImageFormat) => string;
|
||||
Avatar: (userId: Snowflake, hash: string, format: DynamicImageFormat, size: AllowedImageSize) => string;
|
||||
Banner: (guildId: Snowflake | number, hash: string, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
Icon: (userId: Snowflake | number, hash: string, format: DynamicImageFormat, size: AllowedImageSize) => string;
|
||||
AppIcon: (userId: Snowflake | number, hash: string, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
AppAsset: (
|
||||
userId: Snowflake | number,
|
||||
hash: string,
|
||||
format: 'default' | AllowedImageFormat,
|
||||
size: number,
|
||||
format: AllowedImageFormat,
|
||||
size: AllowedImageSize,
|
||||
) => string;
|
||||
StickerPackBanner: (bannerId: Snowflake, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
GDMIcon: (userId: Snowflake | number, hash: string, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
Splash: (guildId: Snowflake | number, hash: string, format: AllowedImageFormat, size: AllowedImageSize) => string;
|
||||
DiscoverySplash: (
|
||||
guildId: Snowflake | number,
|
||||
hash: string,
|
||||
format: AllowedImageFormat,
|
||||
size: AllowedImageSize,
|
||||
) => string;
|
||||
TeamIcon: (
|
||||
teamId: Snowflake | number,
|
||||
hash: string,
|
||||
format: AllowedImageFormat,
|
||||
size: AllowedImageSize,
|
||||
) => string;
|
||||
Banner: (guildId: Snowflake | number, hash: string, format: AllowedImageFormat, size: number) => string;
|
||||
Icon: (userId: Snowflake | number, hash: string, format: 'default' | AllowedImageFormat, size: number) => string;
|
||||
AppIcon: (userId: Snowflake | number, hash: string, format: AllowedImageFormat, size: number) => string;
|
||||
AppAsset: (userId: Snowflake | number, hash: string, format: AllowedImageFormat, size: number) => string;
|
||||
StickerPackBanner: (bannerId: Snowflake, format: AllowedImageFormat, size: number) => string;
|
||||
GDMIcon: (userId: Snowflake | number, hash: string, format: AllowedImageFormat, size: number) => string;
|
||||
Splash: (guildId: Snowflake | number, hash: string, format: AllowedImageFormat, size: number) => string;
|
||||
DiscoverySplash: (guildId: Snowflake | number, hash: string, format: AllowedImageFormat, size: number) => string;
|
||||
TeamIcon: (teamId: Snowflake | number, hash: string, format: AllowedImageFormat, size: number) => string;
|
||||
Sticker: (stickerId: Snowflake, stickerFormat: StickerFormatType) => string;
|
||||
};
|
||||
};
|
||||
@@ -2693,7 +2703,9 @@ export interface AddGuildMemberOptions {
|
||||
fetchWhenExisting?: boolean;
|
||||
}
|
||||
|
||||
export type AllowedImageFormat = 'webp' | 'png' | 'jpg' | 'jpeg' | 'gif';
|
||||
export type AllowedImageFormat = 'webp' | 'png' | 'jpg' | 'jpeg';
|
||||
|
||||
export type AllowedImageSize = 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096;
|
||||
|
||||
export type AllowedPartial = User | Channel | GuildMember | Message | MessageReaction;
|
||||
|
||||
@@ -2885,9 +2897,6 @@ export type ApplicationCommandPermissionType = keyof typeof ApplicationCommandPe
|
||||
export type ApplicationCommandResolvable = ApplicationCommand | Snowflake;
|
||||
|
||||
export type ApplicationFlagsString =
|
||||
| 'MANAGED_EMOJI'
|
||||
| 'GROUP_DM_CREATE'
|
||||
| 'RPC_HAS_CONNECTED'
|
||||
| 'GATEWAY_PRESENCE'
|
||||
| 'GATEWAY_PRESENCE_LIMITED'
|
||||
| 'GATEWAY_GUILD_MEMBERS'
|
||||
@@ -3384,6 +3393,8 @@ export interface DeconstructedSnowflake {
|
||||
|
||||
export type DefaultMessageNotificationLevel = keyof typeof DefaultMessageNotificationLevels;
|
||||
|
||||
export type DynamicImageFormat = AllowedImageFormat | 'gif';
|
||||
|
||||
export interface EditGuildTemplateOptions {
|
||||
name?: string;
|
||||
description?: string;
|
||||
@@ -3699,20 +3710,19 @@ export type GuildFeatures =
|
||||
| 'FEATURABLE'
|
||||
| 'INVITE_SPLASH'
|
||||
| 'MEMBER_VERIFICATION_GATE_ENABLED'
|
||||
| 'MONETIZATION_ENABLED'
|
||||
| 'MORE_STICKERS'
|
||||
| 'NEWS'
|
||||
| 'PARTNERED'
|
||||
| 'PREVIEW_ENABLED'
|
||||
| 'PRIVATE_THREADS'
|
||||
| 'RELAY_ENABLED'
|
||||
| 'SEVEN_DAY_THREAD_ARCHIVE'
|
||||
| 'THREE_DAY_THREAD_ARCHIVE'
|
||||
| 'TICKETED_EVENTS_ENABLED'
|
||||
| 'VANITY_URL'
|
||||
| 'VERIFIED'
|
||||
| 'VIP_REGIONS'
|
||||
| 'WELCOME_SCREEN_ENABLED';
|
||||
| 'WELCOME_SCREEN_ENABLED'
|
||||
| 'TICKETED_EVENTS_ENABLED'
|
||||
| 'MONETIZATION_ENABLED'
|
||||
| 'MORE_STICKERS'
|
||||
| 'THREE_DAY_THREAD_ARCHIVE'
|
||||
| 'SEVEN_DAY_THREAD_ARCHIVE'
|
||||
| 'PRIVATE_THREADS';
|
||||
|
||||
export interface GuildMemberEditData {
|
||||
nick?: string | null;
|
||||
@@ -3772,8 +3782,6 @@ export interface HTTPOptions {
|
||||
headers?: Record<string, string>;
|
||||
}
|
||||
|
||||
export type ImageSize = 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096;
|
||||
|
||||
export interface ImageURLOptions extends StaticImageURLOptions {
|
||||
dynamic?: boolean;
|
||||
}
|
||||
@@ -4114,7 +4122,7 @@ export type MessageType =
|
||||
| 'CALL'
|
||||
| 'CHANNEL_NAME_CHANGE'
|
||||
| 'CHANNEL_ICON_CHANGE'
|
||||
| 'PINS_ADD'
|
||||
| 'CHANNEL_PINNED_MESSAGE'
|
||||
| 'GUILD_MEMBER_JOIN'
|
||||
| 'USER_PREMIUM_GUILD_SUBSCRIPTION'
|
||||
| 'USER_PREMIUM_GUILD_SUBSCRIPTION_TIER_1'
|
||||
@@ -4370,7 +4378,7 @@ export interface SplitOptions {
|
||||
|
||||
export interface StaticImageURLOptions {
|
||||
format?: AllowedImageFormat;
|
||||
size?: ImageSize;
|
||||
size?: AllowedImageSize;
|
||||
}
|
||||
|
||||
export type StageInstanceResolvable = StageInstance | Snowflake;
|
||||
|
||||
Reference in New Issue
Block a user