summary refs log tree commit diff
diff options
context:
space:
mode:
authorRory& <root@rory.gay>2026-11-05 23:43:52 +0100
committerRory& <root@rory.gay>2026-11-05 23:43:52 +0100
commit4c8331fd7a2aa6544e700764457cb39acd585270 (patch)
tree83122517e13a1c1f20d36e68280ad6613a778e34
parentKittyLogo: add missing copyright header (diff)
downloadserver-ts-4c8331fd7a2aa6544e700764457cb39acd585270.tar.xz
More in depth error logging, fix schemas for application commands
-rw-r--r--assets/openapi.json5132
-rw-r--r--assets/schemas.json5949
-rw-r--r--src/api/middlewares/Route.ts8
-rw-r--r--src/api/routes/applications/#application_id/commands/#command_id/index.ts91
-rw-r--r--src/api/routes/applications/#application_id/commands/index.ts79
-rw-r--r--src/api/routes/applications/#application_id/guilds/#guild_id/commands/#command_id/index.ts145
-rw-r--r--src/api/routes/applications/#application_id/guilds/#guild_id/commands/index.ts93
-rw-r--r--src/api/routes/guilds/#guild_id/application-command-index.ts126
-rw-r--r--src/database/entities/Application.ts15
-rw-r--r--src/database/entities/ApplicationCommand.ts29
-rw-r--r--src/schemas/Validator.ts2
-rw-r--r--src/schemas/api/bots/ApplicationCommandSchema.ts15
-rw-r--r--src/schemas/api/developers/Application.ts35
-rw-r--r--src/util/util/Localization.ts33
-rw-r--r--src/util/util/index.ts1
15 files changed, 6304 insertions, 5449 deletions
diff --git a/assets/openapi.json b/assets/openapi.json

