Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Guild to TokenRequestResult #108

Merged
merged 3 commits into from
Dec 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
91 changes: 89 additions & 2 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ declare namespace OAuth {
refresh_token: string;
scope: string;
webhook?: Webhook;
guild?: Guild;
}

export interface AuthorizationInformation {
Expand All @@ -104,7 +105,7 @@ declare namespace OAuth {
export interface PartialGuild {
id: string;
name: string;
icon: string | null | undefined;
icon: string | null;
owner?: boolean;
permissions?: string;
features: string[];
Expand All @@ -116,14 +117,100 @@ 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;
token: string;
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;
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;
nsfw?: boolean | null | undefined;
nsfw_level: number;
stickers?: Sticker[];
premium_progress_bar_enabled: boolean;
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;
tags?: RoleTags;
}

export interface Emoji {
id: string | null;
name: string | null;
roles?: string[];
user?: User;
require_colons?: boolean;
managed?: boolean;
animated?: boolean;
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;
Expand Down
Loading