fixing formatting

This commit is contained in:
MathMan05 2024-10-29 15:10:15 -05:00
parent 8552a9091f
commit e06d304064

View file

@ -1,120 +1,120 @@
type readyjson = { type readyjson = {
op: 0; op: 0;
t: "READY"; t: "READY";
s: number; s: number;
d: { d: {
v: number; v: number;
user: mainuserjson; user: mainuserjson;
user_settings: { user_settings: {
index: number; index: number;
afk_timeout: number; afk_timeout: number;
allow_accessibility_detection: boolean; allow_accessibility_detection: boolean;
animate_emoji: boolean; animate_emoji: boolean;
animate_stickers: number; animate_stickers: number;
contact_sync_enabled: boolean; contact_sync_enabled: boolean;
convert_emoticons: boolean; convert_emoticons: boolean;
custom_status: string; custom_status: string;
default_guilds_restricted: boolean; default_guilds_restricted: boolean;
detect_platform_accounts: boolean; detect_platform_accounts: boolean;
developer_mode: boolean; developer_mode: boolean;
disable_games_tab: boolean; disable_games_tab: boolean;
enable_tts_command: boolean; enable_tts_command: boolean;
explicit_content_filter: 0; explicit_content_filter: 0;
friend_discovery_flags: 0; friend_discovery_flags: 0;
friend_source_flags: { friend_source_flags: {
all: boolean; all: boolean;
}; //might be missing things here }; //might be missing things here
gateway_connected: boolean; gateway_connected: boolean;
gif_auto_play: boolean; gif_auto_play: boolean;
guild_folders: []; //need an example of this not empty guild_folders: []; //need an example of this not empty
guild_positions: []; //need an example of this not empty guild_positions: []; //need an example of this not empty
inline_attachment_media: boolean; inline_attachment_media: boolean;
inline_embed_media: boolean; inline_embed_media: boolean;
locale: string; locale: string;
message_display_compact: boolean; message_display_compact: boolean;
native_phone_integration_enabled: boolean; native_phone_integration_enabled: boolean;
render_embeds: boolean; render_embeds: boolean;
render_reactions: boolean; render_reactions: boolean;
restricted_guilds: []; //need an example of this not empty restricted_guilds: []; //need an example of this not empty
show_current_game: boolean; show_current_game: boolean;
status: string; status: string;
stream_notifications_enabled: boolean; stream_notifications_enabled: boolean;
theme: string; theme: string;
timezone_offset: number; timezone_offset: number;
view_nsfw_guilds: boolean; view_nsfw_guilds: boolean;
}; };
guilds: guildjson[]; guilds: guildjson[];
relationships: { relationships: {
id: string; id: string;
type: 0 | 1 | 2 | 3 | 4; type: 0 | 1 | 2 | 3 | 4;
nickname: string | null; nickname: string | null;
user: userjson; user: userjson;
}[]; }[];
read_state: { read_state: {
entries: { entries: {
id: string; id: string;
channel_id: string; channel_id: string;
last_message_id: string; last_message_id: string;
last_pin_timestamp: string; last_pin_timestamp: string;
mention_count: number; //in theory, the server doesn't actually send this as far as I'm aware mention_count: number; //in theory, the server doesn't actually send this as far as I'm aware
}[]; }[];
partial: boolean; partial: boolean;
version: number; version: number;
}; };
user_guild_settings: { user_guild_settings: {
entries: { entries: {
channel_overrides: unknown[]; //will have to find example channel_overrides: unknown[]; //will have to find example
message_notifications: number; message_notifications: number;
flags: number; flags: number;
hide_muted_channels: boolean; hide_muted_channels: boolean;
mobile_push: boolean; mobile_push: boolean;
mute_config: null; mute_config: null;
mute_scheduled_events: boolean; mute_scheduled_events: boolean;
muted: boolean; muted: boolean;
notify_highlights: number; notify_highlights: number;
suppress_everyone: boolean; suppress_everyone: boolean;
suppress_roles: boolean; suppress_roles: boolean;
version: number; version: number;
guild_id: string; guild_id: string;
}[]; }[];
partial: boolean; partial: boolean;
version: number; version: number;
}; };
private_channels: dirrectjson[]; private_channels: dirrectjson[];
session_id: string; session_id: string;
country_code: string; country_code: string;
users: userjson[]; users: userjson[];
merged_members: [memberjson][]; merged_members: [memberjson][];
sessions: { sessions: {
active: boolean; active: boolean;
activities: []; //will need to find example of this activities: []; //will need to find example of this
client_info: { client_info: {
version: number; version: number;
}; };
session_id: string; session_id: string;
status: string; status: string;
}[]; }[];
resume_gateway_url: string; resume_gateway_url: string;
consents: { consents: {
personalization: { personalization: {
consented: boolean; consented: boolean;
}; };
}; };
experiments: []; //not sure if I need to do this :P experiments: []; //not sure if I need to do this :P
guild_join_requests: []; //need to get examples guild_join_requests: []; //need to get examples
connected_accounts: []; //need to get examples connected_accounts: []; //need to get examples
guild_experiments: []; //need to get examples guild_experiments: []; //need to get examples
geo_ordered_rtc_regions: []; //need to get examples geo_ordered_rtc_regions: []; //need to get examples
api_code_version: number; api_code_version: number;
friend_suggestion_count: number; friend_suggestion_count: number;
analytics_token: string; analytics_token: string;
tutorial: boolean; tutorial: boolean;
session_type: string; session_type: string;
auth_session_id_hash: string; auth_session_id_hash: string;
notification_settings: { notification_settings: {
flags: number; flags: number;
}; };
}; };
}; };
type mainuserjson = userjson & { type mainuserjson = userjson & {
flags: number; flags: number;
@ -129,20 +129,20 @@ type mainuserjson = userjson & {
disabled: boolean; disabled: boolean;
}; };
type userjson = { type userjson = {
username: string; username: string;
discriminator: string; discriminator: string;
id: string; id: string;
public_flags: number; public_flags: number;
avatar: string | null; avatar: string | null;
accent_color: number; accent_color: number;
banner?: string; banner?: string;
bio: string; bio: string;
bot: boolean; bot: boolean;
premium_since: string; premium_since: string;
premium_type: number; premium_type: number;
theme_colors: string; theme_colors: string;
pronouns: string; pronouns: string;
badge_ids: string[]; badge_ids: string[];
}; };
type memberjson = { type memberjson = {
index?: number; index?: number;
@ -163,9 +163,9 @@ type memberjson = {
last_message_id?: boolean; //What??? last_message_id?: boolean; //What???
}; };
type emojijson = { type emojijson = {
name: string; name: string;
id?: string; id?: string;
animated?: boolean; animated?: boolean;
}; };
type guildjson = { type guildjson = {
@ -225,37 +225,37 @@ type guildjson = {
joined_at: string; joined_at: string;
}; };
type startTypingjson = { type startTypingjson = {
d: { d: {
channel_id: string; channel_id: string;
guild_id?: string; guild_id?: string;
user_id: string; user_id: string;
timestamp: number; timestamp: number;
member?: memberjson; member?: memberjson;
}; };
}; };
type channeljson = { type channeljson = {
id: string; id: string;
created_at: string; created_at: string;
name: string; name: string;
icon: string; icon: string;
type: number; type: number;
last_message_id: string; last_message_id: string;
guild_id: string; guild_id: string;
parent_id: string; parent_id: string;
last_pin_timestamp: string; last_pin_timestamp: string;
default_auto_archive_duration: number; default_auto_archive_duration: number;
permission_overwrites: { permission_overwrites: {
id: string; id: string;
allow: string; allow: string;
deny: string; deny: string;
}[]; }[];
video_quality_mode: null; video_quality_mode: null;
nsfw: boolean; nsfw: boolean;
topic: string; topic: string;
retention_policy_id: string; retention_policy_id: string;
flags: number; flags: number;
default_thread_rate_limit_per_user: number; default_thread_rate_limit_per_user: number;
position: number; position: number;
}; };
type rolesjson = { type rolesjson = {
id: string; id: string;
@ -272,127 +272,136 @@ type rolesjson = {
flags: number; flags: number;
}; };
type dirrectjson = { type dirrectjson = {
id: string; id: string;
flags: number; flags: number;
last_message_id: string; last_message_id: string;
type: number; type: number;
recipients: userjson[]; recipients: userjson[];
is_spam: boolean; is_spam: boolean;
}; };
type messagejson = { type messagejson = {
id: string; id: string;
channel_id: string; channel_id: string;
guild_id: string; guild_id: string;
author: userjson; author: userjson;
member?: memberjson; member?: memberjson;
content: string; content: string;
timestamp: string; timestamp: string;
edited_timestamp: string; edited_timestamp: string;
tts: boolean; tts: boolean;
mention_everyone: boolean; mention_everyone: boolean;
mentions: []; //need examples to fix mentions: []; //need examples to fix
mention_roles: []; //need examples to fix mention_roles: []; //need examples to fix
attachments: filejson[]; attachments: filejson[];
embeds: embedjson[]; embeds: embedjson[];
reactions: { reactions: {
count: number; count: number;
emoji: emojijson; //very likely needs expanding emoji: emojijson; //very likely needs expanding
me: boolean; me: boolean;
}[]; }[];
nonce: string; nonce: string;
pinned: boolean; pinned: boolean;
type: number; type: number;
}; };
type filejson = { type filejson = {
id: string; id: string;
filename: string; filename: string;
content_type: string; content_type: string;
width?: number; width?: number;
height?: number; height?: number;
proxy_url: string | undefined; proxy_url: string | undefined;
url: string; url: string;
size: number; size: number;
}; };
type embedjson = { type embedjson = {
type: string | null; type: string | null;
color?: number; color?: number;
author: { author: {
icon_url?: string; icon_url?: string;
name?: string; name?: string;
url?: string; url?: string;
title?: string; title?: string;
}; };
title?: string; title?: string;
url?: string; url?: string;
description?: string; description?: string;
fields?: { fields?: {
name: string; name: string;
value: string; value: string;
inline: boolean; inline: boolean;
}[]; }[];
footer?: { footer?: {
icon_url?: string; icon_url?: string;
text?: string; text?: string;
thumbnail?: string; thumbnail?: string;
}; };
timestamp?: string; timestamp?: string;
thumbnail: { thumbnail: {
proxy_url: string; proxy_url: string;
url: string; url: string;
width: number; width: number;
height: number; height: number;
}; };
provider: { provider: {
name: string; name: string;
}; };
video?: { video?: {
url: string; url: string;
width?: number | null; width?: number | null;
height?: number | null; height?: number | null;
proxy_url?: string; proxy_url?: string;
}; };
invite?: { invite?: {
url: string; url: string;
code: string; code: string;
}; };
}; };
type invitejson = { type invitejson = {
code: string; code: string;
temporary: boolean; temporary: boolean;
uses: number; uses: number;
max_use: number; max_use: number;
max_age: number; max_age: number;
created_at: string; created_at: string;
expires_at: string; expires_at: string;
guild_id: string; guild_id: string;
channel_id: string; channel_id: string;
inviter_id: string; inviter_id: string;
target_user_id: string | null; target_user_id: string | null;
target_user_type: string | null; target_user_type: string | null;
vanity_url: string | null; vanity_url: string | null;
flags: number; flags: number;
guild: guildjson["properties"]; guild: guildjson["properties"];
channel: channeljson; channel: channeljson;
inviter: userjson; inviter: userjson;
}; };
type presencejson = { type presencejson = {
status: string; status: string;
since: number | null; since: number | null;
activities: any[]; //bit more complicated but not now activities: any[]; //bit more complicated but not now
afk: boolean; afk: boolean;
user?: userjson; user?: userjson;
}; };
type messageCreateJson = { type messageCreateJson = {
op: 0; op: 0;
d: { d: {
guild_id?: string; guild_id?: string;
channel_id?: string; channel_id?: string;
} & messagejson; } & messagejson;
s: number; s: number;
t: "MESSAGE_CREATE"; t: "MESSAGE_CREATE";
}; };
type roleCreate={
op: 0,
t: "GUILD_ROLE_CREATE",
d: {
guild_id: string,
role: rolesjson
},
s: 6
}
type wsjson = type wsjson =
| { roleCreate | {
op: 0; op: 0;
d: any; d: any;
s: number; s: number;