index 509181b40..483462cab 100644 --- a/assets/openapi.json +++ b/assets/openapi.json
@@ -133,6 +133,88 @@ ], "type": "number" }, + "name": { + "type": "string" + }, + "name_localizations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "description_localizations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "options": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationCommandOption" + } + }, + "default_member_permissions": { + "type": "string", + "nullable": true + }, + "dm_permission": { + "type": "boolean" + }, + "permissions": { + "$ref": "#/components/schemas/ApplicationCommandIndexPermissions" + }, + "nsfw": { + "type": "boolean" + }, + "integration_types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationIntegrationType" + } + }, + "contexts": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InteractionContextType" + } + }, + "version": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "handler": { + "enum": [ + 1, + 2, + 3 + ], + "type": "number" + } + }, + "required": [ + "default_member_permissions", + "description", + "name", + "version" + ] + }, + "ApplicationCommandListResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationCommandResponse" + } + }, + "ApplicationCommandResponse": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, "application_id": { "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", "type": "string" @@ -141,6 +223,26 @@ "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", "type": "string" }, + "name_localized": { + "type": "string", + "nullable": true + }, + "description_localized": { + "type": "string", + "nullable": true + }, + "global_popularity_rank": { + "type": "integer" + }, + "type": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "number" + }, "name": { "type": "string" }, @@ -150,10 +252,6 @@ "type": "string" } }, - "name_localized": { - "type": "string", - "nullable": true - }, "description": { "type": "string" }, @@ -163,10 +261,6 @@ "type": "string" } }, - "description_localized": { - "type": "string", - "nullable": true - }, "options": { "type": "array", "items": { @@ -192,9 +286,6 @@ "$ref": "#/components/schemas/ApplicationIntegrationType" } }, - "global_popularity_rank": { - "type": "integer" - }, "contexts": { "type": "array", "items": { @@ -218,6 +309,7 @@ "application_id", "default_member_permissions", "description", + "id", "name", "version" ] @@ -281,6 +373,899 @@ "type" ] }, + "JsonArray": { + "type": "object", + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "properties": { + "length": { + "type": "integer" + }, + "__@unscopables@751": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "type": "boolean" + } + }, + "properties": { + "length": { + "type": "boolean" + }, + "toString": { + "type": "boolean" + }, + "toLocaleString": { + "type": "boolean" + }, + "pop": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "concat": { + "type": "boolean" + }, + "join": { + "type": "boolean" + }, + "reverse": { + "type": "boolean" + }, + "shift": { + "type": "boolean" + }, + "slice": { + "type": "boolean" + }, + "sort": { + "type": "boolean" + }, + "splice": { + "type": "boolean" + }, + "unshift": { + "type": "boolean" + }, + "indexOf": { + "type": "boolean" + }, + "lastIndexOf": { + "type": "boolean" + }, + "every": { + "type": "boolean" + }, + "some": { + "type": "boolean" + }, + "forEach": { + "type": "boolean" + }, + "map": { + "type": "boolean" + }, + "filter": { + "type": "boolean" + }, + "reduce": { + "type": "boolean" + }, + "reduceRight": { + "type": "boolean" + }, + "find": { + "type": "boolean" + }, + "findIndex": { + "type": "boolean" + }, + "fill": { + "type": "boolean" + }, + "copyWithin": { + "type": "boolean" + }, + "entries": { + "type": "boolean" + }, + "keys": { + "type": "boolean" + }, + "values": { + "type": "boolean" + }, + "includes": { + "type": "boolean" + }, + "flatMap": { + "type": "boolean" + }, + "flat": { + "type": "boolean" + }, + "at": { + "type": "boolean" + }, + "findLast": { + "type": "boolean" + }, + "findLastIndex": { + "type": "boolean" + }, + "toReversed": { + "type": "boolean" + }, + "toSorted": { + "type": "boolean" + }, + "toSpliced": { + "type": "boolean" + }, + "with": { + "type": "boolean" + }, + "__@iterator@749": { + "type": "boolean" + }, + "__@unscopables@751": { + "type": "boolean" + } + } + } + }, + "required": [ + "__@unscopables@751", + "length" + ] + }, + "InstanceUserDeleteSchema": { + "$ref": "#/components/schemas/InstanceUserDeleteSchemaContent" + }, + "PublicMemberListResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublicMember" + } + }, + "PaymentSourceListResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PaymentSource" + } + }, + "PartialRelationshipSchema": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/RelationshipType" + }, + "nickname": { + "type": "string", + "nullable": true + }, + "since": { + "type": "string", + "format": "date-time" + }, + "stranger_request": { + "type": "boolean" + }, + "user_ignored": { + "type": "boolean" + } + }, + "required": [ + "id", + "nickname", + "type", + "user_ignored" + ] + }, + "RelationshipListSchema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RelationshipSchema" + } + }, + "RelationshipSchema": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/RelationshipType" + }, + "user": { + "$ref": "#/components/schemas/PartialUser" + }, + "nickname": { + "type": "string", + "nullable": true + }, + "is_spam_request": { + "type": "boolean" + }, + "stranger_request": { + "type": "boolean" + }, + "user_ignored": { + "type": "boolean" + }, + "origin_application_id": { + "type": "string", + "nullable": true + }, + "since": { + "type": "string", + "format": "date-time" + }, + "has_played_game": { + "type": "boolean" + }, + "note": { + "type": "string" + } + }, + "required": [ + "id", + "nickname", + "type", + "user", + "user_ignored" + ] + }, + "SendRelationshipRequestSchema": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "discriminator": { + "type": "string", + "nullable": true + }, + "note": { + "type": "string", + "nullable": true + } + }, + "required": [ + "discriminator", + "username" + ] + }, + "RelationshipCreateSchema": { + "type": "object", + "properties": { + "type": { + "enum": [ + -1, + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "type": "number" + }, + "from_friend_suggestion": { + "type": "boolean" + }, + "confirm_stranger_request": { + "type": "boolean" + }, + "note": { + "type": "string", + "nullable": true + } + } + }, + "RelationshipModifySchema": { + "type": "object", + "properties": { + "nickname": { + "type": "string" + } + } + }, + "UserMutualRelationResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "public_flags": { + "type": "integer" + } + }, + "required": [ + "discriminator", + "id", + "public_flags", + "username" + ] + }, + "UserMutualRelationsResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UserMutualRelationResponse" + } + }, + "SessionsLogoutSchema": { + "type": "object", + "properties": { + "session_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "session_id_hashes": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "GetSessionsResponse": { + "type": "object", + "properties": { + "user_sessions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "id_hash": { + "type": "string" + }, + "status": { + "type": "string" + }, + "activities": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Activity" + } + } + }, + "client_status": { + "$ref": "#/components/schemas/ClientStatus" + }, + "approx_last_used_time": { + "type": "string" + }, + "client_info": { + "type": "object", + "properties": { + "client": { + "type": "string" + }, + "os": { + "type": "string" + }, + "version": { + "type": "integer" + }, + "location": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "client", + "location", + "os", + "version" + ] + }, + "last_seen": { + "type": "string", + "format": "date-time" + }, + "last_seen_ip": { + "type": "string" + }, + "last_seen_location": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "activities", + "approx_last_used_time", + "client_info", + "client_status", + "id", + "id_hash", + "status" + ] + } + } + }, + "required": [ + "user_sessions" + ] + }, + "UserAccountModifySchema": { + "type": "object", + "properties": { + "global_name": { + "type": "string", + "nullable": true + } + } + }, + "UserProfileModifySchema": { + "type": "object", + "properties": { + "pronouns": { + "type": "string", + "nullable": true + }, + "bio": { + "type": "string", + "nullable": true + }, + "banner": { + "type": "string", + "nullable": true + }, + "accent_color": { + "type": "integer" + }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "popout_animation_particle_type": { + "type": "string", + "nullable": true + }, + "emoji_id": { + "type": "string", + "nullable": true + }, + "profile_effect_id": { + "type": "string", + "nullable": true + } + } + }, + "UserSettingsUpdateSchema": { + "type": "object", + "properties": { + "activity_restricted_guild_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "activity_joining_restricted_guild_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "afk_timeout": { + "type": "integer" + }, + "allow_accessibility_detection": { + "type": "boolean" + }, + "allow_activity_party_privacy_friends": { + "type": "boolean" + }, + "allow_activity_party_privacy_voice_channel": { + "type": "boolean" + }, + "animate_emoji": { + "type": "boolean" + }, + "animate_stickers": { + "type": "integer" + }, + "contact_sync_enabled": { + "type": "boolean" + }, + "convert_emoticons": { + "type": "boolean" + }, + "custom_status": { + "anyOf": [ + { + "$ref": "#/components/schemas/CustomStatus" + }, + { + "type": "null" + } + ] + }, + "default_guilds_restricted": { + "type": "boolean" + }, + "detect_platform_accounts": { + "type": "boolean" + }, + "developer_mode": { + "type": "boolean" + }, + "disable_games_tab": { + "type": "boolean" + }, + "enable_tts_command": { + "type": "boolean" + }, + "explicit_content_filter": { + "type": "integer" + }, + "friend_discovery_flags": { + "type": "integer" + }, + "friend_source_flags": { + "anyOf": [ + { + "$ref": "#/components/schemas/FriendSourceFlags" + }, + { + "type": "null" + } + ] + }, + "gif_auto_play": { + "type": "boolean" + }, + "guild_folders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GuildFolder" + } + }, + "inline_attachment_media": { + "type": "boolean" + }, + "inline_embed_media": { + "type": "boolean" + }, + "locale": { + "type": "string" + }, + "message_display_compact": { + "type": "boolean" + }, + "native_phone_integration_enabled": { + "type": "boolean" + }, + "passwordless": { + "type": "boolean" + }, + "render_embeds": { + "type": "boolean" + }, + "render_reactions": { + "type": "boolean" + }, + "restricted_guilds": { + "type": "array", + "items": { + "type": "string" + } + }, + "show_current_game": { + "type": "boolean" + }, + "slayer_sdk_receive_dms_in_game": { + "type": "integer" + }, + "soundboard_volume": { + "type": "integer" + }, + "status": { + "enum": [ + "dnd", + "idle", + "invisible", + "offline", + "online" + ], + "type": "string" + }, + "stream_notifications_enabled": { + "type": "boolean" + }, + "theme": { + "enum": [ + "dark", + "darker", + "light", + "midnight" + ], + "type": "string" + }, + "timezone_offset": { + "type": "integer" + }, + "view_nsfw_commands": { + "type": "boolean" + }, + "view_nsfw_guilds": { + "type": "boolean" + } + } + }, + "UserSettingsSchema": { + "type": "object", + "properties": { + "activity_restricted_guild_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "activity_joining_restricted_guild_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "afk_timeout": { + "type": "integer" + }, + "allow_accessibility_detection": { + "type": "boolean" + }, + "allow_activity_party_privacy_friends": { + "type": "boolean" + }, + "allow_activity_party_privacy_voice_channel": { + "type": "boolean" + }, + "animate_emoji": { + "type": "boolean" + }, + "animate_stickers": { + "type": "integer" + }, + "contact_sync_enabled": { + "type": "boolean" + }, + "convert_emoticons": { + "type": "boolean" + }, + "custom_status": { + "anyOf": [ + { + "$ref": "#/components/schemas/CustomStatus" + }, + { + "type": "null" + } + ] + }, + "default_guilds_restricted": { + "type": "boolean" + }, + "detect_platform_accounts": { + "type": "boolean" + }, + "developer_mode": { + "type": "boolean" + }, + "disable_games_tab": { + "type": "boolean" + }, + "enable_tts_command": { + "type": "boolean" + }, + "explicit_content_filter": { + "type": "integer" + }, + "friend_discovery_flags": { + "type": "integer" + }, + "friend_source_flags": { + "anyOf": [ + { + "$ref": "#/components/schemas/FriendSourceFlags" + }, + { + "type": "null" + } + ] + }, + "gif_auto_play": { + "type": "boolean" + }, + "guild_folders": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GuildFolder" + } + }, + "inline_attachment_media": { + "type": "boolean" + }, + "inline_embed_media": { + "type": "boolean" + }, + "locale": { + "type": "string" + }, + "message_display_compact": { + "type": "boolean" + }, + "native_phone_integration_enabled": { + "type": "boolean" + }, + "passwordless": { + "type": "boolean" + }, + "render_embeds": { + "type": "boolean" + }, + "render_reactions": { + "type": "boolean" + }, + "restricted_guilds": { + "type": "array", + "items": { + "type": "string" + } + }, + "show_current_game": { + "type": "boolean" + }, + "slayer_sdk_receive_dms_in_game": { + "type": "integer" + }, + "soundboard_volume": { + "type": "integer" + }, + "status": { + "enum": [ + "dnd", + "idle", + "invisible", + "offline", + "online" + ], + "type": "string" + }, + "stream_notifications_enabled": { + "type": "boolean" + }, + "theme": { + "enum": [ + "dark", + "darker", + "light", + "midnight" + ], + "type": "string" + }, + "timezone_offset": { + "type": "integer" + }, + "view_nsfw_commands": { + "type": "boolean" + }, + "view_nsfw_guilds": { + "type": "boolean" + } + }, + "required": [ + "activity_joining_restricted_guild_ids", + "activity_restricted_guild_ids", + "afk_timeout", + "allow_accessibility_detection", + "allow_activity_party_privacy_friends", + "allow_activity_party_privacy_voice_channel", + "animate_emoji", + "animate_stickers", + "contact_sync_enabled", + "convert_emoticons", + "custom_status", + "default_guilds_restricted", + "detect_platform_accounts", + "developer_mode", + "disable_games_tab", + "enable_tts_command", + "explicit_content_filter", + "friend_discovery_flags", + "friend_source_flags", + "gif_auto_play", + "guild_folders", + "inline_attachment_media", + "inline_embed_media", + "locale", + "message_display_compact", + "native_phone_integration_enabled", + "passwordless", + "render_embeds", + "render_reactions", + "restricted_guilds", + "show_current_game", + "slayer_sdk_receive_dms_in_game", + "soundboard_volume", + "status", + "stream_notifications_enabled", + "theme", + "timezone_offset", + "view_nsfw_commands", + "view_nsfw_guilds" + ] + }, + "GuildAvailableSchema": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "available": { + "type": "boolean" + } + }, + "required": [ + "available", + "id" + ] + }, + "InviteListResponse": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PublicInvite" + } + }, + "FieldErrorResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "errors": { + "$ref": "#/components/schemas/ErrorList" + } + }, + "required": [ + "code", + "errors", + "message" + ] + }, "ActivitySchema": { "type": "object", "properties": { @@ -1526,720 +2511,49 @@ "has_matching_guild" ] }, - "EmailDomainLookupVerifyCodeResponse": { - "type": "object", - "properties": { - "guild": { - "$ref": "#/components/schemas/Guild" - }, - "joined": { - "type": "boolean" - } - }, - "required": [ - "guild", - "joined" - ] - }, - "InstanceUserDeleteSchema": { - "$ref": "#/components/schemas/InstanceUserDeleteSchemaContent" - }, - "PublicMemberListResponse": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PublicMember" - } - }, - "PaymentSourceListResponse": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PaymentSource" - } - }, - "PartialRelationshipSchema": { + "Tag": { "type": "object", "properties": { "id": { "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", "type": "string" }, - "type": { - "$ref": "#/components/schemas/RelationshipType" - }, - "nickname": { - "type": "string", - "nullable": true - }, - "since": { - "type": "string", - "format": "date-time" - }, - "stranger_request": { - "type": "boolean" - }, - "user_ignored": { - "type": "boolean" - } - }, - "required": [ - "id", - "nickname", - "type", - "user_ignored" - ] - }, - "RelationshipListSchema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/RelationshipSchema" - } - }, - "RelationshipSchema": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "name": { "type": "string" }, - "type": { - "$ref": "#/components/schemas/RelationshipType" - }, - "user": { - "$ref": "#/components/schemas/PartialUser" - }, - "nickname": { - "type": "string", - "nullable": true - }, - "is_spam_request": { - "type": "boolean" - }, - "stranger_request": { - "type": "boolean" - }, - "user_ignored": { - "type": "boolean" - }, - "origin_application_id": { - "type": "string", - "nullable": true - }, - "since": { - "type": "string", - "format": "date-time" - }, - "has_played_game": { + "moderated": { "type": "boolean" }, - "note": { - "type": "string" - } - }, - "required": [ - "id", - "nickname", - "type", - "user", - "user_ignored" - ] - }, - "SendRelationshipRequestSchema": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "discriminator": { - "type": "string", - "nullable": true - }, - "note": { + "emoji_id": { "type": "string", "nullable": true - } - }, - "required": [ - "discriminator", - "username" - ] - }, - "RelationshipCreateSchema": { - "type": "object", - "properties": { - "type": { - "enum": [ - -1, - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "type": "number" }, - "from_friend_suggestion": { - "type": "boolean" - }, - "confirm_stranger_request": { - "type": "boolean" - }, - "note": { + "emoji_name": { "type": "string", "nullable": true } - } - }, - "RelationshipModifySchema": { - "type": "object", - "properties": { - "nickname": { - "type": "string" - } - } - }, - "UserMutualRelationResponse": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "discriminator": { - "type": "string" - }, - "avatar": { - "type": "string" - }, - "public_flags": { - "type": "integer" - } }, "required": [ - "discriminator", + "emoji_id", + "emoji_name", "id", - "public_flags", - "username" - ] - }, - "UserMutualRelationsResponse": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UserMutualRelationResponse" - } - }, - "SessionsLogoutSchema": { - "type": "object", - "properties": { - "session_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "session_id_hashes": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "GetSessionsResponse": { - "type": "object", - "properties": { - "user_sessions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "id_hash": { - "type": "string" - }, - "status": { - "type": "string" - }, - "activities": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Activity" - } - } - }, - "client_status": { - "$ref": "#/components/schemas/ClientStatus" - }, - "approx_last_used_time": { - "type": "string" - }, - "client_info": { - "type": "object", - "properties": { - "client": { - "type": "string" - }, - "os": { - "type": "string" - }, - "version": { - "type": "integer" - }, - "location": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "client", - "location", - "os", - "version" - ] - }, - "last_seen": { - "type": "string", - "format": "date-time" - }, - "last_seen_ip": { - "type": "string" - }, - "last_seen_location": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "activities", - "approx_last_used_time", - "client_info", - "client_status", - "id", - "id_hash", - "status" - ] - } - } - }, - "required": [ - "user_sessions" + "moderated", + "name" ] }, - "UserAccountModifySchema": { - "type": "object", - "properties": { - "global_name": { - "type": "string", - "nullable": true - } - } - }, - "UserProfileModifySchema": { - "type": "object", - "properties": { - "pronouns": { - "type": "string", - "nullable": true - }, - "bio": { - "type": "string", - "nullable": true - }, - "banner": { - "type": "string", - "nullable": true - }, - "accent_color": { - "type": "integer" - }, - "theme_colors": { - "type": "array", - "items": { - "type": "integer" - } - }, - "popout_animation_particle_type": { - "type": "string", - "nullable": true - }, - "emoji_id": { - "type": "string", - "nullable": true - }, - "profile_effect_id": { - "type": "string", - "nullable": true - } - } - }, - "UserSettingsUpdateSchema": { - "type": "object", - "properties": { - "activity_restricted_guild_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "activity_joining_restricted_guild_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "afk_timeout": { - "type": "integer" - }, - "allow_accessibility_detection": { - "type": "boolean" - }, - "allow_activity_party_privacy_friends": { - "type": "boolean" - }, - "allow_activity_party_privacy_voice_channel": { - "type": "boolean" - }, - "animate_emoji": { - "type": "boolean" - }, - "animate_stickers": { - "type": "integer" - }, - "contact_sync_enabled": { - "type": "boolean" - }, - "convert_emoticons": { - "type": "boolean" - }, - "custom_status": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomStatus" - }, - { - "type": "null" - } - ] - }, - "default_guilds_restricted": { - "type": "boolean" - }, - "detect_platform_accounts": { - "type": "boolean" - }, - "developer_mode": { - "type": "boolean" - }, - "disable_games_tab": { - "type": "boolean" - }, - "enable_tts_command": { - "type": "boolean" - }, - "explicit_content_filter": { - "type": "integer" - }, - "friend_discovery_flags": { - "type": "integer" - }, - "friend_source_flags": { - "anyOf": [ - { - "$ref": "#/components/schemas/FriendSourceFlags" - }, - { - "type": "null" - } - ] - }, - "gif_auto_play": { - "type": "boolean" - }, - "guild_folders": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GuildFolder" - } - }, - "inline_attachment_media": { - "type": "boolean" - }, - "inline_embed_media": { - "type": "boolean" - }, - "locale": { - "type": "string" - }, - "message_display_compact": { - "type": "boolean" - }, - "native_phone_integration_enabled": { - "type": "boolean" - }, - "passwordless": { - "type": "boolean" - }, - "render_embeds": { - "type": "boolean" - }, - "render_reactions": { - "type": "boolean" - }, - "restricted_guilds": { - "type": "array", - "items": { - "type": "string" - } - }, - "show_current_game": { - "type": "boolean" - }, - "slayer_sdk_receive_dms_in_game": { - "type": "integer" - }, - "soundboard_volume": { - "type": "integer" - }, - "status": { - "enum": [ - "dnd", - "idle", - "invisible", - "offline", - "online" - ], - "type": "string" - }, - "stream_notifications_enabled": { - "type": "boolean" - }, - "theme": { - "enum": [ - "dark", - "darker", - "light", - "midnight" - ], - "type": "string" - }, - "timezone_offset": { - "type": "integer" - }, - "view_nsfw_commands": { - "type": "boolean" - }, - "view_nsfw_guilds": { - "type": "boolean" - } - } - }, - "UserSettingsSchema": { + "EmailDomainLookupVerifyCodeResponse": { "type": "object", "properties": { - "activity_restricted_guild_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "activity_joining_restricted_guild_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "afk_timeout": { - "type": "integer" - }, - "allow_accessibility_detection": { - "type": "boolean" - }, - "allow_activity_party_privacy_friends": { - "type": "boolean" - }, - "allow_activity_party_privacy_voice_channel": { - "type": "boolean" - }, - "animate_emoji": { - "type": "boolean" - }, - "animate_stickers": { - "type": "integer" - }, - "contact_sync_enabled": { - "type": "boolean" - }, - "convert_emoticons": { - "type": "boolean" - }, - "custom_status": { - "anyOf": [ - { - "$ref": "#/components/schemas/CustomStatus" - }, - { - "type": "null" - } - ] - }, - "default_guilds_restricted": { - "type": "boolean" - }, - "detect_platform_accounts": { - "type": "boolean" - }, - "developer_mode": { - "type": "boolean" - }, - "disable_games_tab": { - "type": "boolean" - }, - "enable_tts_command": { - "type": "boolean" - }, - "explicit_content_filter": { - "type": "integer" - }, - "friend_discovery_flags": { - "type": "integer" - }, - "friend_source_flags": { - "anyOf": [ - { - "$ref": "#/components/schemas/FriendSourceFlags" - }, - { - "type": "null" - } - ] - }, - "gif_auto_play": { - "type": "boolean" - }, - "guild_folders": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GuildFolder" - } - }, - "inline_attachment_media": { - "type": "boolean" - }, - "inline_embed_media": { - "type": "boolean" - }, - "locale": { - "type": "string" - }, - "message_display_compact": { - "type": "boolean" - }, - "native_phone_integration_enabled": { - "type": "boolean" - }, - "passwordless": { - "type": "boolean" - }, - "render_embeds": { - "type": "boolean" - }, - "render_reactions": { - "type": "boolean" - }, - "restricted_guilds": { - "type": "array", - "items": { - "type": "string" - } - }, - "show_current_game": { - "type": "boolean" - }, - "slayer_sdk_receive_dms_in_game": { - "type": "integer" - }, - "soundboard_volume": { - "type": "integer" - }, - "status": { - "enum": [ - "dnd", - "idle", - "invisible", - "offline", - "online" - ], - "type": "string" - }, - "stream_notifications_enabled": { - "type": "boolean" - }, - "theme": { - "enum": [ - "dark", - "darker", - "light", - "midnight" - ], - "type": "string" - }, - "timezone_offset": { - "type": "integer" - }, - "view_nsfw_commands": { - "type": "boolean" + "guild": { + "$ref": "#/components/schemas/Guild" }, - "view_nsfw_guilds": { + "joined": { "type": "boolean" } }, "required": [ - "activity_joining_restricted_guild_ids", - "activity_restricted_guild_ids", - "afk_timeout", - "allow_accessibility_detection", - "allow_activity_party_privacy_friends", - "allow_activity_party_privacy_voice_channel", - "animate_emoji", - "animate_stickers", - "contact_sync_enabled", - "convert_emoticons", - "custom_status", - "default_guilds_restricted", - "detect_platform_accounts", - "developer_mode", - "disable_games_tab", - "enable_tts_command", - "explicit_content_filter", - "friend_discovery_flags", - "friend_source_flags", - "gif_auto_play", - "guild_folders", - "inline_attachment_media", - "inline_embed_media", - "locale", - "message_display_compact", - "native_phone_integration_enabled", - "passwordless", - "render_embeds", - "render_reactions", - "restricted_guilds", - "show_current_game", - "slayer_sdk_receive_dms_in_game", - "soundboard_volume", - "status", - "stream_notifications_enabled", - "theme", - "timezone_offset", - "view_nsfw_commands", - "view_nsfw_guilds" + "guild", + "joined" ] }, "EmojisResponse": { @@ -2510,6 +2824,10 @@ "region": { "type": "string" }, + "banner": { + "type": "string", + "nullable": true + }, "icon": { "type": "string", "nullable": true @@ -2526,10 +2844,6 @@ "staff_only": { "type": "boolean" }, - "banner": { - "type": "string", - "nullable": true - }, "splash": { "type": "string", "nullable": true @@ -3130,40 +3444,6 @@ "verified" ] }, - "Tag": { - "type": "object", - "properties": { - "channel_id": { - "type": "string" - }, - "channel": { - "$ref": "#/components/schemas/Channel" - }, - "name": { - "type": "string" - }, - "moderated": { - "type": "boolean", - "default": false - }, - "emoji_id": { - "type": "string" - }, - "emoji_name": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "required": [ - "channel", - "channel_id", - "id", - "moderated", - "name" - ] - }, "Channel": { "type": "object", "properties": { @@ -3362,157 +3642,6 @@ "refreshed_urls" ] }, - "JsonArray": { - "type": "object", - "patternProperties": { - "^[0-9]+$": { - "$ref": "#/components/schemas/JsonValue" - } - }, - "properties": { - "length": { - "type": "integer" - }, - "__@unscopables@751": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]+$": { - "type": "boolean" - } - }, - "properties": { - "length": { - "type": "boolean" - }, - "toString": { - "type": "boolean" - }, - "toLocaleString": { - "type": "boolean" - }, - "pop": { - "type": "boolean" - }, - "push": { - "type": "boolean" - }, - "concat": { - "type": "boolean" - }, - "join": { - "type": "boolean" - }, - "reverse": { - "type": "boolean" - }, - "shift": { - "type": "boolean" - }, - "slice": { - "type": "boolean" - }, - "sort": { - "type": "boolean" - }, - "splice": { - "type": "boolean" - }, - "unshift": { - "type": "boolean" - }, - "indexOf": { - "type": "boolean" - }, - "lastIndexOf": { - "type": "boolean" - }, - "every": { - "type": "boolean" - }, - "some": { - "type": "boolean" - }, - "forEach": { - "type": "boolean" - }, - "map": { - "type": "boolean" - }, - "filter": { - "type": "boolean" - }, - "reduce": { - "type": "boolean" - }, - "reduceRight": { - "type": "boolean" - }, - "find": { - "type": "boolean" - }, - "findIndex": { - "type": "boolean" - }, - "fill": { - "type": "boolean" - }, - "copyWithin": { - "type": "boolean" - }, - "entries": { - "type": "boolean" - }, - "keys": { - "type": "boolean" - }, - "values": { - "type": "boolean" - }, - "includes": { - "type": "boolean" - }, - "flatMap": { - "type": "boolean" - }, - "flat": { - "type": "boolean" - }, - "at": { - "type": "boolean" - }, - "findLast": { - "type": "boolean" - }, - "findLastIndex": { - "type": "boolean" - }, - "toReversed": { - "type": "boolean" - }, - "toSorted": { - "type": "boolean" - }, - "toSpliced": { - "type": "boolean" - }, - "with": { - "type": "boolean" - }, - "__@iterator@749": { - "type": "boolean" - }, - "__@unscopables@751": { - "type": "boolean" - } - } - } - }, - "required": [ - "__@unscopables@751", - "length" - ] - }, "SettingsProtoResponse": { "type": "object", "properties": { @@ -3662,6 +3791,15 @@ "type": "object", "additionalProperties": false }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Role" + } + }, + "banner": { + "type": "string" + }, "channels": { "type": "array", "items": { @@ -3685,15 +3823,6 @@ "type": "string", "nullable": true }, - "roles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Role" - } - }, - "banner": { - "type": "string" - }, "splash": { "type": "string" }, @@ -4129,6 +4258,10 @@ "region": { "type": "string" }, + "banner": { + "type": "string", + "nullable": true + }, "icon": { "type": "string", "nullable": true @@ -4145,10 +4278,6 @@ "staff_only": { "type": "boolean" }, - "banner": { - "type": "string", - "nullable": true - }, "splash": { "type": "string", "nullable": true @@ -6401,13 +6530,13 @@ "id": { "type": "string" }, + "flags": { + "type": "integer" + }, "icon": { "type": "string", "nullable": true }, - "flags": { - "type": "integer" - }, "nsfw": { "type": "boolean" }, @@ -6647,6 +6776,32 @@ "version" ] }, + "ApplicationCommandIndexResponse": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationCommandIndexApplication" + } + }, + "application_commands": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ApplicationCommandResponse" + } + }, + "version": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + } + }, + "required": [ + "application_commands", + "applications", + "version" + ] + }, "ApplicationAllowlistResponse": { "type": "array", "items": { @@ -7233,22 +7388,6 @@ "visibility" ] }, - "GuildAvailableSchema": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "available": { - "type": "boolean" - } - }, - "required": [ - "available", - "id" - ] - }, "RoleResponse": { "type": "object", "properties": { @@ -8378,31 +8517,6 @@ "$ref": "#/components/schemas/VoiceRegionResponse" } }, - "InviteListResponse": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PublicInvite" - } - }, - "FieldErrorResponse": { - "type": "object", - "properties": { - "code": { - "type": "integer" - }, - "message": { - "type": "string" - }, - "errors": { - "$ref": "#/components/schemas/ErrorList" - } - }, - "required": [ - "code", - "errors", - "message" - ] - }, "RouteResponse": { "type": "object", "properties": { @@ -8464,12 +8578,45 @@ "name": { "type": "string" }, + "name_localizations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "description": { "type": "string" }, + "description_localizations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "required": { "type": "boolean" }, + "autocomplete": { + "type": "boolean" + }, + "min_length": { + "type": "integer" + }, + "max_length": { + "type": "integer" + }, + "min_value": { + "type": "integer" + }, + "max_value": { + "type": "integer" + }, + "channel_types": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelType" + } + }, "choices": { "type": "array", "items": { @@ -8502,12 +8649,43 @@ 8 ] }, + "ChannelType": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 255 + ] + }, "ApplicationCommandOptionChoice": { "type": "object", "properties": { "name": { "type": "string" }, + "name_localizations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "value": { "type": [ "string", @@ -8626,16 +8804,713 @@ "filename" ] }, - "SetPrivateStatus": { + "JsonValue": { + "description": "Represents any possible JSON value:\n- number\n- string\n- boolean\n- null\n- object (with any JSON value as property)\n- array (with any JSON value as element)", + "anyOf": [ + { + "description": "Represents a JSON object.", + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/JsonValue" + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/components/schemas/JsonValue" + } + }, + "properties": { + "length": { + "type": "integer" + }, + "__@unscopables@751": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "type": "boolean" + } + }, + "properties": { + "length": { + "type": "boolean" + }, + "toString": { + "type": "boolean" + }, + "toLocaleString": { + "type": "boolean" + }, + "pop": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "concat": { + "type": "boolean" + }, + "join": { + "type": "boolean" + }, + "reverse": { + "type": "boolean" + }, + "shift": { + "type": "boolean" + }, + "slice": { + "type": "boolean" + }, + "sort": { + "type": "boolean" + }, + "splice": { + "type": "boolean" + }, + "unshift": { + "type": "boolean" + }, + "indexOf": { + "type": "boolean" + }, + "lastIndexOf": { + "type": "boolean" + }, + "every": { + "type": "boolean" + }, + "some": { + "type": "boolean" + }, + "forEach": { + "type": "boolean" + }, + "map": { + "type": "boolean" + }, + "filter": { + "type": "boolean" + }, + "reduce": { + "type": "boolean" + }, + "reduceRight": { + "type": "boolean" + }, + "find": { + "type": "boolean" + }, + "findIndex": { + "type": "boolean" + }, + "fill": { + "type": "boolean" + }, + "copyWithin": { + "type": "boolean" + }, + "entries": { + "type": "boolean" + }, + "keys": { + "type": "boolean" + }, + "values": { + "type": "boolean" + }, + "includes": { + "type": "boolean" + }, + "flatMap": { + "type": "boolean" + }, + "flat": { + "type": "boolean" + }, + "at": { + "type": "boolean" + }, + "findLast": { + "type": "boolean" + }, + "findLastIndex": { + "type": "boolean" + }, + "toReversed": { + "type": "boolean" + }, + "toSorted": { + "type": "boolean" + }, + "toSpliced": { + "type": "boolean" + }, + "with": { + "type": "boolean" + }, + "__@iterator@749": { + "type": "boolean" + }, + "__@unscopables@751": { + "type": "boolean" + } + } + } + }, + "required": [ + "__@unscopables@751", + "length" + ] + }, + { + "type": [ + "null", + "string", + "integer", + "boolean" + ] + } + ] + }, + "InstanceUserDeleteSchemaContent": { + "type": "object", + "properties": { + "reason": { + "type": "string" + }, + "persistInstanceBan": { + "type": "boolean" + } + } + }, + "PublicMember": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "nick": { + "type": "string" + }, + "joined_at": { + "type": "string", + "format": "date-time" + }, + "pending": { + "type": "boolean" + }, + "deaf": { + "type": "boolean" + }, + "mute": { + "type": "boolean" + }, + "premium_since": { + "type": "integer" + }, + "avatar": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pronouns": { + "type": "string" + }, + "communication_disabled_until": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] + }, + "flags": { + "type": "integer" + }, + "user": { + "$ref": "#/components/schemas/PublicUser" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "banner", + "bio", + "communication_disabled_until", + "deaf", + "flags", + "guild_id", + "id", + "joined_at", + "mute", + "pending", + "roles", + "user" + ] + }, + "PublicUser": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "premium_since": { + "type": "string", + "format": "date-time" + }, + "avatar": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pronouns": { + "type": "string" + }, + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "public_flags": { + "type": "integer" + }, + "accent_color": { + "type": "integer" + }, + "bot": { + "type": "boolean" + }, + "premium_type": { + "type": "integer" + }, + "badge_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "avatar_decoration_data": { + "$ref": "#/components/schemas/AvatarDecorationData" + }, + "display_name_styles": { + "$ref": "#/components/schemas/DisplayNameStyle" + }, + "collectibles": { + "$ref": "#/components/schemas/Collectibles" + }, + "primary_guild": { + "$ref": "#/components/schemas/PrimaryGuild" + } + }, + "required": [ + "bio", + "bot", + "discriminator", + "id", + "premium_since", + "premium_type", + "public_flags", + "username" + ] + }, + "AvatarDecorationData": { + "type": "object", + "properties": { + "asset": { + "type": "string" + }, + "sku_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "expires_at": { + "type": "string", + "nullable": true + } + }, + "required": [ + "asset", + "expires_at", + "sku_id" + ] + }, + "DisplayNameStyle": { + "type": "object", + "properties": { + "font_id": { + "type": "integer" + }, + "effect_id": { + "type": "integer" + }, + "colors": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "required": [ + "colors", + "effect_id", + "font_id" + ] + }, + "Collectibles": { + "type": "object", + "properties": { + "nameplate": { + "anyOf": [ + { + "$ref": "#/components/schemas/NameplateData" + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "nameplate" + ] + }, + "NameplateData": { + "type": "object", + "properties": { + "asset": { + "type": "string" + }, + "sku_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "label": { + "type": "string" + }, + "palette": { + "type": "string" + }, + "expires_at": { + "type": "integer", + "nullable": true + } + }, + "required": [ + "asset", + "expires_at", + "label", + "palette", + "sku_id" + ] + }, + "PrimaryGuild": { + "type": "object", + "properties": { + "identity_enabled": { + "type": "boolean", + "nullable": true + }, + "identity_guild_id": { + "type": "string", + "nullable": true + }, + "tag": { + "type": "string", + "nullable": true + }, + "badge": { + "type": "string", + "nullable": true + } + }, + "required": [ + "badge", + "identity_enabled", + "identity_guild_id", + "tag" + ] + }, + "PaymentSource": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "brand": { + "type": "string" + }, + "country": { + "type": "string" + }, + "last_4": { + "type": "string" + }, + "billing_address": { + "$ref": "#/components/schemas/BillingAddress" + }, + "type": { + "$ref": "#/components/schemas/PaymentSourceType" + }, + "payment_gateway": { + "$ref": "#/components/schemas/PaymentGateway" + }, + "payment_gateway_source_id": { + "type": "string" + }, + "default": { + "type": "boolean" + }, + "invalid": { + "type": "boolean" + }, + "flags": { + "$ref": "#/components/schemas/PaymentSourceFlags" + }, + "deleted_at": { + "type": "string", + "nullable": true + }, + "expires_month": { + "type": "integer" + }, + "expires_year": { + "type": "integer" + }, + "email": { + "type": "string" + }, + "bank": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "required": [ + "billing_address", + "default", + "deleted_at", + "flags", + "id", + "invalid", + "payment_gateway", + "type" + ] + }, + "BillingAddress": { + "type": "object", + "properties": { + "line_1": { + "type": "string" + }, + "line_2": { + "type": "string", + "nullable": true + }, + "name": { + "type": "string" + }, + "postal_code": { + "type": "string" + }, + "city": { + "type": "string" + }, + "state": { + "type": "string" + }, + "country": { + "type": "string" + } + }, + "required": [ + "city", + "country", + "line_1", + "name" + ] + }, + "PaymentSourceType": { + "type": "number", "enum": [ - "dnd", - "idle", - "invisible", - "offline", - "online", - "unknown" - ], - "type": "string" + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19 + ] + }, + "PaymentGateway": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10 + ] + }, + "PaymentSourceFlags": { + "type": "number", + "enum": [ + 1, + 2 + ] + }, + "RelationshipType": { + "type": "number", + "enum": [ + -1, + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ] + }, + "PartialUser": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "global_name": { + "type": "string", + "nullable": true + }, + "avatar": { + "type": "string", + "nullable": true + }, + "avatar_decoration_data": { + "anyOf": [ + { + "$ref": "#/components/schemas/AvatarDecorationData" + }, + { + "type": "null" + } + ] + }, + "collectibles": { + "anyOf": [ + { + "$ref": "#/components/schemas/Collectibles" + }, + { + "type": "null" + } + ] + }, + "display_name_styles": { + "anyOf": [ + { + "$ref": "#/components/schemas/DisplayNameStyle" + }, + { + "type": "null" + } + ] + }, + "primary_guild": { + "anyOf": [ + { + "$ref": "#/components/schemas/PrimaryGuild" + }, + { + "type": "null" + } + ] + }, + "bot": { + "type": "boolean" + }, + "system": { + "type": "boolean" + }, + "banner": { + "type": "string", + "nullable": true + }, + "accent_color": { + "type": "integer", + "nullable": true + }, + "public_flags": { + "type": "integer" + } + }, + "required": [ + "avatar", + "discriminator", + "id", + "username" + ] }, "Activity": { "type": "object", @@ -8878,6 +9753,374 @@ } } }, + "CustomStatus": { + "type": "object", + "properties": { + "emoji_id": { + "type": "string" + }, + "emoji_name": { + "type": "string" + }, + "expires_at": { + "type": "integer" + }, + "text": { + "type": "string" + } + } + }, + "FriendSourceFlags": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "mutual_friends": { + "type": "boolean" + }, + "mutual_guilds": { + "type": "boolean" + } + } + }, + "GuildFolder": { + "type": "object", + "properties": { + "color": { + "type": "integer", + "nullable": true + }, + "guild_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": "integer", + "nullable": true + }, + "name": { + "type": "string", + "nullable": true + } + }, + "required": [ + "guild_ids" + ] + }, + "PublicInvite": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/InviteType" + }, + "channel": { + "anyOf": [ + { + "$ref": "#/components/schemas/PublicChannel" + }, + { + "type": "null" + } + ] + }, + "guild_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "guild": { + "$ref": "#/components/schemas/InviteGuild" + }, + "profile": { + "$ref": "#/components/schemas/GuildProfileResponse" + }, + "inviter": { + "$ref": "#/components/schemas/PartialUser" + }, + "flags": { + "enum": [ + 1, + 2, + 4, + 8 + ], + "type": "number" + }, + "target_type": { + "type": "integer" + }, + "target_user": { + "$ref": "#/components/schemas/PartialUser" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/components/schemas/InviteRole" + } + }, + "approximate_member_count": { + "type": "integer" + }, + "approximate_presence_count": { + "type": "integer" + }, + "expires_at": { + "type": "string", + "nullable": true + }, + "new_member": { + "type": "boolean" + }, + "show_verification_form": { + "type": "boolean" + }, + "is_nickname_changeable": { + "type": "boolean" + }, + "target_users_job_status": { + "$ref": "#/components/schemas/InviteTargetUsersJob" + } + }, + "required": [ + "channel", + "code", + "expires_at", + "type" + ] + }, + "InviteType": { + "type": "number", + "enum": [ + 0, + 1, + 2 + ] + }, + "PublicChannel": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/ChannelType" + }, + "guild_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "position": { + "type": "integer" + }, + "permission_overwrites": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ChannelPermissionOverwrite" + } + }, + "name": { + "type": "string", + "nullable": true + }, + "topic": { + "type": "string", + "nullable": true + }, + "nsfw": { + "type": "boolean" + }, + "last_message_id": { + "type": "string", + "nullable": true + }, + "last_pin_timestamp": { + "type": "string", + "nullable": true + }, + "bitrate": { + "type": "integer" + }, + "user_limit": { + "type": "integer" + }, + "rate_limit_per_user": { + "type": "integer" + }, + "recipients": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PartialUser" + } + }, + "recipient_flags": { + "type": "integer" + }, + "icon": { + "type": "string", + "nullable": true + }, + "managed": { + "type": "boolean" + }, + "blocked_user_warning_dismissed": { + "type": "boolean" + }, + "application_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "owner_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "owner": { + "anyOf": [ + { + "$ref": "#/components/schemas/PublicMember" + }, + { + "type": "null" + } + ] + }, + "parent_id": { + "type": "string", + "nullable": true + }, + "rtc_region": { + "type": "string", + "nullable": true + }, + "video_quality_mode": { + "type": "integer" + }, + "total_message_sent": { + "type": "integer" + }, + "message_count": { + "type": "integer" + }, + "member_count": { + "type": "integer" + }, + "member_ids_preview": { + "type": "array", + "items": { + "type": "string" + } + }, + "thread_metadata": { + "$ref": "#/components/schemas/ThreadMetadata" + }, + "member": { + "$ref": "#/components/schemas/PublicThreadMember" + }, + "default_auto_archive_duration": { + "type": "integer", + "nullable": true + }, + "default_thread_rate_limit_per_user": { + "type": "integer" + }, + "permissions": { + "type": "string" + }, + "flags": { + "type": "integer" + }, + "available_tags": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Tag" + } + }, + "applied_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "default_reaction_emoji": { + "type": "string", + "nullable": true + }, + "default_forum_layout": { + "type": "integer" + }, + "default_sort_order": { + "type": "integer", + "nullable": true + }, + "default_tag_setting": { + "type": "string" + }, + "is_message_request": { + "type": "boolean" + }, + "is_message_request_timestamp": { + "type": "string", + "nullable": true + }, + "is_spam": { + "type": "boolean" + }, + "theme_color": { + "type": "integer", + "nullable": true + }, + "status": { + "type": "string", + "nullable": true + }, + "hd_streaming_until": { + "type": "string", + "nullable": true + }, + "hd_streaming_buyer_id": { + "type": "string", + "nullable": true + }, + "is_linkable": { + "type": "boolean" + }, + "is_viewable_and_writeable_by_all_members": { + "type": "boolean" + } + }, + "required": [ + "id", + "type" + ] + }, + "ChannelPermissionOverwrite": { + "type": "object", + "properties": { + "allow": { + "type": "string" + }, + "deny": { + "type": "string" + }, + "id": { + "type": "string" + }, + "type": { + "$ref": "#/components/schemas/ChannelPermissionOverwriteType" + } + }, + "required": [ + "allow", + "deny", + "id", + "type" + ] + }, "ChannelPermissionOverwriteType": { "type": "number", "enum": [ @@ -8886,6 +10129,371 @@ 2 ] }, + "ThreadMetadata": { + "type": "object", + "properties": { + "archived": { + "type": "boolean" + }, + "auto_archive_duration": { + "type": "integer" + }, + "archive_timestamp": { + "type": "string" + }, + "locked": { + "type": "boolean" + }, + "invitable": { + "type": "boolean" + }, + "create_timestamp": { + "type": "string" + } + }, + "required": [ + "archive_timestamp", + "archived", + "auto_archive_duration", + "create_timestamp", + "locked" + ] + }, + "PublicThreadMember": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "user_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "join_timestamp": { + "type": "string" + }, + "flags": { + "$ref": "#/components/schemas/ThreadMemberFlags" + }, + "muted": { + "type": "boolean" + }, + "mute_config": { + "anyOf": [ + { + "$ref": "#/components/schemas/MuteConfig" + }, + { + "type": "null" + } + ] + }, + "member": { + "$ref": "#/components/schemas/PublicMember" + } + }, + "required": [ + "flags", + "join_timestamp" + ] + }, + "ThreadMemberFlags": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 4, + 8 + ] + }, + "MuteConfig": { + "type": "object", + "properties": { + "end_time": { + "type": "integer" + }, + "selected_time_window": { + "type": "integer" + } + }, + "required": [ + "end_time", + "selected_time_window" + ] + }, + "InviteGuild": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "name": { + "type": "string" + }, + "icon": { + "type": "string", + "nullable": true + }, + "description": { + "type": "string", + "nullable": true + }, + "banner": { + "type": "string", + "nullable": true + }, + "splash": { + "type": "string", + "nullable": true + }, + "verification_level": { + "$ref": "#/components/schemas/GuildVerificationLevel" + }, + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "vanity_url_code": { + "type": "string", + "nullable": true + }, + "premium_subscription_count": { + "type": "integer" + }, + "premium_tier": { + "$ref": "#/components/schemas/GuildPremiumTier" + }, + "nsfw": { + "type": "boolean" + }, + "nsfw_level": { + "$ref": "#/components/schemas/GuildNsfwLevel" + } + }, + "required": [ + "banner", + "description", + "features", + "icon", + "id", + "name", + "nsfw", + "nsfw_level", + "premium_tier", + "splash", + "vanity_url_code", + "verification_level" + ] + }, + "GuildVerificationLevel": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4 + ] + }, + "GuildPremiumTier": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3 + ] + }, + "GuildNsfwLevel": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3 + ] + }, + "GameActivity": { + "type": "object", + "properties": { + "activity_level": { + "type": "integer" + }, + "activity_score": { + "type": "integer" + } + }, + "required": [ + "activity_level", + "activity_score" + ] + }, + "GuildTrait": { + "type": "object", + "properties": { + "emoji_id": { + "type": "string", + "nullable": true + }, + "emoji_name": { + "type": "string", + "nullable": true + }, + "emoji_animated": { + "type": "boolean" + }, + "label": { + "type": "string" + }, + "position": { + "type": "integer" + } + }, + "required": [ + "emoji_animated", + "emoji_id", + "emoji_name", + "label", + "position" + ] + }, + "GuildVisibilityLevel": { + "type": "number", + "enum": [ + 1, + 2, + 3 + ] + }, + "InviteRole": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "name": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "color": { + "type": "integer" + }, + "colors": { + "$ref": "#/components/schemas/RoleColors" + }, + "icon": { + "type": "string", + "nullable": true + }, + "unicode_emoji": { + "type": "string", + "nullable": true + } + }, + "required": [ + "color", + "colors", + "id", + "name", + "position" + ] + }, + "RoleColors": { + "type": "object", + "properties": { + "primary_color": { + "type": "integer" + }, + "secondary_color": { + "type": "integer" + }, + "tertiary_color": { + "type": "integer" + } + }, + "required": [ + "primary_color" + ] + }, + "InviteTargetUsersJob": { + "type": "object", + "properties": { + "status": { + "$ref": "#/components/schemas/InviteTargetUsersJobStatus" + }, + "total_users": { + "type": "integer" + }, + "processed_users": { + "type": "integer" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] + }, + "completed_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] + }, + "error_message": { + "type": "string", + "nullable": true + } + }, + "required": [ + "completed_at", + "created_at", + "error_message", + "processed_users", + "status", + "total_users" + ] + }, + "InviteTargetUsersJobStatus": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3 + ] + }, + "ErrorList": { + "type": "object" + }, + "SetPrivateStatus": { + "enum": [ + "dnd", + "idle", + "invisible", + "offline", + "online", + "unknown" + ], + "type": "string" + }, "ConnectedAccountTokenData": { "type": "object", "properties": { @@ -9964,209 +11572,6 @@ "vanity_url_code" ] }, - "PartialUser": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "username": { - "type": "string" - }, - "discriminator": { - "type": "string" - }, - "global_name": { - "type": "string", - "nullable": true - }, - "avatar": { - "type": "string", - "nullable": true - }, - "avatar_decoration_data": { - "anyOf": [ - { - "$ref": "#/components/schemas/AvatarDecorationData" - }, - { - "type": "null" - } - ] - }, - "collectibles": { - "anyOf": [ - { - "$ref": "#/components/schemas/Collectibles" - }, - { - "type": "null" - } - ] - }, - "display_name_styles": { - "anyOf": [ - { - "$ref": "#/components/schemas/DisplayNameStyle" - }, - { - "type": "null" - } - ] - }, - "primary_guild": { - "anyOf": [ - { - "$ref": "#/components/schemas/PrimaryGuild" - }, - { - "type": "null" - } - ] - }, - "bot": { - "type": "boolean" - }, - "system": { - "type": "boolean" - }, - "banner": { - "type": "string", - "nullable": true - }, - "accent_color": { - "type": "integer", - "nullable": true - }, - "public_flags": { - "type": "integer" - } - }, - "required": [ - "avatar", - "discriminator", - "id", - "username" - ] - }, - "AvatarDecorationData": { - "type": "object", - "properties": { - "asset": { - "type": "string" - }, - "sku_id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "expires_at": { - "type": "string", - "nullable": true - } - }, - "required": [ - "asset", - "expires_at", - "sku_id" - ] - }, - "Collectibles": { - "type": "object", - "properties": { - "nameplate": { - "anyOf": [ - { - "$ref": "#/components/schemas/NameplateData" - }, - { - "type": "null" - } - ] - } - }, - "required": [ - "nameplate" - ] - }, - "NameplateData": { - "type": "object", - "properties": { - "asset": { - "type": "string" - }, - "sku_id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "label": { - "type": "string" - }, - "palette": { - "type": "string" - }, - "expires_at": { - "type": "integer", - "nullable": true - } - }, - "required": [ - "asset", - "expires_at", - "label", - "palette", - "sku_id" - ] - }, - "DisplayNameStyle": { - "type": "object", - "properties": { - "font_id": { - "type": "integer" - }, - "effect_id": { - "type": "integer" - }, - "colors": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "required": [ - "colors", - "effect_id", - "font_id" - ] - }, - "PrimaryGuild": { - "type": "object", - "properties": { - "identity_enabled": { - "type": "boolean", - "nullable": true - }, - "identity_guild_id": { - "type": "string", - "nullable": true - }, - "tag": { - "type": "string", - "nullable": true - }, - "badge": { - "type": "string", - "nullable": true - } - }, - "required": [ - "badge", - "identity_enabled", - "identity_guild_id", - "tag" - ] - }, "StickerType": { "type": "number", "enum": [ @@ -10634,31 +12039,6 @@ "widget_enabled" ] }, - "ChannelType": { - "type": "number", - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 255 - ] - }, "Recipient": { "type": "object", "properties": { @@ -11128,19 +12508,6 @@ "user_ignored" ] }, - "RelationshipType": { - "type": "number", - "enum": [ - -1, - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ] - }, "ConnectedAccount": { "type": "object", "properties": { @@ -11422,63 +12789,6 @@ "view_nsfw_guilds" ] }, - "CustomStatus": { - "type": "object", - "properties": { - "emoji_id": { - "type": "string" - }, - "emoji_name": { - "type": "string" - }, - "expires_at": { - "type": "integer" - }, - "text": { - "type": "string" - } - } - }, - "FriendSourceFlags": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "mutual_friends": { - "type": "boolean" - }, - "mutual_guilds": { - "type": "boolean" - } - } - }, - "GuildFolder": { - "type": "object", - "properties": { - "color": { - "type": "integer", - "nullable": true - }, - "guild_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "id": { - "type": "integer", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - } - }, - "required": [ - "guild_ids" - ] - }, "SecurityKey": { "type": "object", "properties": { @@ -11799,23 +13109,6 @@ "position" ] }, - "RoleColors": { - "type": "object", - "properties": { - "primary_color": { - "type": "integer" - }, - "secondary_color": { - "type": "integer" - }, - "tertiary_color": { - "type": "integer" - } - }, - "required": [ - "primary_color" - ] - }, "UserGuildSettings": { "type": "object", "properties": { @@ -11918,54 +13211,6 @@ "muted" ] }, - "MuteConfig": { - "type": "object", - "properties": { - "end_time": { - "type": "integer" - }, - "selected_time_window": { - "type": "integer" - } - }, - "required": [ - "end_time", - "selected_time_window" - ] - }, - "ThreadMemberFlags": { - "type": "number", - "enum": [ - 0, - 1, - 2, - 4, - 8 - ] - }, - "ChannelPermissionOverwrite": { - "type": "object", - "properties": { - "allow": { - "type": "string" - }, - "deny": { - "type": "string" - }, - "id": { - "type": "string" - }, - "type": { - "$ref": "#/components/schemas/ChannelPermissionOverwriteType" - } - }, - "required": [ - "allow", - "deny", - "id", - "type" - ] - }, "Invite": { "type": "object", "properties": { @@ -14226,36 +15471,6 @@ 4 ] }, - "ThreadMetadata": { - "type": "object", - "properties": { - "archived": { - "type": "boolean" - }, - "auto_archive_duration": { - "type": "integer" - }, - "archive_timestamp": { - "type": "string" - }, - "locked": { - "type": "boolean" - }, - "invitable": { - "type": "boolean" - }, - "create_timestamp": { - "type": "string" - } - }, - "required": [ - "archive_timestamp", - "archived", - "auto_archive_duration", - "create_timestamp", - "locked" - ] - }, "Ban": { "type": "object", "properties": { @@ -14393,326 +15608,6 @@ "welcome_channels" ] }, - "InstanceUserDeleteSchemaContent": { - "type": "object", - "properties": { - "reason": { - "type": "string" - }, - "persistInstanceBan": { - "type": "boolean" - } - } - }, - "PublicMember": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "guild_id": { - "type": "string" - }, - "nick": { - "type": "string" - }, - "joined_at": { - "type": "string", - "format": "date-time" - }, - "pending": { - "type": "boolean" - }, - "deaf": { - "type": "boolean" - }, - "mute": { - "type": "boolean" - }, - "premium_since": { - "type": "integer" - }, - "avatar": { - "type": "string" - }, - "banner": { - "type": "string" - }, - "bio": { - "type": "string" - }, - "theme_colors": { - "type": "array", - "items": { - "type": "integer" - } - }, - "pronouns": { - "type": "string" - }, - "communication_disabled_until": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ] - }, - "flags": { - "type": "integer" - }, - "user": { - "$ref": "#/components/schemas/PublicUser" - }, - "roles": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "banner", - "bio", - "communication_disabled_until", - "deaf", - "flags", - "guild_id", - "id", - "joined_at", - "mute", - "pending", - "roles", - "user" - ] - }, - "PublicUser": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "premium_since": { - "type": "string", - "format": "date-time" - }, - "avatar": { - "type": "string" - }, - "banner": { - "type": "string" - }, - "bio": { - "type": "string" - }, - "theme_colors": { - "type": "array", - "items": { - "type": "integer" - } - }, - "pronouns": { - "type": "string" - }, - "username": { - "type": "string" - }, - "discriminator": { - "type": "string" - }, - "public_flags": { - "type": "integer" - }, - "accent_color": { - "type": "integer" - }, - "bot": { - "type": "boolean" - }, - "premium_type": { - "type": "integer" - }, - "badge_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "avatar_decoration_data": { - "$ref": "#/components/schemas/AvatarDecorationData" - }, - "display_name_styles": { - "$ref": "#/components/schemas/DisplayNameStyle" - }, - "collectibles": { - "$ref": "#/components/schemas/Collectibles" - }, - "primary_guild": { - "$ref": "#/components/schemas/PrimaryGuild" - } - }, - "required": [ - "bio", - "bot", - "discriminator", - "id", - "premium_since", - "premium_type", - "public_flags", - "username" - ] - }, - "PaymentSource": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "brand": { - "type": "string" - }, - "country": { - "type": "string" - }, - "last_4": { - "type": "string" - }, - "billing_address": { - "$ref": "#/components/schemas/BillingAddress" - }, - "type": { - "$ref": "#/components/schemas/PaymentSourceType" - }, - "payment_gateway": { - "$ref": "#/components/schemas/PaymentGateway" - }, - "payment_gateway_source_id": { - "type": "string" - }, - "default": { - "type": "boolean" - }, - "invalid": { - "type": "boolean" - }, - "flags": { - "$ref": "#/components/schemas/PaymentSourceFlags" - }, - "deleted_at": { - "type": "string", - "nullable": true - }, - "expires_month": { - "type": "integer" - }, - "expires_year": { - "type": "integer" - }, - "email": { - "type": "string" - }, - "bank": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "required": [ - "billing_address", - "default", - "deleted_at", - "flags", - "id", - "invalid", - "payment_gateway", - "type" - ] - }, - "BillingAddress": { - "type": "object", - "properties": { - "line_1": { - "type": "string" - }, - "line_2": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string" - }, - "postal_code": { - "type": "string" - }, - "city": { - "type": "string" - }, - "state": { - "type": "string" - }, - "country": { - "type": "string" - } - }, - "required": [ - "city", - "country", - "line_1", - "name" - ] - }, - "PaymentSourceType": { - "type": "number", - "enum": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19 - ] - }, - "PaymentGateway": { - "type": "number", - "enum": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10 - ] - }, - "PaymentSourceFlags": { - "type": "number", - "enum": [ - 1, - 2 - ] - }, "EmojiGuild": { "type": "object", "properties": { @@ -15139,242 +16034,6 @@ "webhook" ] }, - "PublicChannel": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "type": { - "$ref": "#/components/schemas/ChannelType" - }, - "guild_id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "position": { - "type": "integer" - }, - "permission_overwrites": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ChannelPermissionOverwrite" - } - }, - "name": { - "type": "string", - "nullable": true - }, - "topic": { - "type": "string", - "nullable": true - }, - "nsfw": { - "type": "boolean" - }, - "last_message_id": { - "type": "string", - "nullable": true - }, - "last_pin_timestamp": { - "type": "string", - "nullable": true - }, - "bitrate": { - "type": "integer" - }, - "user_limit": { - "type": "integer" - }, - "rate_limit_per_user": { - "type": "integer" - }, - "recipients": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PartialUser" - } - }, - "recipient_flags": { - "type": "integer" - }, - "icon": { - "type": "string", - "nullable": true - }, - "managed": { - "type": "boolean" - }, - "blocked_user_warning_dismissed": { - "type": "boolean" - }, - "application_id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "owner_id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "owner": { - "anyOf": [ - { - "$ref": "#/components/schemas/PublicMember" - }, - { - "type": "null" - } - ] - }, - "parent_id": { - "type": "string", - "nullable": true - }, - "rtc_region": { - "type": "string", - "nullable": true - }, - "video_quality_mode": { - "type": "integer" - }, - "total_message_sent": { - "type": "integer" - }, - "message_count": { - "type": "integer" - }, - "member_count": { - "type": "integer" - }, - "member_ids_preview": { - "type": "array", - "items": { - "type": "string" - } - }, - "thread_metadata": { - "$ref": "#/components/schemas/ThreadMetadata" - }, - "member": { - "$ref": "#/components/schemas/PublicThreadMember" - }, - "default_auto_archive_duration": { - "type": "integer", - "nullable": true - }, - "default_thread_rate_limit_per_user": { - "type": "integer" - }, - "permissions": { - "type": "string" - }, - "flags": { - "type": "integer" - }, - "available_tags": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Tag" - } - }, - "applied_tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "default_reaction_emoji": { - "type": "string", - "nullable": true - }, - "default_forum_layout": { - "type": "integer" - }, - "default_sort_order": { - "type": "integer", - "nullable": true - }, - "default_tag_setting": { - "type": "string" - }, - "is_message_request": { - "type": "boolean" - }, - "is_message_request_timestamp": { - "type": "string", - "nullable": true - }, - "is_spam": { - "type": "boolean" - }, - "theme_color": { - "type": "integer", - "nullable": true - }, - "status": { - "type": "string", - "nullable": true - }, - "hd_streaming_until": { - "type": "string", - "nullable": true - }, - "hd_streaming_buyer_id": { - "type": "string", - "nullable": true - }, - "is_linkable": { - "type": "boolean" - }, - "is_viewable_and_writeable_by_all_members": { - "type": "boolean" - } - }, - "required": [ - "id", - "type" - ] - }, - "PublicThreadMember": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "user_id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "join_timestamp": { - "type": "string" - }, - "flags": { - "$ref": "#/components/schemas/ThreadMemberFlags" - }, - "muted": { - "type": "boolean" - }, - "mute_config": { - "anyOf": [ - { - "$ref": "#/components/schemas/MuteConfig" - }, - { - "type": "null" - } - ] - }, - "member": { - "$ref": "#/components/schemas/PublicMember" - } - }, - "required": [ - "flags", - "join_timestamp" - ] - }, "MessageActivity": { "type": "object", "properties": { @@ -15578,178 +16237,6 @@ "refreshed" ] }, - "JsonValue": { - "description": "Represents any possible JSON value:\n- number\n- string\n- boolean\n- null\n- object (with any JSON value as property)\n- array (with any JSON value as element)", - "anyOf": [ - { - "description": "Represents a JSON object.", - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/JsonValue" - } - }, - { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]+$": { - "$ref": "#/components/schemas/JsonValue" - } - }, - "properties": { - "length": { - "type": "integer" - }, - "__@unscopables@751": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]+$": { - "type": "boolean" - } - }, - "properties": { - "length": { - "type": "boolean" - }, - "toString": { - "type": "boolean" - }, - "toLocaleString": { - "type": "boolean" - }, - "pop": { - "type": "boolean" - }, - "push": { - "type": "boolean" - }, - "concat": { - "type": "boolean" - }, - "join": { - "type": "boolean" - }, - "reverse": { - "type": "boolean" - }, - "shift": { - "type": "boolean" - }, - "slice": { - "type": "boolean" - }, - "sort": { - "type": "boolean" - }, - "splice": { - "type": "boolean" - }, - "unshift": { - "type": "boolean" - }, - "indexOf": { - "type": "boolean" - }, - "lastIndexOf": { - "type": "boolean" - }, - "every": { - "type": "boolean" - }, - "some": { - "type": "boolean" - }, - "forEach": { - "type": "boolean" - }, - "map": { - "type": "boolean" - }, - "filter": { - "type": "boolean" - }, - "reduce": { - "type": "boolean" - }, - "reduceRight": { - "type": "boolean" - }, - "find": { - "type": "boolean" - }, - "findIndex": { - "type": "boolean" - }, - "fill": { - "type": "boolean" - }, - "copyWithin": { - "type": "boolean" - }, - "entries": { - "type": "boolean" - }, - "keys": { - "type": "boolean" - }, - "values": { - "type": "boolean" - }, - "includes": { - "type": "boolean" - }, - "flatMap": { - "type": "boolean" - }, - "flat": { - "type": "boolean" - }, - "at": { - "type": "boolean" - }, - "findLast": { - "type": "boolean" - }, - "findLastIndex": { - "type": "boolean" - }, - "toReversed": { - "type": "boolean" - }, - "toSorted": { - "type": "boolean" - }, - "toSpliced": { - "type": "boolean" - }, - "with": { - "type": "boolean" - }, - "__@iterator@749": { - "type": "boolean" - }, - "__@unscopables@751": { - "type": "boolean" - } - } - } - }, - "required": [ - "__@unscopables@751", - "length" - ] - }, - { - "type": [ - "null", - "string", - "integer", - "boolean" - ] - } - ] - }, "DmChannelDTO": { "type": "object", "properties": { @@ -16562,6 +17049,46 @@ "locale" ] }, + "ApplicationCommandIndexApplication": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": "string", + "nullable": true + }, + "permissions": {}, + "bot": { + "$ref": "#/components/schemas/PartialUser" + }, + "bot_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "flags": { + "type": "string" + }, + "embedded_activity_config": { + "$ref": "#/components/schemas/Pick%3CEmbeddedActivityConfig%2C%22supported_platforms%22%3E" + } + }, + "required": [ + "description", + "flags", + "icon", + "id", + "name" + ] + }, "AllowlistedUser": { "type": "object", "properties": { @@ -17502,67 +18029,6 @@ "type": "number", "const": 3 }, - "GameActivity": { - "type": "object", - "properties": { - "activity_level": { - "type": "integer" - }, - "activity_score": { - "type": "integer" - } - }, - "required": [ - "activity_level", - "activity_score" - ] - }, - "GuildTrait": { - "type": "object", - "properties": { - "emoji_id": { - "type": "string", - "nullable": true - }, - "emoji_name": { - "type": "string", - "nullable": true - }, - "emoji_animated": { - "type": "boolean" - }, - "label": { - "type": "string" - }, - "position": { - "type": "integer" - } - }, - "required": [ - "emoji_animated", - "emoji_id", - "emoji_name", - "label", - "position" - ] - }, - "GuildVisibilityLevel": { - "type": "number", - "enum": [ - 1, - 2, - 3 - ] - }, - "GuildPremiumTier": { - "type": "number", - "enum": [ - 0, - 1, - 2, - 3 - ] - }, "GifTrendingCategory": { "type": "object", "properties": { @@ -17732,279 +18198,6 @@ "type": "string" } } - }, - "PublicInvite": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "type": { - "$ref": "#/components/schemas/InviteType" - }, - "channel": { - "anyOf": [ - { - "$ref": "#/components/schemas/PublicChannel" - }, - { - "type": "null" - } - ] - }, - "guild_id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "guild": { - "$ref": "#/components/schemas/InviteGuild" - }, - "profile": { - "$ref": "#/components/schemas/GuildProfileResponse" - }, - "inviter": { - "$ref": "#/components/schemas/PartialUser" - }, - "flags": { - "enum": [ - 1, - 2, - 4, - 8 - ], - "type": "number" - }, - "target_type": { - "type": "integer" - }, - "target_user": { - "$ref": "#/components/schemas/PartialUser" - }, - "roles": { - "type": "array", - "items": { - "$ref": "#/components/schemas/InviteRole" - } - }, - "approximate_member_count": { - "type": "integer" - }, - "approximate_presence_count": { - "type": "integer" - }, - "expires_at": { - "type": "string", - "nullable": true - }, - "new_member": { - "type": "boolean" - }, - "show_verification_form": { - "type": "boolean" - }, - "is_nickname_changeable": { - "type": "boolean" - }, - "target_users_job_status": { - "$ref": "#/components/schemas/InviteTargetUsersJob" - } - }, - "required": [ - "channel", - "code", - "expires_at", - "type" - ] - }, - "InviteType": { - "type": "number", - "enum": [ - 0, - 1, - 2 - ] - }, - "InviteGuild": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "name": { - "type": "string" - }, - "icon": { - "type": "string", - "nullable": true - }, - "description": { - "type": "string", - "nullable": true - }, - "banner": { - "type": "string", - "nullable": true - }, - "splash": { - "type": "string", - "nullable": true - }, - "verification_level": { - "$ref": "#/components/schemas/GuildVerificationLevel" - }, - "features": { - "type": "array", - "items": { - "type": "string" - } - }, - "vanity_url_code": { - "type": "string", - "nullable": true - }, - "premium_subscription_count": { - "type": "integer" - }, - "premium_tier": { - "$ref": "#/components/schemas/GuildPremiumTier" - }, - "nsfw": { - "type": "boolean" - }, - "nsfw_level": { - "$ref": "#/components/schemas/GuildNsfwLevel" - } - }, - "required": [ - "banner", - "description", - "features", - "icon", - "id", - "name", - "nsfw", - "nsfw_level", - "premium_tier", - "splash", - "vanity_url_code", - "verification_level" - ] - }, - "GuildVerificationLevel": { - "type": "number", - "enum": [ - 0, - 1, - 2, - 3, - 4 - ] - }, - "GuildNsfwLevel": { - "type": "number", - "enum": [ - 0, - 1, - 2, - 3 - ] - }, - "InviteRole": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "name": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "color": { - "type": "integer" - }, - "colors": { - "$ref": "#/components/schemas/RoleColors" - }, - "icon": { - "type": "string", - "nullable": true - }, - "unicode_emoji": { - "type": "string", - "nullable": true - } - }, - "required": [ - "color", - "colors", - "id", - "name", - "position" - ] - }, - "InviteTargetUsersJob": { - "type": "object", - "properties": { - "status": { - "$ref": "#/components/schemas/InviteTargetUsersJobStatus" - }, - "total_users": { - "type": "integer" - }, - "processed_users": { - "type": "integer" - }, - "created_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ] - }, - "completed_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ] - }, - "error_message": { - "type": "string", - "nullable": true - } - }, - "required": [ - "completed_at", - "created_at", - "error_message", - "processed_users", - "status", - "total_users" - ] - }, - "InviteTargetUsersJobStatus": { - "type": "number", - "enum": [ - 0, - 1, - 2, - 3 - ] - }, - "ErrorList": { - "type": "object" } } }, @@ -27272,8 +27465,15 @@ } ], "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationCommandIndexResponse" + } + } + } } }, "parameters": [ @@ -31576,8 +31776,15 @@ } ], "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationCommandResponse" + } + } + } } }, "parameters": [ @@ -31621,8 +31828,15 @@ } }, "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationCommandResponse" + } + } + } } }, "parameters": [ @@ -31666,8 +31880,15 @@ } }, "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationCommandListResponse" + } + } + } } }, "parameters": [ @@ -31703,8 +31924,15 @@ } ], "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationCommandResponse" + } + } + } } }, "parameters": [ @@ -31757,8 +31985,15 @@ } }, "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationCommandResponse" + } + } + } } }, "parameters": [ @@ -31801,7 +32036,7 @@ } ], "responses": { - "default": { + "204": { "description": "No description available" } }, @@ -32161,8 +32396,15 @@ } ], "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationCommandListResponse" + } + } + } } }, "parameters": [ @@ -32197,8 +32439,15 @@ } }, "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationCommandResponse" + } + } + } } }, "parameters": [ @@ -32233,8 +32482,15 @@ } }, "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationCommandListResponse" + } + } + } } }, "parameters": [ @@ -32261,8 +32517,15 @@ } ], "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationCommandResponse" + } + } + } } }, "parameters": [ @@ -32306,8 +32569,15 @@ } }, "responses": { - "default": { - "description": "No description available" + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplicationCommandResponse" + } + } + } } }, "parameters": [ @@ -32341,7 +32611,7 @@ } ], "responses": { - "default": { + "204": { "description": "No description available" } }, diff --git a/assets/schemas.json b/assets/schemas.json
index 760fed831..c691d7697 100644 --- a/assets/schemas.json +++ b/assets/schemas.json
@@ -107,6 +107,93 @@ ], "type": "number" }, + "name": { + "type": "string" + }, + "name_localizations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "description": { + "type": "string" + }, + "description_localizations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, + "options": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCommandOption" + } + }, + "default_member_permissions": { + "type": [ + "null", + "string" + ] + }, + "dm_permission": { + "type": "boolean" + }, + "permissions": { + "$ref": "#/definitions/ApplicationCommandIndexPermissions" + }, + "nsfw": { + "type": "boolean" + }, + "integration_types": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationIntegrationType" + } + }, + "contexts": { + "type": "array", + "items": { + "$ref": "#/definitions/InteractionContextType" + } + }, + "version": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "handler": { + "enum": [ + 1, + 2, + 3 + ], + "type": "number" + } + }, + "additionalProperties": false, + "required": [ + "default_member_permissions", + "description", + "name", + "version" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ApplicationCommandListResponse": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCommandResponse" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ApplicationCommandResponse": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, "application_id": { "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", "type": "string" @@ -115,6 +202,30 @@ "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", "type": "string" }, + "name_localized": { + "type": [ + "null", + "string" + ] + }, + "description_localized": { + "type": [ + "null", + "string" + ] + }, + "global_popularity_rank": { + "type": "integer" + }, + "type": { + "enum": [ + 1, + 2, + 3, + 4 + ], + "type": "number" + }, "name": { "type": "string" }, @@ -124,12 +235,6 @@ "type": "string" } }, - "name_localized": { - "type": [ - "null", - "string" - ] - }, "description": { "type": "string" }, @@ -139,12 +244,6 @@ "type": "string" } }, - "description_localized": { - "type": [ - "null", - "string" - ] - }, "options": { "type": "array", "items": { @@ -172,9 +271,6 @@ "$ref": "#/definitions/ApplicationIntegrationType" } }, - "global_popularity_rank": { - "type": "integer" - }, "contexts": { "type": "array", "items": { @@ -199,6 +295,7 @@ "application_id", "default_member_permissions", "description", + "id", "name", "version" ], @@ -265,6 +362,961 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, + "JsonArray": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/JsonValue" + } + }, + "properties": { + "length": { + "type": "integer" + }, + "__@unscopables@751": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "type": "boolean" + } + }, + "properties": { + "length": { + "type": "boolean" + }, + "toString": { + "type": "boolean" + }, + "toLocaleString": { + "type": "boolean" + }, + "pop": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "concat": { + "type": "boolean" + }, + "join": { + "type": "boolean" + }, + "reverse": { + "type": "boolean" + }, + "shift": { + "type": "boolean" + }, + "slice": { + "type": "boolean" + }, + "sort": { + "type": "boolean" + }, + "splice": { + "type": "boolean" + }, + "unshift": { + "type": "boolean" + }, + "indexOf": { + "type": "boolean" + }, + "lastIndexOf": { + "type": "boolean" + }, + "every": { + "type": "boolean" + }, + "some": { + "type": "boolean" + }, + "forEach": { + "type": "boolean" + }, + "map": { + "type": "boolean" + }, + "filter": { + "type": "boolean" + }, + "reduce": { + "type": "boolean" + }, + "reduceRight": { + "type": "boolean" + }, + "find": { + "type": "boolean" + }, + "findIndex": { + "type": "boolean" + }, + "fill": { + "type": "boolean" + }, + "copyWithin": { + "type": "boolean" + }, + "entries": { + "type": "boolean" + }, + "keys": { + "type": "boolean" + }, + "values": { + "type": "boolean" + }, + "includes": { + "type": "boolean" + }, + "flatMap": { + "type": "boolean" + }, + "flat": { + "type": "boolean" + }, + "at": { + "type": "boolean" + }, + "findLast": { + "type": "boolean" + }, + "findLastIndex": { + "type": "boolean" + }, + "toReversed": { + "type": "boolean" + }, + "toSorted": { + "type": "boolean" + }, + "toSpliced": { + "type": "boolean" + }, + "with": { + "type": "boolean" + }, + "__@iterator@749": { + "type": "boolean" + }, + "__@unscopables@751": { + "type": "boolean" + } + } + } + }, + "required": [ + "__@unscopables@751", + "length" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "InstanceUserDeleteSchema": { + "$ref": "#/definitions/InstanceUserDeleteSchemaContent", + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PublicMemberListResponse": { + "type": "array", + "items": { + "$ref": "#/definitions/PublicMember" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PaymentSourceListResponse": { + "type": "array", + "items": { + "$ref": "#/definitions/PaymentSource" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PartialRelationshipSchema": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "type": { + "$ref": "#/definitions/RelationshipType" + }, + "nickname": { + "type": [ + "null", + "string" + ] + }, + "since": { + "type": "string", + "format": "date-time" + }, + "stranger_request": { + "type": "boolean" + }, + "user_ignored": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "id", + "nickname", + "type", + "user_ignored" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "RelationshipListSchema": { + "type": "array", + "items": { + "$ref": "#/definitions/RelationshipSchema" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "RelationshipSchema": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "type": { + "$ref": "#/definitions/RelationshipType" + }, + "user": { + "$ref": "#/definitions/PartialUser" + }, + "nickname": { + "type": [ + "null", + "string" + ] + }, + "is_spam_request": { + "type": "boolean" + }, + "stranger_request": { + "type": "boolean" + }, + "user_ignored": { + "type": "boolean" + }, + "origin_application_id": { + "type": [ + "null", + "string" + ] + }, + "since": { + "type": "string", + "format": "date-time" + }, + "has_played_game": { + "type": "boolean" + }, + "note": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "id", + "nickname", + "type", + "user", + "user_ignored" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SendRelationshipRequestSchema": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "discriminator": { + "type": [ + "null", + "string" + ] + }, + "note": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "discriminator", + "username" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "RelationshipCreateSchema": { + "type": "object", + "properties": { + "type": { + "enum": [ + -1, + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "type": "number" + }, + "from_friend_suggestion": { + "type": "boolean" + }, + "confirm_stranger_request": { + "type": "boolean" + }, + "note": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "RelationshipModifySchema": { + "type": "object", + "properties": { + "nickname": { + "type": "string" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UserMutualRelationResponse": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "avatar": { + "type": "string" + }, + "public_flags": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "discriminator", + "id", + "public_flags", + "username" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UserMutualRelationsResponse": { + "type": "array", + "items": { + "$ref": "#/definitions/UserMutualRelationResponse" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SessionsLogoutSchema": { + "type": "object", + "properties": { + "session_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "session_id_hashes": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GetSessionsResponse": { + "type": "object", + "properties": { + "user_sessions": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "id_hash": { + "type": "string" + }, + "status": { + "type": "string" + }, + "activities": { + "type": "array", + "items": { + "type": "array", + "items": { + "$ref": "#/definitions/Activity" + } + } + }, + "client_status": { + "$ref": "#/definitions/ClientStatus" + }, + "approx_last_used_time": { + "type": "string" + }, + "client_info": { + "type": "object", + "properties": { + "client": { + "type": "string" + }, + "os": { + "type": "string" + }, + "version": { + "type": "integer" + }, + "location": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "client", + "location", + "os", + "version" + ] + }, + "last_seen": { + "type": "string", + "format": "date-time" + }, + "last_seen_ip": { + "type": "string" + }, + "last_seen_location": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "activities", + "approx_last_used_time", + "client_info", + "client_status", + "id", + "id_hash", + "status" + ] + } + } + }, + "additionalProperties": false, + "required": [ + "user_sessions" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UserAccountModifySchema": { + "type": "object", + "properties": { + "global_name": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UserProfileModifySchema": { + "type": "object", + "properties": { + "pronouns": { + "type": [ + "null", + "string" + ] + }, + "bio": { + "type": [ + "null", + "string" + ] + }, + "banner": { + "type": [ + "null", + "string" + ] + }, + "accent_color": { + "type": "integer" + }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "popout_animation_particle_type": { + "type": [ + "null", + "string" + ] + }, + "emoji_id": { + "type": [ + "null", + "string" + ] + }, + "profile_effect_id": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UserSettingsUpdateSchema": { + "type": "object", + "properties": { + "activity_restricted_guild_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "activity_joining_restricted_guild_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "afk_timeout": { + "type": "integer" + }, + "allow_accessibility_detection": { + "type": "boolean" + }, + "allow_activity_party_privacy_friends": { + "type": "boolean" + }, + "allow_activity_party_privacy_voice_channel": { + "type": "boolean" + }, + "animate_emoji": { + "type": "boolean" + }, + "animate_stickers": { + "type": "integer" + }, + "contact_sync_enabled": { + "type": "boolean" + }, + "convert_emoticons": { + "type": "boolean" + }, + "custom_status": { + "anyOf": [ + { + "$ref": "#/definitions/CustomStatus" + }, + { + "type": "null" + } + ] + }, + "default_guilds_restricted": { + "type": "boolean" + }, + "detect_platform_accounts": { + "type": "boolean" + }, + "developer_mode": { + "type": "boolean" + }, + "disable_games_tab": { + "type": "boolean" + }, + "enable_tts_command": { + "type": "boolean" + }, + "explicit_content_filter": { + "type": "integer" + }, + "friend_discovery_flags": { + "type": "integer" + }, + "friend_source_flags": { + "anyOf": [ + { + "$ref": "#/definitions/FriendSourceFlags" + }, + { + "type": "null" + } + ] + }, + "gif_auto_play": { + "type": "boolean" + }, + "guild_folders": { + "type": "array", + "items": { + "$ref": "#/definitions/GuildFolder" + } + }, + "inline_attachment_media": { + "type": "boolean" + }, + "inline_embed_media": { + "type": "boolean" + }, + "locale": { + "type": "string" + }, + "message_display_compact": { + "type": "boolean" + }, + "native_phone_integration_enabled": { + "type": "boolean" + }, + "passwordless": { + "type": "boolean" + }, + "render_embeds": { + "type": "boolean" + }, + "render_reactions": { + "type": "boolean" + }, + "restricted_guilds": { + "type": "array", + "items": { + "type": "string" + } + }, + "show_current_game": { + "type": "boolean" + }, + "slayer_sdk_receive_dms_in_game": { + "type": "integer" + }, + "soundboard_volume": { + "type": "integer" + }, + "status": { + "enum": [ + "dnd", + "idle", + "invisible", + "offline", + "online" + ], + "type": "string" + }, + "stream_notifications_enabled": { + "type": "boolean" + }, + "theme": { + "enum": [ + "dark", + "darker", + "light", + "midnight" + ], + "type": "string" + }, + "timezone_offset": { + "type": "integer" + }, + "view_nsfw_commands": { + "type": "boolean" + }, + "view_nsfw_guilds": { + "type": "boolean" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "UserSettingsSchema": { + "type": "object", + "properties": { + "activity_restricted_guild_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "activity_joining_restricted_guild_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "afk_timeout": { + "type": "integer" + }, + "allow_accessibility_detection": { + "type": "boolean" + }, + "allow_activity_party_privacy_friends": { + "type": "boolean" + }, + "allow_activity_party_privacy_voice_channel": { + "type": "boolean" + }, + "animate_emoji": { + "type": "boolean" + }, + "animate_stickers": { + "type": "integer" + }, + "contact_sync_enabled": { + "type": "boolean" + }, + "convert_emoticons": { + "type": "boolean" + }, + "custom_status": { + "anyOf": [ + { + "$ref": "#/definitions/CustomStatus" + }, + { + "type": "null" + } + ] + }, + "default_guilds_restricted": { + "type": "boolean" + }, + "detect_platform_accounts": { + "type": "boolean" + }, + "developer_mode": { + "type": "boolean" + }, + "disable_games_tab": { + "type": "boolean" + }, + "enable_tts_command": { + "type": "boolean" + }, + "explicit_content_filter": { + "type": "integer" + }, + "friend_discovery_flags": { + "type": "integer" + }, + "friend_source_flags": { + "anyOf": [ + { + "$ref": "#/definitions/FriendSourceFlags" + }, + { + "type": "null" + } + ] + }, + "gif_auto_play": { + "type": "boolean" + }, + "guild_folders": { + "type": "array", + "items": { + "$ref": "#/definitions/GuildFolder" + } + }, + "inline_attachment_media": { + "type": "boolean" + }, + "inline_embed_media": { + "type": "boolean" + }, + "locale": { + "type": "string" + }, + "message_display_compact": { + "type": "boolean" + }, + "native_phone_integration_enabled": { + "type": "boolean" + }, + "passwordless": { + "type": "boolean" + }, + "render_embeds": { + "type": "boolean" + }, + "render_reactions": { + "type": "boolean" + }, + "restricted_guilds": { + "type": "array", + "items": { + "type": "string" + } + }, + "show_current_game": { + "type": "boolean" + }, + "slayer_sdk_receive_dms_in_game": { + "type": "integer" + }, + "soundboard_volume": { + "type": "integer" + }, + "status": { + "enum": [ + "dnd", + "idle", + "invisible", + "offline", + "online" + ], + "type": "string" + }, + "stream_notifications_enabled": { + "type": "boolean" + }, + "theme": { + "enum": [ + "dark", + "darker", + "light", + "midnight" + ], + "type": "string" + }, + "timezone_offset": { + "type": "integer" + }, + "view_nsfw_commands": { + "type": "boolean" + }, + "view_nsfw_guilds": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "activity_joining_restricted_guild_ids", + "activity_restricted_guild_ids", + "afk_timeout", + "allow_accessibility_detection", + "allow_activity_party_privacy_friends", + "allow_activity_party_privacy_voice_channel", + "animate_emoji", + "animate_stickers", + "contact_sync_enabled", + "convert_emoticons", + "custom_status", + "default_guilds_restricted", + "detect_platform_accounts", + "developer_mode", + "disable_games_tab", + "enable_tts_command", + "explicit_content_filter", + "friend_discovery_flags", + "friend_source_flags", + "gif_auto_play", + "guild_folders", + "inline_attachment_media", + "inline_embed_media", + "locale", + "message_display_compact", + "native_phone_integration_enabled", + "passwordless", + "render_embeds", + "render_reactions", + "restricted_guilds", + "show_current_game", + "slayer_sdk_receive_dms_in_game", + "soundboard_volume", + "status", + "stream_notifications_enabled", + "theme", + "timezone_offset", + "view_nsfw_commands", + "view_nsfw_guilds" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildAvailableSchema": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "available": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "available", + "id" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "InviteListResponse": { + "type": "array", + "items": { + "$ref": "#/definitions/PublicInvite" + }, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "FieldErrorResponse": { + "type": "object", + "properties": { + "code": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "errors": { + "$ref": "#/definitions/ErrorList" + } + }, + "additionalProperties": false, + "required": [ + "code", + "errors", + "message" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, "ActivitySchema": { "type": "object", "properties": { @@ -1630,762 +2682,43 @@ "guild", "joined" ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "InstanceUserDeleteSchema": { - "$ref": "#/definitions/InstanceUserDeleteSchemaContent", - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "PublicMemberListResponse": { - "type": "array", - "items": { - "$ref": "#/definitions/PublicMember" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "PaymentSourceListResponse": { - "type": "array", - "items": { - "$ref": "#/definitions/PaymentSource" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "PartialRelationshipSchema": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "type": { - "$ref": "#/definitions/RelationshipType" - }, - "nickname": { - "type": [ - "null", - "string" - ] - }, - "since": { - "type": "string", - "format": "date-time" - }, - "stranger_request": { - "type": "boolean" - }, - "user_ignored": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "id", - "nickname", - "type", - "user_ignored" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "RelationshipListSchema": { - "type": "array", - "items": { - "$ref": "#/definitions/RelationshipSchema" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "RelationshipSchema": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "type": { - "$ref": "#/definitions/RelationshipType" - }, - "user": { - "$ref": "#/definitions/PartialUser" - }, - "nickname": { - "type": [ - "null", - "string" - ] - }, - "is_spam_request": { - "type": "boolean" - }, - "stranger_request": { - "type": "boolean" - }, - "user_ignored": { - "type": "boolean" - }, - "origin_application_id": { - "type": [ - "null", - "string" - ] - }, - "since": { - "type": "string", - "format": "date-time" - }, - "has_played_game": { - "type": "boolean" - }, - "note": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "id", - "nickname", - "type", - "user", - "user_ignored" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "SendRelationshipRequestSchema": { - "type": "object", - "properties": { - "username": { - "type": "string" - }, - "discriminator": { - "type": [ - "null", - "string" - ] - }, - "note": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "required": [ - "discriminator", - "username" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "RelationshipCreateSchema": { - "type": "object", - "properties": { - "type": { - "enum": [ - -1, - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "type": "number" - }, - "from_friend_suggestion": { - "type": "boolean" - }, - "confirm_stranger_request": { - "type": "boolean" - }, - "note": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "RelationshipModifySchema": { - "type": "object", - "properties": { - "nickname": { - "type": "string" - } - }, - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "UserMutualRelationResponse": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "username": { - "type": "string" - }, - "discriminator": { - "type": "string" - }, - "avatar": { - "type": "string" - }, - "public_flags": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "discriminator", - "id", - "public_flags", - "username" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "UserMutualRelationsResponse": { - "type": "array", - "items": { - "$ref": "#/definitions/UserMutualRelationResponse" - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "SessionsLogoutSchema": { - "type": "object", - "properties": { - "session_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "session_id_hashes": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "GetSessionsResponse": { - "type": "object", - "properties": { - "user_sessions": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "id_hash": { - "type": "string" - }, - "status": { - "type": "string" - }, - "activities": { - "type": "array", - "items": { - "type": "array", - "items": { - "$ref": "#/definitions/Activity" - } - } - }, - "client_status": { - "$ref": "#/definitions/ClientStatus" - }, - "approx_last_used_time": { - "type": "string" - }, - "client_info": { - "type": "object", - "properties": { - "client": { - "type": "string" - }, - "os": { - "type": "string" - }, - "version": { - "type": "integer" - }, - "location": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "client", - "location", - "os", - "version" - ] - }, - "last_seen": { - "type": "string", - "format": "date-time" - }, - "last_seen_ip": { - "type": "string" - }, - "last_seen_location": { - "type": "string" - } + "definitions": { + "Tag": { + "type": "object", + "properties": { + "channel_id": { + "type": "string" }, - "additionalProperties": false, - "required": [ - "activities", - "approx_last_used_time", - "client_info", - "client_status", - "id", - "id_hash", - "status" - ] - } - } - }, - "additionalProperties": false, - "required": [ - "user_sessions" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "UserAccountModifySchema": { - "type": "object", - "properties": { - "global_name": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "UserProfileModifySchema": { - "type": "object", - "properties": { - "pronouns": { - "type": [ - "null", - "string" - ] - }, - "bio": { - "type": [ - "null", - "string" - ] - }, - "banner": { - "type": [ - "null", - "string" - ] - }, - "accent_color": { - "type": "integer" - }, - "theme_colors": { - "type": "array", - "items": { - "type": "integer" - } - }, - "popout_animation_particle_type": { - "type": [ - "null", - "string" - ] - }, - "emoji_id": { - "type": [ - "null", - "string" - ] - }, - "profile_effect_id": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "UserSettingsUpdateSchema": { - "type": "object", - "properties": { - "activity_restricted_guild_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "activity_joining_restricted_guild_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "afk_timeout": { - "type": "integer" - }, - "allow_accessibility_detection": { - "type": "boolean" - }, - "allow_activity_party_privacy_friends": { - "type": "boolean" - }, - "allow_activity_party_privacy_voice_channel": { - "type": "boolean" - }, - "animate_emoji": { - "type": "boolean" - }, - "animate_stickers": { - "type": "integer" - }, - "contact_sync_enabled": { - "type": "boolean" - }, - "convert_emoticons": { - "type": "boolean" - }, - "custom_status": { - "anyOf": [ - { - "$ref": "#/definitions/CustomStatus" + "channel": { + "$ref": "#/definitions/Channel" }, - { - "type": "null" - } - ] - }, - "default_guilds_restricted": { - "type": "boolean" - }, - "detect_platform_accounts": { - "type": "boolean" - }, - "developer_mode": { - "type": "boolean" - }, - "disable_games_tab": { - "type": "boolean" - }, - "enable_tts_command": { - "type": "boolean" - }, - "explicit_content_filter": { - "type": "integer" - }, - "friend_discovery_flags": { - "type": "integer" - }, - "friend_source_flags": { - "anyOf": [ - { - "$ref": "#/definitions/FriendSourceFlags" + "name": { + "type": "string" }, - { - "type": "null" - } - ] - }, - "gif_auto_play": { - "type": "boolean" - }, - "guild_folders": { - "type": "array", - "items": { - "$ref": "#/definitions/GuildFolder" - } - }, - "inline_attachment_media": { - "type": "boolean" - }, - "inline_embed_media": { - "type": "boolean" - }, - "locale": { - "type": "string" - }, - "message_display_compact": { - "type": "boolean" - }, - "native_phone_integration_enabled": { - "type": "boolean" - }, - "passwordless": { - "type": "boolean" - }, - "render_embeds": { - "type": "boolean" - }, - "render_reactions": { - "type": "boolean" - }, - "restricted_guilds": { - "type": "array", - "items": { - "type": "string" - } - }, - "show_current_game": { - "type": "boolean" - }, - "slayer_sdk_receive_dms_in_game": { - "type": "integer" - }, - "soundboard_volume": { - "type": "integer" - }, - "status": { - "enum": [ - "dnd", - "idle", - "invisible", - "offline", - "online" - ], - "type": "string" - }, - "stream_notifications_enabled": { - "type": "boolean" - }, - "theme": { - "enum": [ - "dark", - "darker", - "light", - "midnight" - ], - "type": "string" - }, - "timezone_offset": { - "type": "integer" - }, - "view_nsfw_commands": { - "type": "boolean" - }, - "view_nsfw_guilds": { - "type": "boolean" - } - }, - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "UserSettingsSchema": { - "type": "object", - "properties": { - "activity_restricted_guild_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "activity_joining_restricted_guild_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "afk_timeout": { - "type": "integer" - }, - "allow_accessibility_detection": { - "type": "boolean" - }, - "allow_activity_party_privacy_friends": { - "type": "boolean" - }, - "allow_activity_party_privacy_voice_channel": { - "type": "boolean" - }, - "animate_emoji": { - "type": "boolean" - }, - "animate_stickers": { - "type": "integer" - }, - "contact_sync_enabled": { - "type": "boolean" - }, - "convert_emoticons": { - "type": "boolean" - }, - "custom_status": { - "anyOf": [ - { - "$ref": "#/definitions/CustomStatus" + "moderated": { + "type": "boolean", + "default": false }, - { - "type": "null" - } - ] - }, - "default_guilds_restricted": { - "type": "boolean" - }, - "detect_platform_accounts": { - "type": "boolean" - }, - "developer_mode": { - "type": "boolean" - }, - "disable_games_tab": { - "type": "boolean" - }, - "enable_tts_command": { - "type": "boolean" - }, - "explicit_content_filter": { - "type": "integer" - }, - "friend_discovery_flags": { - "type": "integer" - }, - "friend_source_flags": { - "anyOf": [ - { - "$ref": "#/definitions/FriendSourceFlags" + "emoji_id": { + "type": "string" }, - { - "type": "null" + "emoji_name": { + "type": "string" + }, + "id": { + "type": "string" } + }, + "additionalProperties": false, + "required": [ + "channel", + "channel_id", + "id", + "moderated", + "name" ] - }, - "gif_auto_play": { - "type": "boolean" - }, - "guild_folders": { - "type": "array", - "items": { - "$ref": "#/definitions/GuildFolder" - } - }, - "inline_attachment_media": { - "type": "boolean" - }, - "inline_embed_media": { - "type": "boolean" - }, - "locale": { - "type": "string" - }, - "message_display_compact": { - "type": "boolean" - }, - "native_phone_integration_enabled": { - "type": "boolean" - }, - "passwordless": { - "type": "boolean" - }, - "render_embeds": { - "type": "boolean" - }, - "render_reactions": { - "type": "boolean" - }, - "restricted_guilds": { - "type": "array", - "items": { - "type": "string" - } - }, - "show_current_game": { - "type": "boolean" - }, - "slayer_sdk_receive_dms_in_game": { - "type": "integer" - }, - "soundboard_volume": { - "type": "integer" - }, - "status": { - "enum": [ - "dnd", - "idle", - "invisible", - "offline", - "online" - ], - "type": "string" - }, - "stream_notifications_enabled": { - "type": "boolean" - }, - "theme": { - "enum": [ - "dark", - "darker", - "light", - "midnight" - ], - "type": "string" - }, - "timezone_offset": { - "type": "integer" - }, - "view_nsfw_commands": { - "type": "boolean" - }, - "view_nsfw_guilds": { - "type": "boolean" } }, - "additionalProperties": false, - "required": [ - "activity_joining_restricted_guild_ids", - "activity_restricted_guild_ids", - "afk_timeout", - "allow_accessibility_detection", - "allow_activity_party_privacy_friends", - "allow_activity_party_privacy_voice_channel", - "animate_emoji", - "animate_stickers", - "contact_sync_enabled", - "convert_emoticons", - "custom_status", - "default_guilds_restricted", - "detect_platform_accounts", - "developer_mode", - "disable_games_tab", - "enable_tts_command", - "explicit_content_filter", - "friend_discovery_flags", - "friend_source_flags", - "gif_auto_play", - "guild_folders", - "inline_attachment_media", - "inline_embed_media", - "locale", - "message_display_compact", - "native_phone_integration_enabled", - "passwordless", - "render_embeds", - "render_reactions", - "restricted_guilds", - "show_current_game", - "slayer_sdk_receive_dms_in_game", - "soundboard_volume", - "status", - "stream_notifications_enabled", - "theme", - "timezone_offset", - "view_nsfw_commands", - "view_nsfw_guilds" - ], "$schema": "http://json-schema.org/draft-07/schema#" }, "EmojisResponse": { @@ -2678,6 +3011,12 @@ "region": { "type": "string" }, + "banner": { + "type": [ + "null", + "string" + ] + }, "icon": { "type": [ "null", @@ -2696,12 +3035,6 @@ "staff_only": { "type": "boolean" }, - "banner": { - "type": [ - "null", - "string" - ] - }, "splash": { "type": [ "null", @@ -2920,6 +3253,43 @@ "load_id", "recommended_guilds" ], + "definitions": { + "Tag": { + "type": "object", + "properties": { + "channel_id": { + "type": "string" + }, + "channel": { + "$ref": "#/definitions/Channel" + }, + "name": { + "type": "string" + }, + "moderated": { + "type": "boolean", + "default": false + }, + "emoji_id": { + "type": "string" + }, + "emoji_name": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "channel", + "channel_id", + "id", + "moderated", + "name" + ] + } + }, "$schema": "http://json-schema.org/draft-07/schema#" }, "GuildVanityUrlResponse": { @@ -3065,6 +3435,43 @@ "items": { "$ref": "#/definitions/HubDirectoryEntry" }, + "definitions": { + "Tag": { + "type": "object", + "properties": { + "channel_id": { + "type": "string" + }, + "channel": { + "$ref": "#/definitions/Channel" + }, + "name": { + "type": "string" + }, + "moderated": { + "type": "boolean", + "default": false + }, + "emoji_id": { + "type": "string" + }, + "emoji_name": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "channel", + "channel_id", + "id", + "moderated", + "name" + ] + } + }, "$schema": "http://json-schema.org/draft-07/schema#" }, "HubWaitlistSignupResponse": { @@ -3350,41 +3757,6 @@ "$ref": "#/definitions/PublicMessage" }, "definitions": { - "Tag": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "name": { - "type": "string" - }, - "moderated": { - "type": "boolean" - }, - "emoji_id": { - "type": [ - "null", - "string" - ] - }, - "emoji_name": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "required": [ - "emoji_id", - "emoji_name", - "id", - "moderated", - "name" - ] - }, "Channel": { "type": "object", "properties": { @@ -3589,159 +3961,6 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "JsonArray": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]+$": { - "$ref": "#/definitions/JsonValue" - } - }, - "properties": { - "length": { - "type": "integer" - }, - "__@unscopables@751": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]+$": { - "type": "boolean" - } - }, - "properties": { - "length": { - "type": "boolean" - }, - "toString": { - "type": "boolean" - }, - "toLocaleString": { - "type": "boolean" - }, - "pop": { - "type": "boolean" - }, - "push": { - "type": "boolean" - }, - "concat": { - "type": "boolean" - }, - "join": { - "type": "boolean" - }, - "reverse": { - "type": "boolean" - }, - "shift": { - "type": "boolean" - }, - "slice": { - "type": "boolean" - }, - "sort": { - "type": "boolean" - }, - "splice": { - "type": "boolean" - }, - "unshift": { - "type": "boolean" - }, - "indexOf": { - "type": "boolean" - }, - "lastIndexOf": { - "type": "boolean" - }, - "every": { - "type": "boolean" - }, - "some": { - "type": "boolean" - }, - "forEach": { - "type": "boolean" - }, - "map": { - "type": "boolean" - }, - "filter": { - "type": "boolean" - }, - "reduce": { - "type": "boolean" - }, - "reduceRight": { - "type": "boolean" - }, - "find": { - "type": "boolean" - }, - "findIndex": { - "type": "boolean" - }, - "fill": { - "type": "boolean" - }, - "copyWithin": { - "type": "boolean" - }, - "entries": { - "type": "boolean" - }, - "keys": { - "type": "boolean" - }, - "values": { - "type": "boolean" - }, - "includes": { - "type": "boolean" - }, - "flatMap": { - "type": "boolean" - }, - "flat": { - "type": "boolean" - }, - "at": { - "type": "boolean" - }, - "findLast": { - "type": "boolean" - }, - "findLastIndex": { - "type": "boolean" - }, - "toReversed": { - "type": "boolean" - }, - "toSorted": { - "type": "boolean" - }, - "toSpliced": { - "type": "boolean" - }, - "with": { - "type": "boolean" - }, - "__@iterator@749": { - "type": "boolean" - }, - "__@unscopables@751": { - "type": "boolean" - } - } - } - }, - "required": [ - "__@unscopables@751", - "length" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "SettingsProtoResponse": { "type": "object", "properties": { @@ -3904,6 +4123,15 @@ "type": "object", "additionalProperties": false }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/Role" + } + }, + "banner": { + "type": "string" + }, "channels": { "type": "array", "items": { @@ -3931,15 +4159,6 @@ "string" ] }, - "roles": { - "type": "array", - "items": { - "$ref": "#/definitions/Role" - } - }, - "banner": { - "type": "string" - }, "splash": { "type": "string" }, @@ -4153,6 +4372,43 @@ "welcome_screen", "widget_enabled" ], + "definitions": { + "Tag": { + "type": "object", + "properties": { + "channel_id": { + "type": "string" + }, + "channel": { + "$ref": "#/definitions/Channel" + }, + "name": { + "type": "string" + }, + "moderated": { + "type": "boolean", + "default": false + }, + "emoji_id": { + "type": "string" + }, + "emoji_name": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "channel", + "channel_id", + "id", + "moderated", + "name" + ] + } + }, "$schema": "http://json-schema.org/draft-07/schema#" }, "APIGuildArray": { @@ -4160,6 +4416,43 @@ "items": { "$ref": "#/definitions/APIGuild" }, + "definitions": { + "Tag": { + "type": "object", + "properties": { + "channel_id": { + "type": "string" + }, + "channel": { + "$ref": "#/definitions/Channel" + }, + "name": { + "type": "string" + }, + "moderated": { + "type": "boolean", + "default": false + }, + "emoji_id": { + "type": "string" + }, + "emoji_name": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "channel", + "channel_id", + "id", + "moderated", + "name" + ] + } + }, "$schema": "http://json-schema.org/draft-07/schema#" }, "APIDMChannelArray": { @@ -4312,6 +4605,43 @@ "items": { "$ref": "#/definitions/Application" }, + "definitions": { + "Tag": { + "type": "object", + "properties": { + "channel_id": { + "type": "string" + }, + "channel": { + "$ref": "#/definitions/Channel" + }, + "name": { + "type": "string" + }, + "moderated": { + "type": "boolean", + "default": false + }, + "emoji_id": { + "type": "string" + }, + "emoji_name": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "channel", + "channel_id", + "id", + "moderated", + "name" + ] + } + }, "$schema": "http://json-schema.org/draft-07/schema#" }, "APIDiscoveryCategoryArray": { @@ -4326,6 +4656,43 @@ "items": { "$ref": "#/definitions/Channel" }, + "definitions": { + "Tag": { + "type": "object", + "properties": { + "channel_id": { + "type": "string" + }, + "channel": { + "$ref": "#/definitions/Channel" + }, + "name": { + "type": "string" + }, + "moderated": { + "type": "boolean", + "default": false + }, + "emoji_id": { + "type": "string" + }, + "emoji_name": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "channel", + "channel_id", + "id", + "moderated", + "name" + ] + } + }, "$schema": "http://json-schema.org/draft-07/schema#" }, "APIGuildWithJoinedAt": { @@ -4391,6 +4758,12 @@ "region": { "type": "string" }, + "banner": { + "type": [ + "null", + "string" + ] + }, "icon": { "type": [ "null", @@ -4409,12 +4782,6 @@ "staff_only": { "type": "boolean" }, - "banner": { - "type": [ - "null", - "string" - ] - }, "splash": { "type": [ "null", @@ -4483,6 +4850,43 @@ "items": { "$ref": "#/definitions/Template" }, + "definitions": { + "Tag": { + "type": "object", + "properties": { + "channel_id": { + "type": "string" + }, + "channel": { + "$ref": "#/definitions/Channel" + }, + "name": { + "type": "string" + }, + "moderated": { + "type": "boolean", + "default": false + }, + "emoji_id": { + "type": "string" + }, + "emoji_name": { + "type": "string" + }, + "id": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "channel", + "channel_id", + "id", + "moderated", + "name" + ] + } + }, "$schema": "http://json-schema.org/draft-07/schema#" }, "APIGeneralConfiguration": { @@ -6863,15 +7267,15 @@ "id": { "type": "string" }, + "flags": { + "type": "integer" + }, "icon": { "type": [ "null", "string" ] }, - "flags": { - "type": "integer" - }, "nsfw": { "type": "boolean" }, @@ -6966,41 +7370,6 @@ "$ref": "#/definitions/PublicMessage" }, "definitions": { - "Tag": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "name": { - "type": "string" - }, - "moderated": { - "type": "boolean" - }, - "emoji_id": { - "type": [ - "null", - "string" - ] - }, - "emoji_name": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "required": [ - "emoji_id", - "emoji_name", - "id", - "moderated", - "name" - ] - }, "Channel": { "type": "object", "properties": { @@ -7344,41 +7713,6 @@ "version" ], "definitions": { - "Tag": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "name": { - "type": "string" - }, - "moderated": { - "type": "boolean" - }, - "emoji_id": { - "type": [ - "null", - "string" - ] - }, - "emoji_name": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "required": [ - "emoji_id", - "emoji_name", - "id", - "moderated", - "name" - ] - }, "Channel": { "type": "object", "properties": { @@ -7567,6 +7901,34 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, + "ApplicationCommandIndexResponse": { + "type": "object", + "properties": { + "applications": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCommandIndexApplication" + } + }, + "application_commands": { + "type": "array", + "items": { + "$ref": "#/definitions/ApplicationCommandResponse" + } + }, + "version": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "application_commands", + "applications", + "version" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, "ApplicationAllowlistResponse": { "type": "array", "items": { @@ -7979,43 +8341,6 @@ "users", "webhooks" ], - "definitions": { - "Tag": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "name": { - "type": "string" - }, - "moderated": { - "type": "boolean" - }, - "emoji_id": { - "type": [ - "null", - "string" - ] - }, - "emoji_name": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "required": [ - "emoji_id", - "emoji_name", - "id", - "moderated", - "name" - ] - } - }, "$schema": "http://json-schema.org/draft-07/schema#" }, "BaseAutomodRuleSchema": { @@ -8240,24 +8565,6 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "GuildAvailableSchema": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "available": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "available", - "id" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "RoleResponse": { "type": "object", "properties": { @@ -9444,71 +9751,6 @@ }, "$schema": "http://json-schema.org/draft-07/schema#" }, - "InviteListResponse": { - "type": "array", - "items": { - "$ref": "#/definitions/PublicInvite" - }, - "definitions": { - "Tag": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "name": { - "type": "string" - }, - "moderated": { - "type": "boolean" - }, - "emoji_id": { - "type": [ - "null", - "string" - ] - }, - "emoji_name": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "required": [ - "emoji_id", - "emoji_name", - "id", - "moderated", - "name" - ] - } - }, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "FieldErrorResponse": { - "type": "object", - "properties": { - "code": { - "type": "integer" - }, - "message": { - "type": "string" - }, - "errors": { - "$ref": "#/definitions/ErrorList" - } - }, - "additionalProperties": false, - "required": [ - "code", - "errors", - "message" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "RouteResponse": { "type": "object", "properties": { @@ -9578,12 +9820,45 @@ "name": { "type": "string" }, + "name_localizations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "description": { "type": "string" }, + "description_localizations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "required": { "type": "boolean" }, + "autocomplete": { + "type": "boolean" + }, + "min_length": { + "type": "integer" + }, + "max_length": { + "type": "integer" + }, + "min_value": { + "type": "integer" + }, + "max_value": { + "type": "integer" + }, + "channel_types": { + "type": "array", + "items": { + "$ref": "#/definitions/ChannelType" + } + }, "choices": { "type": "array", "items": { @@ -9619,12 +9894,44 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, + "ChannelType": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 255 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, "ApplicationCommandOptionChoice": { "type": "object", "properties": { "name": { "type": "string" }, + "name_localizations": { + "type": "object", + "additionalProperties": { + "type": "string" + } + }, "value": { "type": [ "string", @@ -9754,16 +10061,763 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "SetPrivateStatus": { + "JsonValue": { + "description": "Represents any possible JSON value:\n- number\n- string\n- boolean\n- null\n- object (with any JSON value as property)\n- array (with any JSON value as element)", + "anyOf": [ + { + "description": "Represents a JSON object.", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/JsonValue" + } + }, + { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "$ref": "#/definitions/JsonValue" + } + }, + "properties": { + "length": { + "type": "integer" + }, + "__@unscopables@751": { + "type": "object", + "additionalProperties": false, + "patternProperties": { + "^[0-9]+$": { + "type": "boolean" + } + }, + "properties": { + "length": { + "type": "boolean" + }, + "toString": { + "type": "boolean" + }, + "toLocaleString": { + "type": "boolean" + }, + "pop": { + "type": "boolean" + }, + "push": { + "type": "boolean" + }, + "concat": { + "type": "boolean" + }, + "join": { + "type": "boolean" + }, + "reverse": { + "type": "boolean" + }, + "shift": { + "type": "boolean" + }, + "slice": { + "type": "boolean" + }, + "sort": { + "type": "boolean" + }, + "splice": { + "type": "boolean" + }, + "unshift": { + "type": "boolean" + }, + "indexOf": { + "type": "boolean" + }, + "lastIndexOf": { + "type": "boolean" + }, + "every": { + "type": "boolean" + }, + "some": { + "type": "boolean" + }, + "forEach": { + "type": "boolean" + }, + "map": { + "type": "boolean" + }, + "filter": { + "type": "boolean" + }, + "reduce": { + "type": "boolean" + }, + "reduceRight": { + "type": "boolean" + }, + "find": { + "type": "boolean" + }, + "findIndex": { + "type": "boolean" + }, + "fill": { + "type": "boolean" + }, + "copyWithin": { + "type": "boolean" + }, + "entries": { + "type": "boolean" + }, + "keys": { + "type": "boolean" + }, + "values": { + "type": "boolean" + }, + "includes": { + "type": "boolean" + }, + "flatMap": { + "type": "boolean" + }, + "flat": { + "type": "boolean" + }, + "at": { + "type": "boolean" + }, + "findLast": { + "type": "boolean" + }, + "findLastIndex": { + "type": "boolean" + }, + "toReversed": { + "type": "boolean" + }, + "toSorted": { + "type": "boolean" + }, + "toSpliced": { + "type": "boolean" + }, + "with": { + "type": "boolean" + }, + "__@iterator@749": { + "type": "boolean" + }, + "__@unscopables@751": { + "type": "boolean" + } + } + } + }, + "required": [ + "__@unscopables@751", + "length" + ] + }, + { + "type": [ + "null", + "string", + "integer", + "boolean" + ] + } + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "InstanceUserDeleteSchemaContent": { + "type": "object", + "properties": { + "reason": { + "type": "string" + }, + "persistInstanceBan": { + "type": "boolean" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PublicMember": { + "additionalProperties": false, + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "guild_id": { + "type": "string" + }, + "nick": { + "type": "string" + }, + "joined_at": { + "type": "string", + "format": "date-time" + }, + "pending": { + "type": "boolean" + }, + "deaf": { + "type": "boolean" + }, + "mute": { + "type": "boolean" + }, + "premium_since": { + "type": "integer" + }, + "avatar": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pronouns": { + "type": "string" + }, + "communication_disabled_until": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] + }, + "flags": { + "type": "integer" + }, + "user": { + "$ref": "#/definitions/PublicUser" + }, + "roles": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "banner", + "bio", + "communication_disabled_until", + "deaf", + "flags", + "guild_id", + "id", + "joined_at", + "mute", + "pending", + "roles", + "user" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PublicUser": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "premium_since": { + "type": "string", + "format": "date-time" + }, + "avatar": { + "type": "string" + }, + "banner": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "theme_colors": { + "type": "array", + "items": { + "type": "integer" + } + }, + "pronouns": { + "type": "string" + }, + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "public_flags": { + "type": "integer" + }, + "accent_color": { + "type": "integer" + }, + "bot": { + "type": "boolean" + }, + "premium_type": { + "type": "integer" + }, + "badge_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "avatar_decoration_data": { + "$ref": "#/definitions/AvatarDecorationData" + }, + "display_name_styles": { + "$ref": "#/definitions/DisplayNameStyle" + }, + "collectibles": { + "$ref": "#/definitions/Collectibles" + }, + "primary_guild": { + "$ref": "#/definitions/PrimaryGuild" + } + }, + "additionalProperties": false, + "required": [ + "bio", + "bot", + "discriminator", + "id", + "premium_since", + "premium_type", + "public_flags", + "username" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "AvatarDecorationData": { + "type": "object", + "properties": { + "asset": { + "type": "string" + }, + "sku_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "expires_at": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "asset", + "expires_at", + "sku_id" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "DisplayNameStyle": { + "type": "object", + "properties": { + "font_id": { + "type": "integer" + }, + "effect_id": { + "type": "integer" + }, + "colors": { + "type": "array", + "items": { + "type": "integer" + } + } + }, + "additionalProperties": false, + "required": [ + "colors", + "effect_id", + "font_id" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "Collectibles": { + "type": "object", + "properties": { + "nameplate": { + "anyOf": [ + { + "$ref": "#/definitions/NameplateData" + }, + { + "type": "null" + } + ] + } + }, + "additionalProperties": false, + "required": [ + "nameplate" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "NameplateData": { + "type": "object", + "properties": { + "asset": { + "type": "string" + }, + "sku_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "label": { + "type": "string" + }, + "palette": { + "type": "string" + }, + "expires_at": { + "type": [ + "null", + "integer" + ] + } + }, + "additionalProperties": false, + "required": [ + "asset", + "expires_at", + "label", + "palette", + "sku_id" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PrimaryGuild": { + "type": "object", + "properties": { + "identity_enabled": { + "type": [ + "null", + "boolean" + ] + }, + "identity_guild_id": { + "type": [ + "null", + "string" + ] + }, + "tag": { + "type": [ + "null", + "string" + ] + }, + "badge": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "badge", + "identity_enabled", + "identity_guild_id", + "tag" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PaymentSource": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "brand": { + "type": "string" + }, + "country": { + "type": "string" + }, + "last_4": { + "type": "string" + }, + "billing_address": { + "$ref": "#/definitions/BillingAddress" + }, + "type": { + "$ref": "#/definitions/PaymentSourceType" + }, + "payment_gateway": { + "$ref": "#/definitions/PaymentGateway" + }, + "payment_gateway_source_id": { + "type": "string" + }, + "default": { + "type": "boolean" + }, + "invalid": { + "type": "boolean" + }, + "flags": { + "$ref": "#/definitions/PaymentSourceFlags" + }, + "deleted_at": { + "type": [ + "null", + "string" + ] + }, + "expires_month": { + "type": "integer" + }, + "expires_year": { + "type": "integer" + }, + "email": { + "type": "string" + }, + "bank": { + "type": "string" + }, + "username": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "billing_address", + "default", + "deleted_at", + "flags", + "id", + "invalid", + "payment_gateway", + "type" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "BillingAddress": { + "type": "object", + "properties": { + "line_1": { + "type": "string" + }, + "line_2": { + "type": [ + "null", + "string" + ] + }, + "name": { + "type": "string" + }, + "postal_code": { + "type": "string" + }, + "city": { + "type": "string" + }, + "state": { + "type": "string" + }, + "country": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "city", + "country", + "line_1", + "name" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PaymentSourceType": { + "type": "number", "enum": [ - "dnd", - "idle", - "invisible", - "offline", - "online", - "unknown" + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10, + 11, + 12, + 13, + 14, + 15, + 16, + 17, + 18, + 19 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PaymentGateway": { + "type": "number", + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PaymentSourceFlags": { + "type": "number", + "enum": [ + 1, + 2 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "RelationshipType": { + "type": "number", + "enum": [ + -1, + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PartialUser": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "username": { + "type": "string" + }, + "discriminator": { + "type": "string" + }, + "global_name": { + "type": [ + "null", + "string" + ] + }, + "avatar": { + "type": [ + "null", + "string" + ] + }, + "avatar_decoration_data": { + "anyOf": [ + { + "$ref": "#/definitions/AvatarDecorationData" + }, + { + "type": "null" + } + ] + }, + "collectibles": { + "anyOf": [ + { + "$ref": "#/definitions/Collectibles" + }, + { + "type": "null" + } + ] + }, + "display_name_styles": { + "anyOf": [ + { + "$ref": "#/definitions/DisplayNameStyle" + }, + { + "type": "null" + } + ] + }, + "primary_guild": { + "anyOf": [ + { + "$ref": "#/definitions/PrimaryGuild" + }, + { + "type": "null" + } + ] + }, + "bot": { + "type": "boolean" + }, + "system": { + "type": "boolean" + }, + "banner": { + "type": [ + "null", + "string" + ] + }, + "accent_color": { + "type": [ + "null", + "integer" + ] + }, + "public_flags": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "avatar", + "discriminator", + "id", + "username" ], - "type": "string", "$schema": "http://json-schema.org/draft-07/schema#" }, "Activity": { @@ -10015,6 +11069,425 @@ "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" }, + "CustomStatus": { + "type": "object", + "properties": { + "emoji_id": { + "type": "string" + }, + "emoji_name": { + "type": "string" + }, + "expires_at": { + "type": "integer" + }, + "text": { + "type": "string" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "FriendSourceFlags": { + "type": "object", + "properties": { + "all": { + "type": "boolean" + }, + "mutual_friends": { + "type": "boolean" + }, + "mutual_guilds": { + "type": "boolean" + } + }, + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildFolder": { + "type": "object", + "properties": { + "color": { + "type": [ + "null", + "integer" + ] + }, + "guild_ids": { + "type": "array", + "items": { + "type": "string" + } + }, + "id": { + "type": [ + "null", + "integer" + ] + }, + "name": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "guild_ids" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PublicInvite": { + "type": "object", + "properties": { + "code": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/InviteType" + }, + "channel": { + "anyOf": [ + { + "$ref": "#/definitions/PublicChannel" + }, + { + "type": "null" + } + ] + }, + "guild_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "guild": { + "$ref": "#/definitions/InviteGuild" + }, + "profile": { + "$ref": "#/definitions/GuildProfileResponse" + }, + "inviter": { + "$ref": "#/definitions/PartialUser" + }, + "flags": { + "enum": [ + 1, + 2, + 4, + 8 + ], + "type": "number" + }, + "target_type": { + "type": "integer" + }, + "target_user": { + "$ref": "#/definitions/PartialUser" + }, + "roles": { + "type": "array", + "items": { + "$ref": "#/definitions/InviteRole" + } + }, + "approximate_member_count": { + "type": "integer" + }, + "approximate_presence_count": { + "type": "integer" + }, + "expires_at": { + "type": [ + "null", + "string" + ] + }, + "new_member": { + "type": "boolean" + }, + "show_verification_form": { + "type": "boolean" + }, + "is_nickname_changeable": { + "type": "boolean" + }, + "target_users_job_status": { + "$ref": "#/definitions/InviteTargetUsersJob" + } + }, + "additionalProperties": false, + "required": [ + "channel", + "code", + "expires_at", + "type" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "InviteType": { + "type": "number", + "enum": [ + 0, + 1, + 2 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PublicChannel": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "type": { + "$ref": "#/definitions/ChannelType" + }, + "guild_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "position": { + "type": "integer" + }, + "permission_overwrites": { + "type": "array", + "items": { + "$ref": "#/definitions/ChannelPermissionOverwrite" + } + }, + "name": { + "type": [ + "null", + "string" + ] + }, + "topic": { + "type": [ + "null", + "string" + ] + }, + "nsfw": { + "type": "boolean" + }, + "last_message_id": { + "type": [ + "null", + "string" + ] + }, + "last_pin_timestamp": { + "type": [ + "null", + "string" + ] + }, + "bitrate": { + "type": "integer" + }, + "user_limit": { + "type": "integer" + }, + "rate_limit_per_user": { + "type": "integer" + }, + "recipients": { + "type": "array", + "items": { + "$ref": "#/definitions/PartialUser" + } + }, + "recipient_flags": { + "type": "integer" + }, + "icon": { + "type": [ + "null", + "string" + ] + }, + "managed": { + "type": "boolean" + }, + "blocked_user_warning_dismissed": { + "type": "boolean" + }, + "application_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "owner_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "owner": { + "anyOf": [ + { + "$ref": "#/definitions/PublicMember" + }, + { + "type": "null" + } + ] + }, + "parent_id": { + "type": [ + "null", + "string" + ] + }, + "rtc_region": { + "type": [ + "null", + "string" + ] + }, + "video_quality_mode": { + "type": "integer" + }, + "total_message_sent": { + "type": "integer" + }, + "message_count": { + "type": "integer" + }, + "member_count": { + "type": "integer" + }, + "member_ids_preview": { + "type": "array", + "items": { + "type": "string" + } + }, + "thread_metadata": { + "$ref": "#/definitions/ThreadMetadata" + }, + "member": { + "$ref": "#/definitions/PublicThreadMember" + }, + "default_auto_archive_duration": { + "type": [ + "null", + "integer" + ] + }, + "default_thread_rate_limit_per_user": { + "type": "integer" + }, + "permissions": { + "type": "string" + }, + "flags": { + "type": "integer" + }, + "available_tags": { + "type": "array", + "items": { + "$ref": "#/definitions/Tag" + } + }, + "applied_tags": { + "type": "array", + "items": { + "type": "string" + } + }, + "default_reaction_emoji": { + "type": [ + "null", + "string" + ] + }, + "default_forum_layout": { + "type": "integer" + }, + "default_sort_order": { + "type": [ + "null", + "integer" + ] + }, + "default_tag_setting": { + "type": "string" + }, + "is_message_request": { + "type": "boolean" + }, + "is_message_request_timestamp": { + "type": [ + "null", + "string" + ] + }, + "is_spam": { + "type": "boolean" + }, + "theme_color": { + "type": [ + "null", + "integer" + ] + }, + "status": { + "type": [ + "null", + "string" + ] + }, + "hd_streaming_until": { + "type": [ + "null", + "string" + ] + }, + "hd_streaming_buyer_id": { + "type": [ + "null", + "string" + ] + }, + "is_linkable": { + "type": "boolean" + }, + "is_viewable_and_writeable_by_all_members": { + "type": "boolean" + } + }, + "additionalProperties": false, + "required": [ + "id", + "type" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ChannelPermissionOverwrite": { + "type": "object", + "properties": { + "allow": { + "type": "string" + }, + "deny": { + "type": "string" + }, + "id": { + "type": "string" + }, + "type": { + "$ref": "#/definitions/ChannelPermissionOverwriteType" + } + }, + "additionalProperties": false, + "required": [ + "allow", + "deny", + "id", + "type" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, "ChannelPermissionOverwriteType": { "type": "number", "enum": [ @@ -10024,6 +11497,454 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, + "ThreadMetadata": { + "type": "object", + "properties": { + "archived": { + "type": "boolean" + }, + "auto_archive_duration": { + "type": "integer" + }, + "archive_timestamp": { + "type": "string" + }, + "locked": { + "type": "boolean" + }, + "invitable": { + "type": "boolean" + }, + "create_timestamp": { + "type": "string" + } + }, + "additionalProperties": false, + "required": [ + "archive_timestamp", + "archived", + "auto_archive_duration", + "create_timestamp", + "locked" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "PublicThreadMember": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "user_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "join_timestamp": { + "type": "string" + }, + "flags": { + "$ref": "#/definitions/ThreadMemberFlags" + }, + "muted": { + "type": "boolean" + }, + "mute_config": { + "anyOf": [ + { + "$ref": "#/definitions/MuteConfig" + }, + { + "type": "null" + } + ] + }, + "member": { + "$ref": "#/definitions/PublicMember" + } + }, + "additionalProperties": false, + "required": [ + "flags", + "join_timestamp" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ThreadMemberFlags": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 4, + 8 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "MuteConfig": { + "type": "object", + "properties": { + "end_time": { + "type": "integer" + }, + "selected_time_window": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "end_time", + "selected_time_window" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "Tag": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "name": { + "type": "string" + }, + "moderated": { + "type": "boolean" + }, + "emoji_id": { + "type": [ + "null", + "string" + ] + }, + "emoji_name": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "emoji_id", + "emoji_name", + "id", + "moderated", + "name" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "InviteGuild": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "name": { + "type": "string" + }, + "icon": { + "type": [ + "null", + "string" + ] + }, + "description": { + "type": [ + "null", + "string" + ] + }, + "banner": { + "type": [ + "null", + "string" + ] + }, + "splash": { + "type": [ + "null", + "string" + ] + }, + "verification_level": { + "$ref": "#/definitions/GuildVerificationLevel" + }, + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "vanity_url_code": { + "type": [ + "null", + "string" + ] + }, + "premium_subscription_count": { + "type": "integer" + }, + "premium_tier": { + "$ref": "#/definitions/GuildPremiumTier" + }, + "nsfw": { + "type": "boolean" + }, + "nsfw_level": { + "$ref": "#/definitions/GuildNsfwLevel" + } + }, + "additionalProperties": false, + "required": [ + "banner", + "description", + "features", + "icon", + "id", + "name", + "nsfw", + "nsfw_level", + "premium_tier", + "splash", + "vanity_url_code", + "verification_level" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildVerificationLevel": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3, + 4 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildPremiumTier": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildNsfwLevel": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GameActivity": { + "type": "object", + "properties": { + "activity_level": { + "type": "integer" + }, + "activity_score": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "activity_level", + "activity_score" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildTrait": { + "type": "object", + "properties": { + "emoji_id": { + "type": [ + "null", + "string" + ] + }, + "emoji_name": { + "type": [ + "null", + "string" + ] + }, + "emoji_animated": { + "type": "boolean" + }, + "label": { + "type": "string" + }, + "position": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "emoji_animated", + "emoji_id", + "emoji_name", + "label", + "position" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "GuildVisibilityLevel": { + "type": "number", + "enum": [ + 1, + 2, + 3 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "InviteRole": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "name": { + "type": "string" + }, + "position": { + "type": "integer" + }, + "color": { + "type": "integer" + }, + "colors": { + "$ref": "#/definitions/RoleColors" + }, + "icon": { + "type": [ + "null", + "string" + ] + }, + "unicode_emoji": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "color", + "colors", + "id", + "name", + "position" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "RoleColors": { + "type": "object", + "properties": { + "primary_color": { + "type": "integer" + }, + "secondary_color": { + "type": "integer" + }, + "tertiary_color": { + "type": "integer" + } + }, + "additionalProperties": false, + "required": [ + "primary_color" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "InviteTargetUsersJob": { + "type": "object", + "properties": { + "status": { + "$ref": "#/definitions/InviteTargetUsersJobStatus" + }, + "total_users": { + "type": "integer" + }, + "processed_users": { + "type": "integer" + }, + "created_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] + }, + "completed_at": { + "anyOf": [ + { + "type": "string", + "format": "date-time" + }, + { + "type": "null" + } + ] + }, + "error_message": { + "type": [ + "null", + "string" + ] + } + }, + "additionalProperties": false, + "required": [ + "completed_at", + "created_at", + "error_message", + "processed_users", + "status", + "total_users" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "InviteTargetUsersJobStatus": { + "type": "number", + "enum": [ + 0, + 1, + 2, + 3 + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "ErrorList": { + "type": "object", + "additionalProperties": false, + "$schema": "http://json-schema.org/draft-07/schema#" + }, + "SetPrivateStatus": { + "enum": [ + "dnd", + "idle", + "invisible", + "offline", + "online", + "unknown" + ], + "type": "string", + "$schema": "http://json-schema.org/draft-07/schema#" + }, "ConnectedAccountTokenData": { "type": "object", "properties": { @@ -11200,241 +13121,6 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "PartialUser": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "username": { - "type": "string" - }, - "discriminator": { - "type": "string" - }, - "global_name": { - "type": [ - "null", - "string" - ] - }, - "avatar": { - "type": [ - "null", - "string" - ] - }, - "avatar_decoration_data": { - "anyOf": [ - { - "$ref": "#/definitions/AvatarDecorationData" - }, - { - "type": "null" - } - ] - }, - "collectibles": { - "anyOf": [ - { - "$ref": "#/definitions/Collectibles" - }, - { - "type": "null" - } - ] - }, - "display_name_styles": { - "anyOf": [ - { - "$ref": "#/definitions/DisplayNameStyle" - }, - { - "type": "null" - } - ] - }, - "primary_guild": { - "anyOf": [ - { - "$ref": "#/definitions/PrimaryGuild" - }, - { - "type": "null" - } - ] - }, - "bot": { - "type": "boolean" - }, - "system": { - "type": "boolean" - }, - "banner": { - "type": [ - "null", - "string" - ] - }, - "accent_color": { - "type": [ - "null", - "integer" - ] - }, - "public_flags": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "avatar", - "discriminator", - "id", - "username" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "AvatarDecorationData": { - "type": "object", - "properties": { - "asset": { - "type": "string" - }, - "sku_id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "expires_at": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "required": [ - "asset", - "expires_at", - "sku_id" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "Collectibles": { - "type": "object", - "properties": { - "nameplate": { - "anyOf": [ - { - "$ref": "#/definitions/NameplateData" - }, - { - "type": "null" - } - ] - } - }, - "additionalProperties": false, - "required": [ - "nameplate" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "NameplateData": { - "type": "object", - "properties": { - "asset": { - "type": "string" - }, - "sku_id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "label": { - "type": "string" - }, - "palette": { - "type": "string" - }, - "expires_at": { - "type": [ - "null", - "integer" - ] - } - }, - "additionalProperties": false, - "required": [ - "asset", - "expires_at", - "label", - "palette", - "sku_id" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "DisplayNameStyle": { - "type": "object", - "properties": { - "font_id": { - "type": "integer" - }, - "effect_id": { - "type": "integer" - }, - "colors": { - "type": "array", - "items": { - "type": "integer" - } - } - }, - "additionalProperties": false, - "required": [ - "colors", - "effect_id", - "font_id" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "PrimaryGuild": { - "type": "object", - "properties": { - "identity_enabled": { - "type": [ - "null", - "boolean" - ] - }, - "identity_guild_id": { - "type": [ - "null", - "string" - ] - }, - "tag": { - "type": [ - "null", - "string" - ] - }, - "badge": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "required": [ - "badge", - "identity_enabled", - "identity_guild_id", - "tag" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "StickerType": { "type": "number", "enum": [ @@ -12111,32 +13797,6 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ChannelType": { - "type": "number", - "enum": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 255 - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "Recipient": { "type": "object", "properties": { @@ -12617,20 +14277,6 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "RelationshipType": { - "type": "number", - "enum": [ - -1, - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "ConnectedAccount": { "type": "object", "properties": { @@ -12916,75 +14562,6 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "CustomStatus": { - "type": "object", - "properties": { - "emoji_id": { - "type": "string" - }, - "emoji_name": { - "type": "string" - }, - "expires_at": { - "type": "integer" - }, - "text": { - "type": "string" - } - }, - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "FriendSourceFlags": { - "type": "object", - "properties": { - "all": { - "type": "boolean" - }, - "mutual_friends": { - "type": "boolean" - }, - "mutual_guilds": { - "type": "boolean" - } - }, - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "GuildFolder": { - "type": "object", - "properties": { - "color": { - "type": [ - "null", - "integer" - ] - }, - "guild_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "id": { - "type": [ - "null", - "integer" - ] - }, - "name": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "required": [ - "guild_ids" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "SecurityKey": { "type": "object", "properties": { @@ -13315,25 +14892,6 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "RoleColors": { - "type": "object", - "properties": { - "primary_color": { - "type": "integer" - }, - "secondary_color": { - "type": "integer" - }, - "tertiary_color": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "primary_color" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "UserGuildSettings": { "type": "object", "properties": { @@ -13444,59 +15002,6 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "MuteConfig": { - "type": "object", - "properties": { - "end_time": { - "type": "integer" - }, - "selected_time_window": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "end_time", - "selected_time_window" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "ThreadMemberFlags": { - "type": "number", - "enum": [ - 0, - 1, - 2, - 4, - 8 - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "ChannelPermissionOverwrite": { - "type": "object", - "properties": { - "allow": { - "type": "string" - }, - "deny": { - "type": "string" - }, - "id": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/ChannelPermissionOverwriteType" - } - }, - "additionalProperties": false, - "required": [ - "allow", - "deny", - "id", - "type" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "Invite": { "type": "object", "properties": { @@ -15896,74 +17401,6 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "ThreadMetadata": { - "type": "object", - "properties": { - "archived": { - "type": "boolean" - }, - "auto_archive_duration": { - "type": "integer" - }, - "archive_timestamp": { - "type": "string" - }, - "locked": { - "type": "boolean" - }, - "invitable": { - "type": "boolean" - }, - "create_timestamp": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "archive_timestamp", - "archived", - "auto_archive_duration", - "create_timestamp", - "locked" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "Tag": { - "type": "object", - "properties": { - "channel_id": { - "type": "string" - }, - "channel": { - "$ref": "#/definitions/Channel" - }, - "name": { - "type": "string" - }, - "moderated": { - "type": "boolean", - "default": false - }, - "emoji_id": { - "type": "string" - }, - "emoji_name": { - "type": "string" - }, - "id": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "channel", - "channel_id", - "id", - "moderated", - "name" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "Ban": { "type": "object", "properties": { @@ -16107,343 +17544,6 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "InstanceUserDeleteSchemaContent": { - "type": "object", - "properties": { - "reason": { - "type": "string" - }, - "persistInstanceBan": { - "type": "boolean" - } - }, - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "PublicMember": { - "additionalProperties": false, - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "guild_id": { - "type": "string" - }, - "nick": { - "type": "string" - }, - "joined_at": { - "type": "string", - "format": "date-time" - }, - "pending": { - "type": "boolean" - }, - "deaf": { - "type": "boolean" - }, - "mute": { - "type": "boolean" - }, - "premium_since": { - "type": "integer" - }, - "avatar": { - "type": "string" - }, - "banner": { - "type": "string" - }, - "bio": { - "type": "string" - }, - "theme_colors": { - "type": "array", - "items": { - "type": "integer" - } - }, - "pronouns": { - "type": "string" - }, - "communication_disabled_until": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ] - }, - "flags": { - "type": "integer" - }, - "user": { - "$ref": "#/definitions/PublicUser" - }, - "roles": { - "type": "array", - "items": { - "type": "string" - } - } - }, - "required": [ - "banner", - "bio", - "communication_disabled_until", - "deaf", - "flags", - "guild_id", - "id", - "joined_at", - "mute", - "pending", - "roles", - "user" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "PublicUser": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "premium_since": { - "type": "string", - "format": "date-time" - }, - "avatar": { - "type": "string" - }, - "banner": { - "type": "string" - }, - "bio": { - "type": "string" - }, - "theme_colors": { - "type": "array", - "items": { - "type": "integer" - } - }, - "pronouns": { - "type": "string" - }, - "username": { - "type": "string" - }, - "discriminator": { - "type": "string" - }, - "public_flags": { - "type": "integer" - }, - "accent_color": { - "type": "integer" - }, - "bot": { - "type": "boolean" - }, - "premium_type": { - "type": "integer" - }, - "badge_ids": { - "type": "array", - "items": { - "type": "string" - } - }, - "avatar_decoration_data": { - "$ref": "#/definitions/AvatarDecorationData" - }, - "display_name_styles": { - "$ref": "#/definitions/DisplayNameStyle" - }, - "collectibles": { - "$ref": "#/definitions/Collectibles" - }, - "primary_guild": { - "$ref": "#/definitions/PrimaryGuild" - } - }, - "additionalProperties": false, - "required": [ - "bio", - "bot", - "discriminator", - "id", - "premium_since", - "premium_type", - "public_flags", - "username" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "PaymentSource": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "brand": { - "type": "string" - }, - "country": { - "type": "string" - }, - "last_4": { - "type": "string" - }, - "billing_address": { - "$ref": "#/definitions/BillingAddress" - }, - "type": { - "$ref": "#/definitions/PaymentSourceType" - }, - "payment_gateway": { - "$ref": "#/definitions/PaymentGateway" - }, - "payment_gateway_source_id": { - "type": "string" - }, - "default": { - "type": "boolean" - }, - "invalid": { - "type": "boolean" - }, - "flags": { - "$ref": "#/definitions/PaymentSourceFlags" - }, - "deleted_at": { - "type": [ - "null", - "string" - ] - }, - "expires_month": { - "type": "integer" - }, - "expires_year": { - "type": "integer" - }, - "email": { - "type": "string" - }, - "bank": { - "type": "string" - }, - "username": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "billing_address", - "default", - "deleted_at", - "flags", - "id", - "invalid", - "payment_gateway", - "type" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "BillingAddress": { - "type": "object", - "properties": { - "line_1": { - "type": "string" - }, - "line_2": { - "type": [ - "null", - "string" - ] - }, - "name": { - "type": "string" - }, - "postal_code": { - "type": "string" - }, - "city": { - "type": "string" - }, - "state": { - "type": "string" - }, - "country": { - "type": "string" - } - }, - "additionalProperties": false, - "required": [ - "city", - "country", - "line_1", - "name" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "PaymentSourceType": { - "type": "number", - "enum": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19 - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "PaymentGateway": { - "type": "number", - "enum": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10 - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "PaymentSourceFlags": { - "type": "number", - "enum": [ - 1, - 2 - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "EmojiGuild": { "type": "object", "properties": { @@ -16901,276 +18001,6 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "PublicChannel": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "type": { - "$ref": "#/definitions/ChannelType" - }, - "guild_id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "position": { - "type": "integer" - }, - "permission_overwrites": { - "type": "array", - "items": { - "$ref": "#/definitions/ChannelPermissionOverwrite" - } - }, - "name": { - "type": [ - "null", - "string" - ] - }, - "topic": { - "type": [ - "null", - "string" - ] - }, - "nsfw": { - "type": "boolean" - }, - "last_message_id": { - "type": [ - "null", - "string" - ] - }, - "last_pin_timestamp": { - "type": [ - "null", - "string" - ] - }, - "bitrate": { - "type": "integer" - }, - "user_limit": { - "type": "integer" - }, - "rate_limit_per_user": { - "type": "integer" - }, - "recipients": { - "type": "array", - "items": { - "$ref": "#/definitions/PartialUser" - } - }, - "recipient_flags": { - "type": "integer" - }, - "icon": { - "type": [ - "null", - "string" - ] - }, - "managed": { - "type": "boolean" - }, - "blocked_user_warning_dismissed": { - "type": "boolean" - }, - "application_id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "owner_id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "owner": { - "anyOf": [ - { - "$ref": "#/definitions/PublicMember" - }, - { - "type": "null" - } - ] - }, - "parent_id": { - "type": [ - "null", - "string" - ] - }, - "rtc_region": { - "type": [ - "null", - "string" - ] - }, - "video_quality_mode": { - "type": "integer" - }, - "total_message_sent": { - "type": "integer" - }, - "message_count": { - "type": "integer" - }, - "member_count": { - "type": "integer" - }, - "member_ids_preview": { - "type": "array", - "items": { - "type": "string" - } - }, - "thread_metadata": { - "$ref": "#/definitions/ThreadMetadata" - }, - "member": { - "$ref": "#/definitions/PublicThreadMember" - }, - "default_auto_archive_duration": { - "type": [ - "null", - "integer" - ] - }, - "default_thread_rate_limit_per_user": { - "type": "integer" - }, - "permissions": { - "type": "string" - }, - "flags": { - "type": "integer" - }, - "available_tags": { - "type": "array", - "items": { - "$ref": "#/definitions/Tag" - } - }, - "applied_tags": { - "type": "array", - "items": { - "type": "string" - } - }, - "default_reaction_emoji": { - "type": [ - "null", - "string" - ] - }, - "default_forum_layout": { - "type": "integer" - }, - "default_sort_order": { - "type": [ - "null", - "integer" - ] - }, - "default_tag_setting": { - "type": "string" - }, - "is_message_request": { - "type": "boolean" - }, - "is_message_request_timestamp": { - "type": [ - "null", - "string" - ] - }, - "is_spam": { - "type": "boolean" - }, - "theme_color": { - "type": [ - "null", - "integer" - ] - }, - "status": { - "type": [ - "null", - "string" - ] - }, - "hd_streaming_until": { - "type": [ - "null", - "string" - ] - }, - "hd_streaming_buyer_id": { - "type": [ - "null", - "string" - ] - }, - "is_linkable": { - "type": "boolean" - }, - "is_viewable_and_writeable_by_all_members": { - "type": "boolean" - } - }, - "additionalProperties": false, - "required": [ - "id", - "type" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "PublicThreadMember": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "user_id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "join_timestamp": { - "type": "string" - }, - "flags": { - "$ref": "#/definitions/ThreadMemberFlags" - }, - "muted": { - "type": "boolean" - }, - "mute_config": { - "anyOf": [ - { - "$ref": "#/definitions/MuteConfig" - }, - { - "type": "null" - } - ] - }, - "member": { - "$ref": "#/definitions/PublicMember" - } - }, - "additionalProperties": false, - "required": [ - "flags", - "join_timestamp" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "MessageActivity": { "type": "object", "properties": { @@ -17390,179 +18220,6 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, - "JsonValue": { - "description": "Represents any possible JSON value:\n- number\n- string\n- boolean\n- null\n- object (with any JSON value as property)\n- array (with any JSON value as element)", - "anyOf": [ - { - "description": "Represents a JSON object.", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/JsonValue" - } - }, - { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]+$": { - "$ref": "#/definitions/JsonValue" - } - }, - "properties": { - "length": { - "type": "integer" - }, - "__@unscopables@751": { - "type": "object", - "additionalProperties": false, - "patternProperties": { - "^[0-9]+$": { - "type": "boolean" - } - }, - "properties": { - "length": { - "type": "boolean" - }, - "toString": { - "type": "boolean" - }, - "toLocaleString": { - "type": "boolean" - }, - "pop": { - "type": "boolean" - }, - "push": { - "type": "boolean" - }, - "concat": { - "type": "boolean" - }, - "join": { - "type": "boolean" - }, - "reverse": { - "type": "boolean" - }, - "shift": { - "type": "boolean" - }, - "slice": { - "type": "boolean" - }, - "sort": { - "type": "boolean" - }, - "splice": { - "type": "boolean" - }, - "unshift": { - "type": "boolean" - }, - "indexOf": { - "type": "boolean" - }, - "lastIndexOf": { - "type": "boolean" - }, - "every": { - "type": "boolean" - }, - "some": { - "type": "boolean" - }, - "forEach": { - "type": "boolean" - }, - "map": { - "type": "boolean" - }, - "filter": { - "type": "boolean" - }, - "reduce": { - "type": "boolean" - }, - "reduceRight": { - "type": "boolean" - }, - "find": { - "type": "boolean" - }, - "findIndex": { - "type": "boolean" - }, - "fill": { - "type": "boolean" - }, - "copyWithin": { - "type": "boolean" - }, - "entries": { - "type": "boolean" - }, - "keys": { - "type": "boolean" - }, - "values": { - "type": "boolean" - }, - "includes": { - "type": "boolean" - }, - "flatMap": { - "type": "boolean" - }, - "flat": { - "type": "boolean" - }, - "at": { - "type": "boolean" - }, - "findLast": { - "type": "boolean" - }, - "findLastIndex": { - "type": "boolean" - }, - "toReversed": { - "type": "boolean" - }, - "toSorted": { - "type": "boolean" - }, - "toSpliced": { - "type": "boolean" - }, - "with": { - "type": "boolean" - }, - "__@iterator@749": { - "type": "boolean" - }, - "__@unscopables@751": { - "type": "boolean" - } - } - } - }, - "required": [ - "__@unscopables@751", - "length" - ] - }, - { - "type": [ - "null", - "string", - "integer", - "boolean" - ] - } - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "DmChannelDTO": { "type": "object", "properties": { @@ -18455,6 +19112,50 @@ ], "$schema": "http://json-schema.org/draft-07/schema#" }, + "ApplicationCommandIndexApplication": { + "type": "object", + "properties": { + "id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "icon": { + "type": [ + "null", + "string" + ] + }, + "permissions": {}, + "bot": { + "$ref": "#/definitions/PartialUser" + }, + "bot_id": { + "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", + "type": "string" + }, + "flags": { + "type": "string" + }, + "embedded_activity_config": { + "$ref": "#/definitions/Pick%3CEmbeddedActivityConfig%2C%22supported_platforms%22%3E" + } + }, + "additionalProperties": false, + "required": [ + "description", + "flags", + "icon", + "id", + "name" + ], + "$schema": "http://json-schema.org/draft-07/schema#" + }, "AllowlistedUser": { "type": "object", "properties": { @@ -19451,77 +20152,6 @@ "const": 3, "$schema": "http://json-schema.org/draft-07/schema#" }, - "GameActivity": { - "type": "object", - "properties": { - "activity_level": { - "type": "integer" - }, - "activity_score": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "activity_level", - "activity_score" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "GuildTrait": { - "type": "object", - "properties": { - "emoji_id": { - "type": [ - "null", - "string" - ] - }, - "emoji_name": { - "type": [ - "null", - "string" - ] - }, - "emoji_animated": { - "type": "boolean" - }, - "label": { - "type": "string" - }, - "position": { - "type": "integer" - } - }, - "additionalProperties": false, - "required": [ - "emoji_animated", - "emoji_id", - "emoji_name", - "label", - "position" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "GuildVisibilityLevel": { - "type": "number", - "enum": [ - 1, - 2, - 3 - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "GuildPremiumTier": { - "type": "number", - "enum": [ - 0, - 1, - 2, - 3 - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, "GifTrendingCategory": { "type": "object", "properties": { @@ -19707,310 +20337,5 @@ }, "additionalProperties": false, "$schema": "http://json-schema.org/draft-07/schema#" - }, - "PublicInvite": { - "type": "object", - "properties": { - "code": { - "type": "string" - }, - "type": { - "$ref": "#/definitions/InviteType" - }, - "channel": { - "anyOf": [ - { - "$ref": "#/definitions/PublicChannel" - }, - { - "type": "null" - } - ] - }, - "guild_id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "guild": { - "$ref": "#/definitions/InviteGuild" - }, - "profile": { - "$ref": "#/definitions/GuildProfileResponse" - }, - "inviter": { - "$ref": "#/definitions/PartialUser" - }, - "flags": { - "enum": [ - 1, - 2, - 4, - 8 - ], - "type": "number" - }, - "target_type": { - "type": "integer" - }, - "target_user": { - "$ref": "#/definitions/PartialUser" - }, - "roles": { - "type": "array", - "items": { - "$ref": "#/definitions/InviteRole" - } - }, - "approximate_member_count": { - "type": "integer" - }, - "approximate_presence_count": { - "type": "integer" - }, - "expires_at": { - "type": [ - "null", - "string" - ] - }, - "new_member": { - "type": "boolean" - }, - "show_verification_form": { - "type": "boolean" - }, - "is_nickname_changeable": { - "type": "boolean" - }, - "target_users_job_status": { - "$ref": "#/definitions/InviteTargetUsersJob" - } - }, - "additionalProperties": false, - "required": [ - "channel", - "code", - "expires_at", - "type" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "InviteType": { - "type": "number", - "enum": [ - 0, - 1, - 2 - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "InviteGuild": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "name": { - "type": "string" - }, - "icon": { - "type": [ - "null", - "string" - ] - }, - "description": { - "type": [ - "null", - "string" - ] - }, - "banner": { - "type": [ - "null", - "string" - ] - }, - "splash": { - "type": [ - "null", - "string" - ] - }, - "verification_level": { - "$ref": "#/definitions/GuildVerificationLevel" - }, - "features": { - "type": "array", - "items": { - "type": "string" - } - }, - "vanity_url_code": { - "type": [ - "null", - "string" - ] - }, - "premium_subscription_count": { - "type": "integer" - }, - "premium_tier": { - "$ref": "#/definitions/GuildPremiumTier" - }, - "nsfw": { - "type": "boolean" - }, - "nsfw_level": { - "$ref": "#/definitions/GuildNsfwLevel" - } - }, - "additionalProperties": false, - "required": [ - "banner", - "description", - "features", - "icon", - "id", - "name", - "nsfw", - "nsfw_level", - "premium_tier", - "splash", - "vanity_url_code", - "verification_level" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "GuildVerificationLevel": { - "type": "number", - "enum": [ - 0, - 1, - 2, - 3, - 4 - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "GuildNsfwLevel": { - "type": "number", - "enum": [ - 0, - 1, - 2, - 3 - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "InviteRole": { - "type": "object", - "properties": { - "id": { - "description": "A Twitter-like snowflake, except the epoch is 2015-01-01T00:00:00.000Z\n```\nIf we have a snowflake '266241948824764416' we can represent it as binary:\n\n64 22 17 12 0\n 000000111011000111100001101001000101000000 00001 00000 000000000000\n number of ms since Discord epoch worker pid increment\n```", - "type": "string" - }, - "name": { - "type": "string" - }, - "position": { - "type": "integer" - }, - "color": { - "type": "integer" - }, - "colors": { - "$ref": "#/definitions/RoleColors" - }, - "icon": { - "type": [ - "null", - "string" - ] - }, - "unicode_emoji": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "required": [ - "color", - "colors", - "id", - "name", - "position" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "InviteTargetUsersJob": { - "type": "object", - "properties": { - "status": { - "$ref": "#/definitions/InviteTargetUsersJobStatus" - }, - "total_users": { - "type": "integer" - }, - "processed_users": { - "type": "integer" - }, - "created_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ] - }, - "completed_at": { - "anyOf": [ - { - "type": "string", - "format": "date-time" - }, - { - "type": "null" - } - ] - }, - "error_message": { - "type": [ - "null", - "string" - ] - } - }, - "additionalProperties": false, - "required": [ - "completed_at", - "created_at", - "error_message", - "processed_users", - "status", - "total_users" - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "InviteTargetUsersJobStatus": { - "type": "number", - "enum": [ - 0, - 1, - 2, - 3 - ], - "$schema": "http://json-schema.org/draft-07/schema#" - }, - "ErrorList": { - "type": "object", - "additionalProperties": false, - "$schema": "http://json-schema.org/draft-07/schema#" } } \ No newline at end of file diff --git a/src/api/middlewares/Route.ts b/src/api/middlewares/Route.ts
index 5341f100b..a93d512b5 100644 --- a/src/api/middlewares/Route.ts +++ b/src/api/middlewares/Route.ts
@@ -19,7 +19,7 @@ import { DiscordApiErrors, EVENT, FieldErrors, PermissionResolvable, Permissions, RightResolvable, Rights, SpacebarApiErrors, getPermission, getRights } from "@spacebar/util"; import { AnyValidateFunction } from "ajv/dist/core"; import { NextFunction, Request, Response } from "express"; -import { ajv } from "@spacebar/schemas"; +import { ajv, getInvalidSchemaValues } from "@spacebar/schemas"; import { BigNumber } from "bignumber.js"; const ignoredRequestSchemas = [ @@ -179,6 +179,12 @@ export function route(opts: RouteOptions) { ); if (process.env.LOG_VALIDATION_ERRORS) { console.log(`[VALIDATION ERROR] ${req.method} ${req.originalUrl} - SCHEMA='${opts.requestBody}' -`, validate?.errors); + if (process.env.LOG_VALIDATION_ERRORS_RESOLVED) { + const resolved = getInvalidSchemaValues(req.body, validate.errors!); + for (const res of resolved) { + console.log(`[VALIDATION ERROR]`, res.keyword, res.instancePath, res.value); + } + } if (process.env.LOG_VALIDATION_ERROR_SCHEMAS) console.log(validate.schema); } throw FieldErrors(fields, validate.errors!); diff --git a/src/api/routes/applications/#application_id/commands/#command_id/index.ts b/src/api/routes/applications/#application_id/commands/#command_id/index.ts
index 3e4df62ff..5df35f8cc 100644 --- a/src/api/routes/applications/#application_id/commands/#command_id/index.ts +++ b/src/api/routes/applications/#application_id/commands/#command_id/index.ts
@@ -17,6 +17,7 @@ */ import { Request, Response, Router } from "express"; +import { FindOptionsWhere, IsNull } from "typeorm"; import { route } from "@spacebar/api/middlewares"; import { Application, ApplicationCommand } from "@spacebar/database"; import { Config, FieldErrors, Snowflake } from "@spacebar/util"; @@ -24,28 +25,43 @@ import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@space const router = Router({ mergeParams: true }); -router.get("/", route({}), async (req: Request, res: Response) => { - const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); +router.get( + "/", + route({ + responses: { + 200: { + body: "ApplicationCommandResponse", + }, + }, + }), + async (req: Request, res: Response) => { + const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); - if (!applicationExists) { - res.status(404).send({ code: 404, message: "Unknown application" }); - return; - } + if (!applicationExists) { + res.status(404).send({ code: 404, message: "Unknown application" }); + return; + } - const command = await ApplicationCommand.findOne({ where: { application_id: req.params.application_id as string, id: req.params.command_id as string } }); + const command = await ApplicationCommand.findOne({ where: { application_id: req.params.application_id as string, id: req.params.command_id as string } }); - if (!command) { - res.status(404).send({ code: 404, message: "Unknown application command" }); - return; - } + if (!command) { + res.status(404).send({ code: 404, message: "Unknown application command" }); + return; + } - res.send(command); -}); + res.send(command.toApplicationCommandResponse(req.user.settings?.locale)); + }, +); router.patch( "/", route({ requestBody: "ApplicationCommandCreateSchema", + responses: { + 200: { + body: "ApplicationCommandResponse", + }, + }, }), async (req: Request, res: Response) => { const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); @@ -77,8 +93,7 @@ router.patch( }); } - const commandForDb: ApplicationCommandSchema = { - application_id: req.params.application_id as string, + const commandForDb: Partial<ApplicationCommand> = { name: body.name.trim(), name_localizations: body.name_localizations, description: body.description?.trim() || "", @@ -94,29 +109,43 @@ router.patch( type: body.type, version: Snowflake.generate(), }; + const commandKey: FindOptionsWhere<ApplicationCommand> = { + application_id: req.params.application_id as string, + name: body.name.trim(), + guild_id: IsNull(), + }; - await ApplicationCommand.update({ name: body.name.trim() }, commandForDb); - res.send(commandForDb); + await ApplicationCommand.update(commandKey, commandForDb); + const resultingCommand = await ApplicationCommand.findOneOrFail({ where: commandKey }); + res.send(resultingCommand.toApplicationCommandResponse()); }, ); -router.delete("/", route({}), async (req: Request, res: Response) => { - const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); +router.delete( + "/", + route({ + responses: { + 204: {}, + }, + }), + async (req: Request, res: Response) => { + const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); - if (!applicationExists) { - res.status(404).send({ code: 404, message: "Unknown application" }); - return; - } + if (!applicationExists) { + res.status(404).send({ code: 404, message: "Unknown application" }); + return; + } - const commandExists = await ApplicationCommand.exists({ where: { application_id: req.params.application_id as string, id: req.params.command_id as string } }); + const commandExists = await ApplicationCommand.exists({ where: { application_id: req.params.application_id as string, id: req.params.command_id as string } }); - if (!commandExists) { - res.status(404).send({ code: 404, message: "Unknown application command" }); - return; - } + if (!commandExists) { + res.status(404).send({ code: 404, message: "Unknown application command" }); + return; + } - await ApplicationCommand.delete({ application_id: req.params.application_id as string, id: req.params.command_id as string }); - res.sendStatus(204); -}); + await ApplicationCommand.delete({ application_id: req.params.application_id as string, id: req.params.command_id as string, guild_id: IsNull() }); + res.sendStatus(204); + }, +); export default router; diff --git a/src/api/routes/applications/#application_id/commands/index.ts b/src/api/routes/applications/#application_id/commands/index.ts
index 538ea7ea8..bde393f4f 100644 --- a/src/api/routes/applications/#application_id/commands/index.ts +++ b/src/api/routes/applications/#application_id/commands/index.ts
@@ -18,29 +18,44 @@ import { Request, Response, Router } from "express"; import { IsNull } from "typeorm"; -import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@spacebar/schemas"; +import { ApplicationCommandCreateSchema, ApplicationCommandListResponse, ApplicationCommandSchema } from "@spacebar/schemas"; import { route } from "@spacebar/api/middlewares"; import { Application, ApplicationCommand } from "@spacebar/database"; import { Config, FieldErrors, Snowflake } from "@spacebar/util"; const router = Router({ mergeParams: true }); -router.get("/", route({}), async (req: Request, res: Response) => { - const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); +router.get( + "/", + route({ + responses: { + 200: { + body: "ApplicationCommandListResponse", + }, + }, + }), + async (req: Request, res: Response) => { + const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); - if (!applicationExists) { - res.status(404).send({ code: 404, message: "Unknown application" }); - return; - } + if (!applicationExists) { + res.status(404).send({ code: 404, message: "Unknown application" }); + return; + } - const command = await ApplicationCommand.find({ where: { application_id: req.params.application_id as string } }); - res.send(command); -}); + const commands = await ApplicationCommand.find({ where: { application_id: req.params.application_id as string } }); + res.send(commands.map((c) => c.toApplicationCommandResponse(req.user.settings?.locale)) satisfies ApplicationCommandListResponse); + }, +); router.post( "/", route({ requestBody: "ApplicationCommandCreateSchema", + responses: { + 200: { + body: "ApplicationCommandResponse", + }, + }, }), async (req: Request, res: Response) => { const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); @@ -65,8 +80,7 @@ router.post( }); } - const commandForDb: ApplicationCommandSchema = { - application_id: req.params.application_id as string, + const commandForDb: Partial<ApplicationCommand> = { name: body.name.trim(), name_localizations: body.name_localizations, description: body.description?.trim() || "", @@ -86,13 +100,23 @@ router.post( const commandExists = await ApplicationCommand.exists({ where: { application_id: req.params.application_id as string, name: body.name.trim() } }); if (commandExists) { - await ApplicationCommand.update({ application_id: req.params.application_id as string, name: body.name.trim() }, commandForDb); + await ApplicationCommand.update({ application_id: req.params.application_id as string, name: body.name.trim(), guild_id: IsNull() }, commandForDb); } else { commandForDb.id = Snowflake.generate(); // Have to be done that way so the id doesn't change - await ApplicationCommand.save(commandForDb); + await ApplicationCommand.save({ + ...commandForDb, + application_id: req.params.application_id as string, + }); } - res.send(body); + const resultingCommand = await ApplicationCommand.findOneOrFail({ + where: { + application_id: req.params.application_id as string, + name: body.name.trim(), + version: commandForDb.version, + }, + }); + res.send(resultingCommand.toApplicationCommandResponse()); }, ); @@ -100,6 +124,11 @@ router.put( "/", route({ requestBody: "BulkApplicationCommandCreateSchema", + responses: { + 200: { + body: "ApplicationCommandListResponse", + }, + }, }), async (req: Request, res: Response) => { const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); @@ -121,6 +150,8 @@ router.put( await ApplicationCommand.delete({ application_id: req.params.application_id as string, guild_id: IsNull(), id: command.id }); } + const resultingCommands: ApplicationCommand[] = []; + for (const command of body) { if (!command.type) { command.type = 1; @@ -135,8 +166,7 @@ router.put( }); } - const commandForDb: ApplicationCommandSchema = { - application_id: req.params.application_id as string, + const commandForDb: Partial<ApplicationCommand> = { name: command.name.trim(), name_localizations: command.name_localizations, description: command.description?.trim() || "", @@ -154,16 +184,25 @@ router.put( }; const commandExists = await ApplicationCommand.exists({ where: { application_id: req.params.application_id as string, name: command.name.trim() } }); + const commandKey = { application_id: req.params.application_id as string, name: command.name.trim(), guild_id: IsNull() }; if (commandExists) { - await ApplicationCommand.update({ application_id: req.params.application_id as string, name: command.name.trim() }, commandForDb); + await ApplicationCommand.update(commandKey, commandForDb); } else { commandForDb.id = Snowflake.generate(); // Have to be done that way so the id doesn't change - await ApplicationCommand.save(commandForDb); + await ApplicationCommand.save({ + ...commandForDb, + application_id: req.params.application_id as string, + }); } + + const resultingCommand = await ApplicationCommand.findOneOrFail({ + where: commandKey, + }); + resultingCommands.push(resultingCommand); } - res.send(body); + res.send(resultingCommands.map((c) => c.toApplicationCommandResponse()) satisfies ApplicationCommandListResponse); }, ); diff --git a/src/api/routes/applications/#application_id/guilds/#guild_id/commands/#command_id/index.ts b/src/api/routes/applications/#application_id/guilds/#guild_id/commands/#command_id/index.ts
index eea17006f..e5960b754 100644 --- a/src/api/routes/applications/#application_id/guilds/#guild_id/commands/#command_id/index.ts +++ b/src/api/routes/applications/#application_id/guilds/#guild_id/commands/#command_id/index.ts
@@ -17,6 +17,7 @@ */ import { Request, Response, Router } from "express"; +import { FindOptionsWhere } from "typeorm"; import { route } from "@spacebar/api/middlewares"; import { Application, ApplicationCommand, Guild, Member } from "@spacebar/database"; import { Config, FieldErrors, Snowflake } from "@spacebar/util"; @@ -24,42 +25,57 @@ import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@space const router = Router({ mergeParams: true }); -router.get("/", route({}), async (req: Request, res: Response) => { - const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); +router.get( + "/", + route({ + responses: { + 200: { + body: "ApplicationCommandResponse", + }, + }, + }), + async (req: Request, res: Response) => { + const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); - if (!applicationExists) { - res.status(404).send({ code: 404, message: "Unknown application" }); - return; - } + if (!applicationExists) { + res.status(404).send({ code: 404, message: "Unknown application" }); + return; + } - const guildExists = await Guild.exists({ where: { id: req.params.guild_id as string } }); + const guildExists = await Guild.exists({ where: { id: req.params.guild_id as string } }); - if (!guildExists) { - res.status(404).send({ code: 404, message: "Unknown Server" }); - return; - } + if (!guildExists) { + res.status(404).send({ code: 404, message: "Unknown Server" }); + return; + } - if (!(await Member.exists({ where: { id: req.params.application_id as string, guild_id: req.params.guild_id as string } }))) { - res.status(401).send({ code: 401, message: "Missing Access" }); - return; - } + if (!(await Member.exists({ where: { id: req.params.application_id as string, guild_id: req.params.guild_id as string } }))) { + res.status(401).send({ code: 401, message: "Missing Access" }); + return; + } - const command = await ApplicationCommand.findOne({ - where: { application_id: req.params.application_id as string, id: req.params.command_id as string, guild_id: req.params.guild_id as string }, - }); + const command = await ApplicationCommand.findOne({ + where: { application_id: req.params.application_id as string, id: req.params.command_id as string, guild_id: req.params.guild_id as string }, + }); - if (!command) { - res.status(404).send({ code: 404, message: "Unknown application command" }); - return; - } + if (!command) { + res.status(404).send({ code: 404, message: "Unknown application command" }); + return; + } - res.send(command); -}); + res.send(command.toApplicationCommandResponse(req.user.settings?.locale)); + }, +); router.patch( "/", route({ requestBody: "ApplicationCommandCreateSchema", + responses: { + 200: { + body: "ApplicationCommandResponse", + }, + }, }), async (req: Request, res: Response) => { const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); @@ -96,8 +112,7 @@ router.patch( }); } - const commandForDb: ApplicationCommandSchema = { - application_id: req.params.application_id as string, + const commandForDb: Partial<ApplicationCommand> = { name: body.name.trim(), name_localizations: body.name_localizations, description: body.description?.trim() || "", @@ -114,54 +129,66 @@ router.patch( version: Snowflake.generate(), }; - const commandExists = await ApplicationCommand.exists({ - where: { application_id: req.params.application_id as string, guild_id: req.params.guild_id as string, id: req.params.command_id as string, name: body.name.trim() }, - }); + const commandKey: FindOptionsWhere<ApplicationCommand> = { + application_id: req.params.application_id as string, + guild_id: req.params.guild_id as string, + id: req.params.command_id as string, + name: body.name.trim(), + }; + + const commandExists = await ApplicationCommand.exists({ where: commandKey }); if (!commandExists) { res.status(404).send({ code: 404, message: "Unknown application command" }); return; } - await ApplicationCommand.update( - { application_id: req.params.application_id as string, guild_id: req.params.guild_id as string, id: req.params.command_id as string, name: body.name.trim() }, - commandForDb, - ); - res.send(commandForDb); + await ApplicationCommand.update(commandKey, commandForDb); + const resultingCommand = await ApplicationCommand.findOneOrFail({ where: commandKey }); + + res.send(resultingCommand.toApplicationCommandResponse()); }, ); -router.delete("/", route({}), async (req: Request, res: Response) => { - const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); +router.delete( + "/", + route({ + responses: { + 204: {}, + }, + }), + async (req: Request, res: Response) => { + const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); - if (!applicationExists) { - res.status(404).send({ code: 404, message: "Unknown application" }); - return; - } + if (!applicationExists) { + res.status(404).send({ code: 404, message: "Unknown application" }); + return; + } - const guildExists = await Guild.exists({ where: { id: req.params.guild_id as string } }); + const guildExists = await Guild.exists({ where: { id: req.params.guild_id as string } }); - if (!guildExists) { - res.status(404).send({ code: 404, message: "Unknown Server" }); - return; - } + if (!guildExists) { + res.status(404).send({ code: 404, message: "Unknown Server" }); + return; + } - if (!(await Member.exists({ where: { id: req.params.application_id as string, guild_id: req.params.guild_id as string } }))) { - res.status(401).send({ code: 401, message: "Missing Access" }); - return; - } + if (!(await Member.exists({ where: { id: req.params.application_id as string, guild_id: req.params.guild_id as string } }))) { + res.status(401).send({ code: 401, message: "Missing Access" }); + return; + } - const commandExists = await ApplicationCommand.exists({ - where: { application_id: req.params.application_id as string, guild_id: req.params.guild_id as string, id: req.params.command_id as string }, - }); + const commandExists = await ApplicationCommand.exists({ + where: { application_id: req.params.application_id as string, guild_id: req.params.guild_id as string, id: req.params.command_id as string }, + }); - if (!commandExists) { - res.status(404).send({ code: 404, message: "Unknown application command" }); - return; - } + if (!commandExists) { + res.status(404).send({ code: 404, message: "Unknown application command" }); + return; + } - await ApplicationCommand.delete({ application_id: req.params.application_id as string, guild_id: req.params.guild_id as string, id: req.params.command_id as string }); - res.sendStatus(204); -}); + await ApplicationCommand.delete({ application_id: req.params.application_id as string, guild_id: req.params.guild_id as string, id: req.params.command_id as string }); + res.sendStatus(204); + }, +); export default router; diff --git a/src/api/routes/applications/#application_id/guilds/#guild_id/commands/index.ts b/src/api/routes/applications/#application_id/guilds/#guild_id/commands/index.ts
index 520ca9995..a9dc72c6e 100644 --- a/src/api/routes/applications/#application_id/guilds/#guild_id/commands/index.ts +++ b/src/api/routes/applications/#application_id/guilds/#guild_id/commands/index.ts
@@ -17,41 +17,57 @@ */ import { Request, Response, Router } from "express"; +import { FindOptionsWhere } from "typeorm"; import { route } from "@spacebar/api/middlewares"; import { Application, ApplicationCommand, Guild, Member } from "@spacebar/database"; import { Config, FieldErrors, Snowflake } from "@spacebar/util"; -import { ApplicationCommandCreateSchema, ApplicationCommandSchema } from "@spacebar/schemas"; +import { ApplicationCommandCreateSchema, ApplicationCommandSchema, ApplicationCommandListResponse } from "@spacebar/schemas"; const router = Router({ mergeParams: true }); -router.get("/", route({}), async (req: Request, res: Response) => { - const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); +router.get( + "/", + route({ + responses: { + 200: { + body: "ApplicationCommandResponse", + }, + }, + }), + async (req: Request, res: Response) => { + const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); - if (!applicationExists) { - res.status(404).send({ code: 404, message: "Unknown application" }); - return; - } + if (!applicationExists) { + res.status(404).send({ code: 404, message: "Unknown application" }); + return; + } - const guildExists = await Guild.exists({ where: { id: req.params.guild_id as string } }); + const guildExists = await Guild.exists({ where: { id: req.params.guild_id as string } }); - if (!guildExists) { - res.status(404).send({ code: 404, message: "Unknown Server" }); - return; - } + if (!guildExists) { + res.status(404).send({ code: 404, message: "Unknown Server" }); + return; + } - if (!(await Member.exists({ where: { id: req.params.application_id as string, guild_id: req.params.guild_id as string } }))) { - res.status(401).send({ code: 401, message: "Missing Access" }); - return; - } + if (!(await Member.exists({ where: { id: req.params.application_id as string, guild_id: req.params.guild_id as string } }))) { + res.status(401).send({ code: 401, message: "Missing Access" }); + return; + } - const command = await ApplicationCommand.find({ where: { application_id: req.params.application_id as string, guild_id: req.params.guild_id as string } }); - res.send(command); -}); + const command = await ApplicationCommand.find({ where: { application_id: req.params.application_id as string, guild_id: req.params.guild_id as string } }); + res.send(command); + }, +); router.post( "/", route({ requestBody: "ApplicationCommandCreateSchema", + responses: { + 200: { + body: "ApplicationCommandResponse", + }, + }, }), async (req: Request, res: Response) => { const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); @@ -88,8 +104,7 @@ router.post( }); } - const commandForDb: ApplicationCommandSchema = { - application_id: req.params.application_id as string, + const commandForDb: Partial<ApplicationCommand> = { guild_id: req.params.guild_id as string, name: body.name.trim(), name_localizations: body.name_localizations, @@ -115,7 +130,10 @@ router.post( await ApplicationCommand.update({ application_id: req.params.application_id as string, guild_id: req.params.guild_id as string, name: body.name.trim() }, commandForDb); } else { commandForDb.id = Snowflake.generate(); // Have to be done that way so the id doesn't change - await ApplicationCommand.save(commandForDb); + await ApplicationCommand.save({ + ...commandForDb, + application_id: req.params.application_id as string, + }); } res.send(body); @@ -126,6 +144,11 @@ router.put( "/", route({ requestBody: "BulkApplicationCommandCreateSchema", + responses: { + 200: { + body: "ApplicationCommandListResponse", + }, + }, }), async (req: Request, res: Response) => { const applicationExists = await Application.exists({ where: { id: req.params.application_id as string } }); @@ -158,6 +181,7 @@ router.put( for (const command of commandsNotInArray) { await ApplicationCommand.delete({ application_id: req.params.application_id as string, guild_id: req.params.guild_id as string, id: command.id }); } + const resultingCommands: ApplicationCommand[] = []; for (const command of body) { if (!command.type) { @@ -173,8 +197,7 @@ router.put( }); } - const commandForDb: ApplicationCommandSchema = { - application_id: req.params.application_id as string, + const commandForDb: Partial<ApplicationCommand> = { guild_id: req.params.guild_id as string, name: command.name.trim(), name_localizations: command.name_localizations, @@ -192,19 +215,29 @@ router.put( version: Snowflake.generate(), }; - const commandExists = await ApplicationCommand.exists({ - where: { application_id: req.params.application_id as string, guild_id: req.params.guild_id as string, name: command.name }, - }); + const commandKey: FindOptionsWhere<ApplicationCommand> = { + application_id: req.params.application_id as string, + guild_id: req.params.guild_id as string, + name: command.name, + }; + + const commandExists = await ApplicationCommand.exists({ where: commandKey }); if (commandExists) { - await ApplicationCommand.update({ application_id: req.params.application_id as string, guild_id: req.params.guild_id as string, name: command.name }, commandForDb); + await ApplicationCommand.update(commandKey, commandForDb); } else { commandForDb.id = Snowflake.generate(); // Have to be done that way so the id doesn't change - await ApplicationCommand.save(commandForDb); + await ApplicationCommand.save({ + ...commandForDb, + application_id: req.params.application_id as string, + }); } + + const resultingCommand = await ApplicationCommand.findOneOrFail({ where: commandKey }); + resultingCommands.push(resultingCommand); } - res.send(body); + res.send(resultingCommands.map((c) => c.toApplicationCommandResponse()) satisfies ApplicationCommandListResponse); }, ); diff --git a/src/api/routes/guilds/#guild_id/application-command-index.ts b/src/api/routes/guilds/#guild_id/application-command-index.ts
index 10f404e47..7699f93bc 100644 --- a/src/api/routes/guilds/#guild_id/application-command-index.ts +++ b/src/api/routes/guilds/#guild_id/application-command-index.ts
@@ -21,72 +21,86 @@ import { IsNull } from "typeorm"; import { route } from "@spacebar/api/middlewares"; import { Application, ApplicationCommand, Member } from "@spacebar/database"; import { Snowflake } from "@spacebar/util"; -import { ApplicationCommandSchema, ApplicationCommandType } from "@spacebar/schemas"; +import { ApplicationCommandSchema, ApplicationCommandType, ApplicationCommandResponse, ApplicationCommandIndexResponse } from "@spacebar/schemas"; const router = Router({ mergeParams: true }); -router.get("/", route({}), async (req: Request, res: Response) => { - const members = await Member.find({ where: { guild_id: req.params.guild_id as string, user: { bot: true } } }); - const applications: Application[] = []; +router.get( + "/", + route({ + responses: { + 200: { + body: "ApplicationCommandIndexResponse", + }, + }, + }), + async (req: Request, res: Response) => { + const members = await Member.find({ where: { guild_id: req.params.guild_id as string, user: { bot: true } } }); + const applications: Application[] = []; - for (const member of members) { - const app = await Application.findOne({ where: { id: member.id } }); - if (app) applications.push(app); - } + for (const member of members) { + const app = await Application.findOne({ where: { id: member.id } }); + if (app) applications.push(app); + } - const applicationsSendable = []; + const applicationsSendable = []; - for (const application of applications) { - applicationsSendable.push({ - bot_id: application.bot?.id, - description: application.description, - flags: application.flags, - icon: application.icon, - id: application.id, - name: application.name, - }); - } + for (const application of applications) { + // applicationsSendable.push({ + // bot_id: application.bot?.id, + // description: application.description, + // flags: application.flags, + // icon: application.icon, + // id: application.id, + // name: application.name, + // }); + applicationsSendable.push(application.toCommandIndexApplication()); + } - const applicationCommands: ApplicationCommand[][] = []; + const applicationCommands: ApplicationCommand[][] = []; - for (const application of applications) { - applicationCommands.push(await ApplicationCommand.find({ where: { application_id: application.id, guild_id: IsNull() } })); - applicationCommands.push(await ApplicationCommand.find({ where: { application_id: application.id, guild_id: req.params.guild_id as string } })); - } + for (const application of applications) { + applicationCommands.push(await ApplicationCommand.find({ where: { application_id: application.id, guild_id: IsNull() } })); + applicationCommands.push(await ApplicationCommand.find({ where: { application_id: application.id, guild_id: req.params.guild_id as string } })); + } - const applicationCommandsSendable: ApplicationCommandSchema[] = []; + const applicationCommandsSendable: ApplicationCommandResponse[] = []; - for (const command of applicationCommands.flat()) { - applicationCommandsSendable.push({ - id: command.id, - type: command.type, - application_id: command.application_id, - guild_id: command.guild_id, - name: command.name, - name_localizations: command.name_localizations, - name_localized: (command.name_localizations && req.user.settings?.locale ? command.name_localizations[req.user.settings.locale] : null) ?? command.name, - description: command.description, - description_localizations: command.description_localizations, - description_localized: - (command.description_localizations && req.user.settings?.locale ? command.description_localizations[req.user.settings.locale] : null) ?? command.description, - options: command.type === ApplicationCommandType.CHAT_INPUT ? command.options : undefined, - default_member_permissions: command.default_member_permissions, - dm_permission: command.dm_permission, - permissions: command.permissions, - nsfw: command.nsfw, - integration_types: command.integration_types, - global_popularity_rank: command.global_popularity_rank, - contexts: command.contexts, - version: command.version, - handler: command.handler, - }); - } + for (const command of applicationCommands.flat()) { + // TODO: fall back to this if we fucked up ig? + // applicationCommandsSendable.push({ + // id: command.id, + // type: command.type, + // application_id: command.application_id, + // guild_id: command.guild_id, + // name: command.name, + // name_localizations: command.name_localizations, + // name_localized: (command.name_localizations && req.user.settings?.locale ? command.name_localizations[req.user.settings.locale] : null) ?? command.name, + // description: command.description, + // description_localizations: command.description_localizations, + // description_localized: + // (command.description_localizations && req.user.settings?.locale ? command.description_localizations[req.user.settings.locale] : null) ?? command.description, + // options: command.type === ApplicationCommandType.CHAT_INPUT ? command.options : undefined, + // default_member_permissions: command.default_member_permissions, + // dm_permission: command.dm_permission, + // permissions: command.permissions, + // nsfw: command.nsfw, + // integration_types: command.integration_types, + // global_popularity_rank: command.global_popularity_rank, + // contexts: command.contexts, + // version: command.version, + // handler: command.handler, + // }); - res.send({ - applications: applicationsSendable, - application_commands: applicationCommandsSendable, - version: Snowflake.generate(), - }); -}); + applicationCommandsSendable.push(command.toApplicationCommandResponse(req.user.settings?.locale)); + } + + res.send({ + applications: applicationsSendable, + application_commands: applicationCommandsSendable, + version: Snowflake.generate(), + } satisfies ApplicationCommandIndexResponse); + }, +); export default router; diff --git a/src/database/entities/Application.ts b/src/database/entities/Application.ts
index 558d6469a..25e8c7558 100644 --- a/src/database/entities/Application.ts +++ b/src/database/entities/Application.ts
@@ -17,6 +17,7 @@ */ import { Column, Entity, JoinColumn, ManyToOne, OneToMany, OneToOne, RelationId } from "typeorm"; +import { ApplicationCommandIndexApplication } from "@spacebar/schemas"; import { BaseClass } from "./BaseClass"; import { Team } from "./Team"; import { User } from "./User"; @@ -148,4 +149,18 @@ export class Application extends BaseClass { onDelete: "CASCADE", }) emojis: Emoji[]; + + toCommandIndexApplication(): ApplicationCommandIndexApplication { + return { + id: this.id, + name: this.name, + description: this.description, + icon: this.icon ?? null, + permissions: undefined, // TODO + bot: this.bot?.toPartialUser(), + bot_id: this.bot?.id ?? this.id, // TODO HACK: this is uh, an assumption as bot users are created with the app's id + flags: this.flags.toString(), + embedded_activity_config: undefined, + } satisfies ApplicationCommandIndexApplication; + } } diff --git a/src/database/entities/ApplicationCommand.ts b/src/database/entities/ApplicationCommand.ts
index e22e5f417..d906f554a 100644 --- a/src/database/entities/ApplicationCommand.ts +++ b/src/database/entities/ApplicationCommand.ts
@@ -18,15 +18,17 @@ import { Column, Entity } from "typeorm"; import { BaseClass } from "./BaseClass"; -import type { +import { ApplicationCommandHandlerType, ApplicationCommandOption, ApplicationCommandIndexPermissions, Snowflake, ApplicationIntegrationType, InteractionContextType, + ApplicationCommandResponse, } from "@spacebar/schemas"; import { ApplicationCommandType } from "@spacebar/schemas/api/bots/ApplicationCommandSchema"; +import { getLocalizedValue } from "@spacebar/util"; @Entity({ name: "application_commands", @@ -85,4 +87,29 @@ export class ApplicationCommand extends BaseClass { @Column({ default: 0 }) handler?: ApplicationCommandHandlerType; + + toApplicationCommandResponse(locale?: string): ApplicationCommandResponse { + return { + id: this.id, + type: this.type, + application_id: this.application_id, + guild_id: this.guild_id, + name: this.name, + name_localizations: this.name_localizations, + name_localized: getLocalizedValue(locale, this.name_localizations, this.name), + description: this.description, + description_localizations: this.description_localizations, + description_localized: getLocalizedValue(locale, this.description_localizations, this.description), + options: this.type === ApplicationCommandType.CHAT_INPUT ? this.options : undefined, + default_member_permissions: this.default_member_permissions, + dm_permission: this.dm_permission, + permissions: this.permissions, + nsfw: this.nsfw, + integration_types: this.integration_types, + global_popularity_rank: this.global_popularity_rank, + contexts: this.contexts, + version: this.version, + handler: this.handler, + } satisfies ApplicationCommandResponse; + } } diff --git a/src/schemas/Validator.ts b/src/schemas/Validator.ts
index 73672c183..8dc265104 100644 --- a/src/schemas/Validator.ts +++ b/src/schemas/Validator.ts
@@ -79,7 +79,7 @@ export function getInvalidSchemaValues(data: object, errors: typeof ajv.errors): else if (e.keyword == "required") return { instancePath: instancePath + `/${e.params.missingProperty}`, value: "<<undefined>>", keyword: e.keyword }; else if (e.keyword == "anyOf") return { instancePath: instancePath, value: "<<irrelevant>>", keyword: e.keyword }; - console.log("Resolving:", { instancePath, eInstancePath: e.instancePath, eKeyword: e.keyword, eParams: e.params }); + // console.log("Resolving:", { instancePath, eInstancePath: e.instancePath, eKeyword: e.keyword, eParams: e.params }); return { ...getInvalidSchemaValue(data, instancePath), keyword: e.keyword }; }) .filter((x) => x != undefined); diff --git a/src/schemas/api/bots/ApplicationCommandSchema.ts b/src/schemas/api/bots/ApplicationCommandSchema.ts
index 4ffc37a25..f1de72a91 100644 --- a/src/schemas/api/bots/ApplicationCommandSchema.ts +++ b/src/schemas/api/bots/ApplicationCommandSchema.ts
@@ -21,14 +21,10 @@ import { ApplicationCommandOption, Snowflake, StringStringDictionary } from "@sp export interface ApplicationCommandSchema { id?: Snowflake; type?: ApplicationCommandType; - application_id: Snowflake; - guild_id?: Snowflake; name: string; name_localizations?: StringStringDictionary; - name_localized?: string | null; description: string; description_localizations?: StringStringDictionary; - description_localized?: string | null; options?: ApplicationCommandOption[]; default_member_permissions: string | null; /* @@ -38,12 +34,21 @@ export interface ApplicationCommandSchema { permissions?: ApplicationCommandIndexPermissions; nsfw?: boolean; integration_types?: ApplicationIntegrationType[]; - global_popularity_rank?: number; contexts?: InteractionContextType[]; version: Snowflake; handler?: ApplicationCommandHandlerType; } +export type ApplicationCommandListResponse = ApplicationCommandResponse[]; +export interface ApplicationCommandResponse extends ApplicationCommandSchema { + id: Snowflake; + application_id: Snowflake; + guild_id?: Snowflake; + name_localized?: string | null; + description_localized?: string | null; + global_popularity_rank?: number; +} + export interface ApplicationCommandIndexPermissions { user?: boolean; roles?: Record<Snowflake, boolean>; diff --git a/src/schemas/api/developers/Application.ts b/src/schemas/api/developers/Application.ts
index 62fc818b8..1a4e45a17 100644 --- a/src/schemas/api/developers/Application.ts +++ b/src/schemas/api/developers/Application.ts
@@ -16,10 +16,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -import { ApplicationSku, PartialUser, Snowflake, Team } from "@spacebar/schemas"; +import { ApplicationSku, PartialUser, Snowflake, Team, StringStringDictionary, ChannelType, ApplicationCommandResponse } from "@spacebar/schemas"; export interface ApplicationCommand { - id: string; + id: Snowflake; application_id: string; name: string; description: string; @@ -29,14 +29,23 @@ export interface ApplicationCommand { export interface ApplicationCommandOption { type: ApplicationCommandOptionType; name: string; + name_localizations?: StringStringDictionary; description: string; + description_localizations?: StringStringDictionary; required?: boolean; + autocomplete?: boolean; + min_length?: number; + max_length?: number; + min_value?: number; + max_value?: number; + channel_types?: ChannelType[]; choices?: ApplicationCommandOptionChoice[]; options?: ApplicationCommandOption[]; } export interface ApplicationCommandOptionChoice { name: string; + name_localizations?: StringStringDictionary; value: string | number; } @@ -63,6 +72,24 @@ export interface ApplicationCommandInteractionDataOption { options?: ApplicationCommandInteractionDataOption[]; } +export interface ApplicationCommandIndexApplication { + id: Snowflake; + name: string; + description: string; + icon: string | null; + permissions?: unknown; // TODO + bot?: PartialUser; + bot_id?: Snowflake; + flags: string; + embedded_activity_config?: Pick<EmbeddedActivityConfig, "supported_platforms">; // TODO: is this correct? +} + +export interface ApplicationCommandIndexResponse { + applications: ApplicationCommandIndexApplication[]; + application_commands: ApplicationCommandResponse[]; + version: Snowflake; +} + export interface Application { id: Snowflake; name: string; @@ -346,18 +373,22 @@ export enum EmbeddedActivityReleasePhase { } export type ApplicationAllowlistResponse = AllowlistedUser[]; + export interface AllowlistedUser { user: PartialUser; state: ApplicationMembershipState; } + export enum ApplicationMembershipState { INVITED = 1, ACCEPTED = 2, } + export interface AllowlistAddRequestSchema { username: string; discriminator?: string | null; } + export interface AllowlistAcceptSchema { token: string; } diff --git a/src/util/util/Localization.ts b/src/util/util/Localization.ts new file mode 100644
index 000000000..db77920d1 --- /dev/null +++ b/src/util/util/Localization.ts
@@ -0,0 +1,33 @@ +/* + Spacebar: A FOSS re-implementation and extension of the Discord.com backend. + Copyright (C) 2026 Spacebar and Spacebar Contributors + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. +*/ + +export function getLocalizedValue(locale?: string, localizations?: Record<string, string>, fallback?: string): string { + if (!localizations) { + if (fallback) return fallback; + throw new Error("getLocalizedValue: neither localizations nor flalback were provided!"); + } + if (!locale) { + if (fallback) return fallback; + if ("en-US" in localizations) return localizations["en-US"]; + if ("en-GB" in localizations) return localizations["en-GB"]; + throw new Error("getLocalizedValue: no target locale was provided, and the localizations neither had en-US nor en-GB!"); + } + + if (locale in localizations) return localizations[locale!]; + return getLocalizedValue(undefined, localizations, undefined); // too lazy to duplicate code +} diff --git a/src/util/util/index.ts b/src/util/util/index.ts
index c21227555..9df5e1fda 100644 --- a/src/util/util/index.ts +++ b/src/util/util/index.ts
@@ -29,6 +29,7 @@ export * from "./Intents"; export * from "./InvisibleCharacters"; export * from "./JSON"; export * from "./KittyLogo"; +export * from "./Localization"; export * from "./Logo"; export * from "./MessageFlags"; export * from "./networking";