From e0cded6af1b7df26ba3de90e375340fdc5a48cf8 Mon Sep 17 00:00:00 2001 From: MarkusRost <37275477+Markus-Rost@users.noreply.github.com> Date: Fri, 5 Apr 2024 00:26:13 +0200 Subject: [PATCH 1/2] Add Guild to TokenRequestResult --- index.d.ts | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 9de71e4..cdfcaf2 100644 --- a/index.d.ts +++ b/index.d.ts @@ -82,12 +82,13 @@ declare namespace OAuth { refresh_token: string; scope: string; webhook?: Webhook; + guild?: Guild; } export interface PartialGuild { id: string; name: string; - icon: string | null | undefined; + icon: string | null; owner?: boolean; permissions?: string; features: string[]; @@ -99,7 +100,7 @@ declare namespace OAuth { type: boolean; id: string; name: string; - avatar: string | null | undefined; + avatar: string | null; channel_id: string; guild_id: string; application_id: string; @@ -107,6 +108,68 @@ declare namespace OAuth { url: string; } + export interface Guild { + id: string; + name: string; + icon: string | null; + owner_id: string; + splash: string | null; + discovery_splash: string | null; + afk_channel_id: string | null; + afk_timeout: number; + widget_enabled?: boolean; + widget_channel_id?: string | null; + verification_level: number; + default_message_notifications: number; + explicit_content_filter: number; + explicit_content_filter: number; + roles: Role[]; + emojis: Emoji[]; + features: string[]; + mfa_level: number; + application_id: string | null; + system_channel_id: string | null; + system_channel_flags: number; + rules_channel_id: string | null; + max_presences?: number | null; + max_members?: number; + vanity_url_code: string | null; + description: string | null; + banner: string | null; + premium_tier: number; + premium_subscription_count?: number; + preferred_locale: string; + public_updates_channel_id: string | null; + max_video_channel_users?: number; + max_stage_video_channel_users?: number; + safety_alerts_channel_id: string | null; + } + + export interface Role { + id: string; + name: string; + color: number; + hoist: boolean; + icon?: string | null; + unicode_emoji?: string | null; + position: number; + permissions: string; + managed: boolean; + mentionable: boolean; + flags: number; + } + + export interface Emoji { + id: string | null; + name: string | null; + roles?: string[]; + user?: User; + require_colons?: boolean; + managed?: boolean; + animated?: boolean; + available?: boolean; + } + export interface HTTPResponse { code: number; message: string; From 5c7fe8b3534e765ebd2239992a6679b2606e1ee2 Mon Sep 17 00:00:00 2001 From: MarkusRost <37275477+Markus-Rost@users.noreply.github.com> Date: Fri, 19 Jul 2024 13:01:41 +0200 Subject: [PATCH 2/2] Add missing types --- index.d.ts | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/index.d.ts b/index.d.ts index cdfcaf2..11f620b 100644 --- a/index.d.ts +++ b/index.d.ts @@ -122,7 +122,6 @@ declare namespace OAuth { verification_level: number; default_message_notifications: number; explicit_content_filter: number; - explicit_content_filter: number; roles: Role[]; emojis: Emoji[]; features: string[]; @@ -142,6 +141,10 @@ declare namespace OAuth { public_updates_channel_id: string | null; max_video_channel_users?: number; max_stage_video_channel_users?: number; + nsfw?: boolean | null | undefined; + nsfw_level: number; + stickers?: Sticker[]; + premium_progress_bar_enabled: boolean; safety_alerts_channel_id: string | null; } @@ -157,6 +160,7 @@ declare namespace OAuth { managed: boolean; mentionable: boolean; flags: number; + tags?: RoleTags; } export interface Emoji { @@ -170,6 +174,26 @@ declare namespace OAuth { available?: boolean; } + export interface Sticker { + id: string; + name: string; + description: string | null; + tags: string; + type: number; + format_type: number; + available?: boolean; + guild_id: string; + } + + export interface RoleTags { + bot_id?: string; + integration_id?: string; + premium_subscriber?: null; + subscription_listing_id?: string; + available_for_purchase?: null; + guild_connections?: null; + } + export interface HTTPResponse { code: number; message: string;