diff --git a/assets/popout.html b/assets/popout.html
new file mode 100644
index 00000000..4c012869
--- /dev/null
+++ b/assets/popout.html
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+ Discord Popout
+
+
+
+
+
+
+
+
+
diff --git a/assets/schemas.json b/assets/schemas.json
index 05650a4e..d4b4aaaa 100644
--- a/assets/schemas.json
+++ b/assets/schemas.json
@@ -1,1274 +1,1611 @@
{
- "ActivitySchema": {
- "type": "object",
- "properties": {
- "afk": {
- "type": "boolean"
- },
- "status": {},
- "activities": {
- "type": "array",
- "items": {}
- },
- "since": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": ["afk", "status"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "BanCreateSchema": {
- "type": "object",
- "properties": {
- "delete_message_days": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "BanModeratorSchema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "user_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "executor_id": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["executor_id", "guild_id", "id", "user_id"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "BanRegistrySchema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "user_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "executor_id": {
- "type": "string"
- },
- "ip": {
- "type": "string"
- },
- "reason": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["executor_id", "guild_id", "id", "user_id"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "BulkDeleteSchema": {
- "type": "object",
- "properties": {
- "messages": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "required": ["messages"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ts.server.TypingInstallerResponse": {
- "type": "object",
- "properties": {
- "kind": {
- "enum": [
- "action::invalidate",
- "action::packageInstalled",
- "action::set",
- "event::beginInstallTypes",
- "event::endInstallTypes",
- "event::initializationFailed",
- "event::typesRegistry"
- ],
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["kind"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ts.server.PackageInstalledResponse": {
- "type": "object",
- "properties": {
- "kind": {
- "type": "string",
- "enum": ["action::packageInstalled"]
- },
- "success": {
- "type": "boolean"
- },
- "message": {
- "type": "string"
- },
- "projectName": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["kind", "message", "projectName", "success"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ts.server.InitializationFailedResponse": {
- "type": "object",
- "properties": {
- "kind": {
- "type": "string",
- "enum": ["event::initializationFailed"]
- },
- "message": {
- "type": "string"
- },
- "stack": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["kind", "message"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ts.server.ProjectResponse": {
- "type": "object",
- "properties": {
- "projectName": {
- "type": "string"
- },
- "kind": {
- "enum": [
- "action::invalidate",
- "action::packageInstalled",
- "action::set",
- "event::beginInstallTypes",
- "event::endInstallTypes",
- "event::initializationFailed",
- "event::typesRegistry"
- ],
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["kind", "projectName"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ChannelPermissionOverwriteSchema": {
- "type": "object",
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ChannelReorderSchema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "position": {
- "type": "integer"
- },
- "lock_permissions": {
- "type": "boolean"
- },
- "parent_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["id"]
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "DmChannelCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "recipients": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "required": ["recipients"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "EmojiCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "image": {
- "type": "string"
- },
- "require_colons": {
- "type": ["null", "boolean"]
- },
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "required": ["image"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "EmojiModifySchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "GuildCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "maxLength": 100,
- "type": "string"
- },
- "region": {
- "type": "string"
- },
- "icon": {
- "type": ["null", "string"]
- },
- "channels": {
- "type": "array",
- "items": {
- "$ref": "#/definitions/ChannelModifySchema"
- }
- },
- "guild_template_code": {
- "type": "string"
- },
- "system_channel_id": {
- "type": "string"
- },
- "rules_channel_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["name"],
- "definitions": {
- "ChannelModifySchema": {
- "type": "object",
- "properties": {
- "name": {
- "maxLength": 100,
- "type": "string"
- },
- "type": {
- "enum": [0, 1, 10, 11, 12, 13, 14, 15, 2, 255, 3, 33, 34, 35, 4, 5, 6, 64, 7, 8, 9],
- "type": "number"
- },
- "topic": {
- "type": "string"
- },
- "icon": {
- "type": ["null", "string"]
- },
- "bitrate": {
- "type": "integer"
- },
- "user_limit": {
- "type": "integer"
- },
- "rate_limit_per_user": {
- "type": "integer"
- },
- "position": {
- "type": "integer"
- },
- "permission_overwrites": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "$ref": "#/definitions/ChannelPermissionOverwriteType"
- },
- "allow": {
- "type": "string"
- },
- "deny": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["allow", "deny", "id", "type"]
- }
- },
- "parent_id": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "nsfw": {
- "type": "boolean"
- },
- "rtc_region": {
- "type": "string"
- },
- "default_auto_archive_duration": {
- "type": "integer"
- },
- "flags": {
- "type": "integer"
- },
- "default_thread_rate_limit_per_user": {
- "type": "integer"
- }
- },
- "additionalProperties": false
- },
- "ChannelPermissionOverwriteType": {
- "enum": [0, 1, 2],
- "type": "number"
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "GuildTemplateCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "avatar": {
- "type": ["null", "string"]
- }
- },
- "additionalProperties": false,
- "required": ["name"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "GuildUpdateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "banner": {
- "type": ["null", "string"]
- },
- "splash": {
- "type": ["null", "string"]
- },
- "description": {
- "type": "string"
- },
- "features": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "verification_level": {
- "type": "integer"
- },
- "default_message_notifications": {
- "type": "integer"
- },
- "system_channel_flags": {
- "type": "integer"
- },
- "explicit_content_filter": {
- "type": "integer"
- },
- "public_updates_channel_id": {
- "type": "string"
- },
- "afk_timeout": {
- "type": "integer"
- },
- "afk_channel_id": {
- "type": "string"
- },
- "preferred_locale": {
- "type": "string"
- },
- "premium_progress_bar_enabled": {
- "type": "boolean"
- },
- "region": {
- "type": "string"
- },
- "icon": {
- "type": ["null", "string"]
- },
- "guild_template_code": {
- "type": "string"
- },
- "system_channel_id": {
- "type": "string"
- },
- "rules_channel_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "GuildUpdateWelcomeScreenSchema": {
- "type": "object",
- "properties": {
- "welcome_channels": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "channel_id": {
- "type": "string"
- },
- "description": {
- "type": "string"
- },
- "emoji_id": {
- "type": "string"
- },
- "emoji_name": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["channel_id", "description", "emoji_name"]
- }
- },
- "enabled": {
- "type": "boolean"
- },
- "description": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "IdentifySchema": {
- "type": "object",
- "properties": {
- "token": {
- "type": "string"
- },
- "properties": {
- "type": "object",
- "properties": {
- "os": {
- "type": "string"
- },
- "os_atch": {
- "type": "string"
- },
- "browser": {
- "type": "string"
- },
- "device": {
- "type": "string"
- },
- "$os": {
- "type": "string"
- },
- "$browser": {
- "type": "string"
- },
- "$device": {
- "type": "string"
- },
- "browser_user_agent": {
- "type": "string"
- },
- "browser_version": {
- "type": "string"
- },
- "os_version": {
- "type": "string"
- },
- "referrer": {
- "type": "string"
- },
- "referring_domain": {
- "type": "string"
- },
- "referrer_current": {
- "type": "string"
- },
- "referring_domain_current": {
- "type": "string"
- },
- "release_channel": {
- "enum": ["canary", "dev", "ptb", "stable"],
- "type": "string"
- },
- "client_build_number": {
- "type": "integer"
- },
- "client_event_source": {},
- "client_version": {
- "type": "string"
- },
- "system_locale": {
- "type": "string"
- }
- },
- "additionalProperties": false
- },
- "intents": {
- "type": "string"
- },
- "presence": {
- "$ref": "#/definitions/ActivitySchema"
- },
- "compress": {
- "type": "boolean"
- },
- "large_threshold": {
- "type": "integer"
- },
- "shard": {
- "type": "array",
- "items": [
- {
- "type": "integer"
- },
- {
- "type": "integer"
- }
- ],
- "minItems": 2,
- "maxItems": 2
- },
- "guild_subscriptions": {
- "type": "boolean"
- },
- "capabilities": {
- "type": "integer"
- },
- "client_state": {
- "type": "object",
- "properties": {
- "guild_hashes": {},
- "highest_last_message_id": {
- "type": "string"
- },
- "read_state_version": {
- "type": "integer"
- },
- "user_guild_settings_version": {
- "type": "integer"
- },
- "user_settings_version": {
- "type": "integer"
- }
- },
- "additionalProperties": false
- },
- "v": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": ["properties", "token"],
- "definitions": {
- "ActivitySchema": {
- "type": "object",
- "properties": {
- "afk": {
- "type": "boolean"
- },
- "status": {},
- "activities": {
- "type": "array",
- "items": {}
- },
- "since": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": ["afk", "status"]
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "InviteCreateSchema": {
- "type": "object",
- "properties": {
- "target_user_id": {
- "type": "string"
- },
- "target_type": {
- "type": "string"
- },
- "validate": {
- "type": "string"
- },
- "max_age": {
- "type": "integer"
- },
- "max_uses": {
- "type": "integer"
- },
- "temporary": {
- "type": "boolean"
- },
- "unique": {
- "type": "boolean"
- },
- "target_user": {
- "type": "string"
- },
- "target_user_type": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "LoginSchema": {
- "type": "object",
- "properties": {
- "login": {
- "type": "string"
- },
- "password": {
- "type": "string"
- },
- "undelete": {
- "type": "boolean"
- },
- "captcha_key": {
- "type": "string"
- },
- "login_source": {
- "type": "string"
- },
- "gift_code_sku_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["login", "password"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "MemberChangeSchema": {
- "type": "object",
- "properties": {
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "MemberNickChangeSchema": {
- "type": "object",
- "properties": {
- "nick": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["nick"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "MessageAcknowledgeSchema": {
- "type": "object",
- "properties": {
- "manual": {
- "type": "boolean"
- },
- "mention_count": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "MessageCreateSchema": {
- "type": "object",
- "properties": {
- "type": {
- "type": "integer"
- },
- "content": {
- "type": "string"
- },
- "nonce": {
- "type": "string"
- },
- "channel_id": {
- "type": "string"
- },
- "tts": {
- "type": "boolean"
- },
- "flags": {
- "type": "string"
- },
- "embeds": {
- "type": "array",
- "items": {}
- },
- "embed": {},
- "allowed_mentions": {
- "type": "object",
- "properties": {
- "parse": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "roles": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "users": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "replied_user": {
- "type": "boolean"
- }
- },
- "additionalProperties": false
- },
- "message_reference": {
- "type": "object",
- "properties": {
- "message_id": {
- "type": "string"
- },
- "channel_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "fail_if_not_exists": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": ["channel_id", "message_id"]
- },
- "payload_json": {
- "type": "string"
- },
- "file": {},
- "attachments": {
- "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion",
- "type": "array",
- "items": {}
- },
- "sticker_ids": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "MfaCodesSchema": {
- "type": "object",
- "properties": {
- "password": {
- "type": "string"
- },
- "regenerate": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": ["password"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ModifyGuildStickerSchema": {
- "type": "object",
- "properties": {
- "name": {
- "minLength": 2,
- "maxLength": 30,
- "type": "string"
- },
- "description": {
- "maxLength": 100,
- "type": "string"
- },
- "tags": {
- "maxLength": 200,
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["name", "tags"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "PruneSchema": {
- "type": "object",
- "properties": {
- "days": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": ["days"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "PurgeSchema": {
- "type": "object",
- "properties": {
- "before": {
- "type": "string"
- },
- "after": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["after", "before"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "RegisterSchema": {
- "type": "object",
- "properties": {
- "username": {
- "minLength": 2,
- "maxLength": 32,
- "type": "string"
- },
- "password": {
- "minLength": 1,
- "maxLength": 72,
- "type": "string"
- },
- "consent": {
- "type": "boolean"
- },
- "email": {
- "format": "email",
- "type": "string"
- },
- "fingerprint": {
- "type": "string"
- },
- "invite": {
- "type": "string"
- },
- "date_of_birth": {
- "type": "string"
- },
- "gift_code_sku_id": {
- "type": "string"
- },
- "captcha_key": {
- "type": "string"
- },
- "promotional_email_opt_in": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": ["consent", "username"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "RelationshipPostSchema": {
- "type": "object",
- "properties": {
- "discriminator": {
- "type": "string"
- },
- "username": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["discriminator", "username"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "RelationshipPutSchema": {
- "type": "object",
- "properties": {
- "type": {}
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "RoleModifySchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "permissions": {
- "type": "string"
- },
- "color": {
- "type": "integer"
- },
- "hoist": {
- "type": "boolean"
- },
- "mentionable": {
- "type": "boolean"
- },
- "position": {
- "type": "integer"
- },
- "icon": {
- "type": "string"
- },
- "unicode_emoji": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "RolePositionUpdateSchema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "position": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": ["id", "position"]
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "TemplateCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["name"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "TemplateModifySchema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "description": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["name"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "TotpDisableSchema": {
- "type": "object",
- "properties": {
- "code": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["code"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "TotpEnableSchema": {
- "type": "object",
- "properties": {
- "password": {
- "type": "string"
- },
- "code": {
- "type": "string"
- },
- "secret": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["password"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "TotpSchema": {
- "type": "object",
- "properties": {
- "code": {
- "type": "string"
- },
- "ticket": {
- "type": "string"
- },
- "gift_code_sku_id": {
- "type": ["null", "string"]
- },
- "login_source": {
- "type": ["null", "string"]
- }
- },
- "additionalProperties": false,
- "required": ["code", "ticket"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "UserModifySchema": {
- "type": "object",
- "properties": {
- "username": {
- "minLength": 1,
- "maxLength": 100,
- "type": "string"
- },
- "discriminator": {
- "type": "string"
- },
- "avatar": {
- "type": ["null", "string"]
- },
- "bio": {
- "maxLength": 1024,
- "type": "string"
- },
- "accent_color": {
- "type": "integer"
- },
- "banner": {
- "type": ["null", "string"]
- },
- "password": {
- "type": "string"
- },
- "new_password": {
- "type": "string"
- },
- "code": {
- "type": "string"
- },
- "email": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "UserSettingsSchema": {
- "type": "object",
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "VanityUrlSchema": {
- "type": "object",
- "properties": {
- "code": {
- "minLength": 1,
- "maxLength": 20,
- "type": "string"
- }
- },
- "additionalProperties": false,
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "VoiceStateUpdateSchema": {
- "type": "object",
- "properties": {
- "channel_id": {
- "type": "string"
- },
- "guild_id": {
- "type": "string"
- },
- "suppress": {
- "type": "boolean"
- },
- "request_to_speak_timestamp": {
- "type": "string",
- "format": "date-time"
- },
- "self_mute": {
- "type": "boolean"
- },
- "self_deaf": {
- "type": "boolean"
- },
- "self_video": {
- "type": "boolean"
- }
- },
- "additionalProperties": false,
- "required": ["channel_id"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "WebhookCreateSchema": {
- "type": "object",
- "properties": {
- "name": {
- "maxLength": 80,
- "type": "string"
- },
- "avatar": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["name"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "WidgetModifySchema": {
- "type": "object",
- "properties": {
- "enabled": {
- "type": "boolean"
- },
- "channel_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["channel_id", "enabled"],
- "$schema": "http://json-schema.org/draft-07/schema#"
- },
- "ChannelModifySchema": {
- "type": "object",
- "properties": {
- "name": {
- "maxLength": 100,
- "type": "string"
- },
- "type": {
- "enum": [0, 1, 10, 11, 12, 13, 14, 15, 2, 255, 3, 33, 34, 35, 4, 5, 6, 64, 7, 8, 9],
- "type": "number"
- },
- "topic": {
- "type": "string"
- },
- "icon": {
- "type": ["null", "string"]
- },
- "bitrate": {
- "type": "integer"
- },
- "user_limit": {
- "type": "integer"
- },
- "rate_limit_per_user": {
- "type": "integer"
- },
- "position": {
- "type": "integer"
- },
- "permission_overwrites": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string"
- },
- "type": {
- "$ref": "#/definitions/ChannelPermissionOverwriteType"
- },
- "allow": {
- "type": "string"
- },
- "deny": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": ["allow", "deny", "id", "type"]
- }
- },
- "parent_id": {
- "type": "string"
- },
- "id": {
- "type": "string"
- },
- "nsfw": {
- "type": "boolean"
- },
- "rtc_region": {
- "type": "string"
- },
- "default_auto_archive_duration": {
- "type": "integer"
- },
- "flags": {
- "type": "integer"
- },
- "default_thread_rate_limit_per_user": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "definitions": {
- "ChannelPermissionOverwriteType": {
- "enum": [0, 1, 2],
- "type": "number"
- }
- },
- "$schema": "http://json-schema.org/draft-07/schema#"
- }
-}
+ "ActivitySchema": {
+ "type": "object",
+ "properties": {
+ "afk": {
+ "type": "boolean"
+ },
+ "status": {},
+ "activities": {
+ "type": "array",
+ "items": {}
+ },
+ "since": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "afk",
+ "status"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "BanCreateSchema": {
+ "type": "object",
+ "properties": {
+ "delete_message_days": {
+ "type": "string"
+ },
+ "reason": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "BanModeratorSchema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "executor_id": {
+ "type": "string"
+ },
+ "reason": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "executor_id",
+ "guild_id",
+ "id",
+ "user_id"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "BanRegistrySchema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "executor_id": {
+ "type": "string"
+ },
+ "ip": {
+ "type": "string"
+ },
+ "reason": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "executor_id",
+ "guild_id",
+ "id",
+ "user_id"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "BulkDeleteSchema": {
+ "type": "object",
+ "properties": {
+ "messages": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "messages"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "ChannelPermissionOverwriteSchema": {
+ "type": "object",
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "ChannelReorderSchema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "position": {
+ "type": "integer"
+ },
+ "lock_permissions": {
+ "type": "boolean"
+ },
+ "parent_id": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id"
+ ]
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "DmChannelCreateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "recipients": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "recipients"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "EmojiCreateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "image": {
+ "type": "string"
+ },
+ "require_colons": {
+ "type": [
+ "null",
+ "boolean"
+ ]
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "image"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "EmojiModifySchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "GuildCreateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "maxLength": 100,
+ "type": "string"
+ },
+ "region": {
+ "type": "string"
+ },
+ "icon": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "channels": {
+ "type": "array",
+ "items": {
+ "$ref": "#/definitions/ChannelModifySchema"
+ }
+ },
+ "guild_template_code": {
+ "type": "string"
+ },
+ "system_channel_id": {
+ "type": "string"
+ },
+ "rules_channel_id": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name"
+ ],
+ "definitions": {
+ "ChannelModifySchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "maxLength": 100,
+ "type": "string"
+ },
+ "type": {
+ "enum": [
+ 0,
+ 1,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 2,
+ 255,
+ 3,
+ 33,
+ 34,
+ 35,
+ 4,
+ 5,
+ 6,
+ 64,
+ 7,
+ 8,
+ 9
+ ],
+ "type": "number"
+ },
+ "topic": {
+ "type": "string"
+ },
+ "icon": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "bitrate": {
+ "type": "integer"
+ },
+ "user_limit": {
+ "type": "integer"
+ },
+ "rate_limit_per_user": {
+ "type": "integer"
+ },
+ "position": {
+ "type": "integer"
+ },
+ "permission_overwrites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/ChannelPermissionOverwriteType"
+ },
+ "allow": {
+ "type": "string"
+ },
+ "deny": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "allow",
+ "deny",
+ "id",
+ "type"
+ ]
+ }
+ },
+ "parent_id": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "nsfw": {
+ "type": "boolean"
+ },
+ "rtc_region": {
+ "type": "string"
+ },
+ "default_auto_archive_duration": {
+ "type": "integer"
+ },
+ "flags": {
+ "type": "integer"
+ },
+ "default_thread_rate_limit_per_user": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false
+ },
+ "ChannelPermissionOverwriteType": {
+ "enum": [
+ 0,
+ 1,
+ 2
+ ],
+ "type": "number"
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "GuildTemplateCreateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "avatar": {
+ "type": [
+ "null",
+ "string"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "GuildUpdateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "banner": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "splash": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "description": {
+ "type": "string"
+ },
+ "features": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "verification_level": {
+ "type": "integer"
+ },
+ "default_message_notifications": {
+ "type": "integer"
+ },
+ "system_channel_flags": {
+ "type": "integer"
+ },
+ "explicit_content_filter": {
+ "type": "integer"
+ },
+ "public_updates_channel_id": {
+ "type": "string"
+ },
+ "afk_timeout": {
+ "type": "integer"
+ },
+ "afk_channel_id": {
+ "type": "string"
+ },
+ "preferred_locale": {
+ "type": "string"
+ },
+ "premium_progress_bar_enabled": {
+ "type": "boolean"
+ },
+ "region": {
+ "type": "string"
+ },
+ "icon": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "guild_template_code": {
+ "type": "string"
+ },
+ "system_channel_id": {
+ "type": "string"
+ },
+ "rules_channel_id": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "GuildUpdateWelcomeScreenSchema": {
+ "type": "object",
+ "properties": {
+ "welcome_channels": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "emoji_id": {
+ "type": "string"
+ },
+ "emoji_name": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "channel_id",
+ "description",
+ "emoji_name"
+ ]
+ }
+ },
+ "enabled": {
+ "type": "boolean"
+ },
+ "description": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "IdentifySchema": {
+ "type": "object",
+ "properties": {
+ "token": {
+ "type": "string"
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "os": {
+ "type": "string"
+ },
+ "os_atch": {
+ "type": "string"
+ },
+ "browser": {
+ "type": "string"
+ },
+ "device": {
+ "type": "string"
+ },
+ "$os": {
+ "type": "string"
+ },
+ "$browser": {
+ "type": "string"
+ },
+ "$device": {
+ "type": "string"
+ },
+ "browser_user_agent": {
+ "type": "string"
+ },
+ "browser_version": {
+ "type": "string"
+ },
+ "os_version": {
+ "type": "string"
+ },
+ "referrer": {
+ "type": "string"
+ },
+ "referring_domain": {
+ "type": "string"
+ },
+ "referrer_current": {
+ "type": "string"
+ },
+ "referring_domain_current": {
+ "type": "string"
+ },
+ "release_channel": {
+ "enum": [
+ "canary",
+ "dev",
+ "ptb",
+ "stable"
+ ],
+ "type": "string"
+ },
+ "client_build_number": {
+ "type": "integer"
+ },
+ "client_event_source": {},
+ "client_version": {
+ "type": "string"
+ },
+ "system_locale": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false
+ },
+ "intents": {
+ "type": "string"
+ },
+ "presence": {
+ "$ref": "#/definitions/ActivitySchema"
+ },
+ "compress": {
+ "type": "boolean"
+ },
+ "large_threshold": {
+ "type": "integer"
+ },
+ "shard": {
+ "type": "array",
+ "items": [
+ {
+ "type": "integer"
+ },
+ {
+ "type": "integer"
+ }
+ ],
+ "minItems": 2,
+ "maxItems": 2
+ },
+ "guild_subscriptions": {
+ "type": "boolean"
+ },
+ "capabilities": {
+ "type": "integer"
+ },
+ "client_state": {
+ "type": "object",
+ "properties": {
+ "guild_hashes": {},
+ "highest_last_message_id": {
+ "type": "string"
+ },
+ "read_state_version": {
+ "type": "integer"
+ },
+ "user_guild_settings_version": {
+ "type": "integer"
+ },
+ "user_settings_version": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false
+ },
+ "v": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "properties",
+ "token"
+ ],
+ "definitions": {
+ "ActivitySchema": {
+ "type": "object",
+ "properties": {
+ "afk": {
+ "type": "boolean"
+ },
+ "status": {},
+ "activities": {
+ "type": "array",
+ "items": {}
+ },
+ "since": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "afk",
+ "status"
+ ]
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "InviteCreateSchema": {
+ "type": "object",
+ "properties": {
+ "target_user_id": {
+ "type": "string"
+ },
+ "target_type": {
+ "type": "string"
+ },
+ "validate": {
+ "type": "string"
+ },
+ "max_age": {
+ "type": "integer"
+ },
+ "max_uses": {
+ "type": "integer"
+ },
+ "temporary": {
+ "type": "boolean"
+ },
+ "unique": {
+ "type": "boolean"
+ },
+ "target_user": {
+ "type": "string"
+ },
+ "target_user_type": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "LoginSchema": {
+ "type": "object",
+ "properties": {
+ "login": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ },
+ "undelete": {
+ "type": "boolean"
+ },
+ "captcha_key": {
+ "type": "string"
+ },
+ "login_source": {
+ "type": "string"
+ },
+ "gift_code_sku_id": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "login",
+ "password"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "MemberChangeSchema": {
+ "type": "object",
+ "properties": {
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "MemberNickChangeSchema": {
+ "type": "object",
+ "properties": {
+ "nick": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "nick"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "MessageAcknowledgeSchema": {
+ "type": "object",
+ "properties": {
+ "manual": {
+ "type": "boolean"
+ },
+ "mention_count": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "MessageCreateSchema": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "integer"
+ },
+ "content": {
+ "type": "string"
+ },
+ "nonce": {
+ "type": "string"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "tts": {
+ "type": "boolean"
+ },
+ "flags": {
+ "type": "string"
+ },
+ "embeds": {
+ "type": "array",
+ "items": {}
+ },
+ "embed": {},
+ "allowed_mentions": {
+ "type": "object",
+ "properties": {
+ "parse": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "roles": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "users": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "replied_user": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false
+ },
+ "message_reference": {
+ "type": "object",
+ "properties": {
+ "message_id": {
+ "type": "string"
+ },
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "fail_if_not_exists": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "channel_id",
+ "message_id"
+ ]
+ },
+ "payload_json": {
+ "type": "string"
+ },
+ "file": {},
+ "attachments": {
+ "description": "TODO: we should create an interface for attachments\nTODO: OpenWAAO<-->attachment-style metadata conversion",
+ "type": "array",
+ "items": {}
+ },
+ "sticker_ids": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "MfaCodesSchema": {
+ "type": "object",
+ "properties": {
+ "password": {
+ "type": "string"
+ },
+ "regenerate": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "password"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "ModifyGuildStickerSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "minLength": 2,
+ "maxLength": 30,
+ "type": "string"
+ },
+ "description": {
+ "maxLength": 100,
+ "type": "string"
+ },
+ "tags": {
+ "maxLength": 200,
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name",
+ "tags"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "PruneSchema": {
+ "type": "object",
+ "properties": {
+ "days": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "days"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "PurgeSchema": {
+ "type": "object",
+ "properties": {
+ "before": {
+ "type": "string"
+ },
+ "after": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "after",
+ "before"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "RegisterSchema": {
+ "type": "object",
+ "properties": {
+ "username": {
+ "minLength": 2,
+ "maxLength": 32,
+ "type": "string"
+ },
+ "password": {
+ "minLength": 1,
+ "maxLength": 72,
+ "type": "string"
+ },
+ "consent": {
+ "type": "boolean"
+ },
+ "email": {
+ "format": "email",
+ "type": "string"
+ },
+ "fingerprint": {
+ "type": "string"
+ },
+ "invite": {
+ "type": "string"
+ },
+ "date_of_birth": {
+ "type": "string"
+ },
+ "gift_code_sku_id": {
+ "type": "string"
+ },
+ "captcha_key": {
+ "type": "string"
+ },
+ "promotional_email_opt_in": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "consent",
+ "username"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "RelationshipPostSchema": {
+ "type": "object",
+ "properties": {
+ "discriminator": {
+ "type": "string"
+ },
+ "username": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "discriminator",
+ "username"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "RelationshipPutSchema": {
+ "type": "object",
+ "properties": {
+ "type": {}
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "RoleModifySchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "permissions": {
+ "type": "string"
+ },
+ "color": {
+ "type": "integer"
+ },
+ "hoist": {
+ "type": "boolean"
+ },
+ "mentionable": {
+ "type": "boolean"
+ },
+ "position": {
+ "type": "integer"
+ },
+ "icon": {
+ "type": "string"
+ },
+ "unicode_emoji": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "RolePositionUpdateSchema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "position": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "id",
+ "position"
+ ]
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "SelectProtocolSchema": {
+ "type": "object",
+ "properties": {
+ "protocol": {
+ "enum": [
+ "udp",
+ "webrtc"
+ ],
+ "type": "string"
+ },
+ "data": {
+ "anyOf": [
+ {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string"
+ },
+ "port": {
+ "type": "integer"
+ },
+ "mode": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "address",
+ "mode",
+ "port"
+ ]
+ },
+ {
+ "type": "string"
+ }
+ ]
+ },
+ "sdp": {
+ "type": "string"
+ },
+ "codecs": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "enum": [
+ "H264",
+ "VP8",
+ "VP9",
+ "opus"
+ ],
+ "type": "string"
+ },
+ "type": {
+ "enum": [
+ "audio",
+ "video"
+ ],
+ "type": "string"
+ },
+ "priority": {
+ "type": "integer"
+ },
+ "payload_type": {
+ "type": "integer"
+ },
+ "rtx_payload_type": {
+ "type": [
+ "null",
+ "integer"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name",
+ "payload_type",
+ "priority",
+ "type"
+ ]
+ }
+ },
+ "rtc_connection_id": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "data",
+ "protocol"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "TemplateCreateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "TemplateModifySchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "TotpDisableSchema": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "code"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "TotpEnableSchema": {
+ "type": "object",
+ "properties": {
+ "password": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "secret": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "password"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "TotpSchema": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string"
+ },
+ "ticket": {
+ "type": "string"
+ },
+ "gift_code_sku_id": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "login_source": {
+ "type": [
+ "null",
+ "string"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "code",
+ "ticket"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "UserModifySchema": {
+ "type": "object",
+ "properties": {
+ "username": {
+ "minLength": 1,
+ "maxLength": 100,
+ "type": "string"
+ },
+ "discriminator": {
+ "type": "string"
+ },
+ "avatar": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "bio": {
+ "maxLength": 1024,
+ "type": "string"
+ },
+ "accent_color": {
+ "type": "integer"
+ },
+ "banner": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "password": {
+ "type": "string"
+ },
+ "new_password": {
+ "type": "string"
+ },
+ "code": {
+ "type": "string"
+ },
+ "email": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "UserSettingsSchema": {
+ "type": "object",
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "VanityUrlSchema": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "minLength": 1,
+ "maxLength": 20,
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "VoiceIdentifySchema": {
+ "type": "object",
+ "properties": {
+ "server_id": {
+ "type": "string"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "session_id": {
+ "type": "string"
+ },
+ "token": {
+ "type": "string"
+ },
+ "video": {
+ "type": "boolean"
+ },
+ "streams": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "rid": {
+ "type": "string"
+ },
+ "quality": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "quality",
+ "rid",
+ "type"
+ ]
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "server_id",
+ "session_id",
+ "token",
+ "user_id"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "VoiceStateUpdateSchema": {
+ "type": "object",
+ "properties": {
+ "channel_id": {
+ "type": "string"
+ },
+ "guild_id": {
+ "type": "string"
+ },
+ "suppress": {
+ "type": "boolean"
+ },
+ "request_to_speak_timestamp": {
+ "type": "string",
+ "format": "date-time"
+ },
+ "self_mute": {
+ "type": "boolean"
+ },
+ "self_deaf": {
+ "type": "boolean"
+ },
+ "self_video": {
+ "type": "boolean"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "channel_id"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "VoiceVideoSchema": {
+ "type": "object",
+ "properties": {
+ "audio_ssrc": {
+ "type": "integer"
+ },
+ "video_ssrc": {
+ "type": "integer"
+ },
+ "rtx_ssrc": {
+ "type": "integer"
+ },
+ "user_id": {
+ "type": "string"
+ },
+ "streams": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "enum": [
+ "audio",
+ "video"
+ ],
+ "type": "string"
+ },
+ "rid": {
+ "type": "string"
+ },
+ "ssrc": {
+ "type": "integer"
+ },
+ "active": {
+ "type": "boolean"
+ },
+ "quality": {
+ "type": "integer"
+ },
+ "rtx_ssrc": {
+ "type": "integer"
+ },
+ "max_bitrate": {
+ "type": "integer"
+ },
+ "max_framerate": {
+ "type": "integer"
+ },
+ "max_resolution": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string"
+ },
+ "width": {
+ "type": "integer"
+ },
+ "height": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "height",
+ "type",
+ "width"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "active",
+ "max_bitrate",
+ "max_framerate",
+ "max_resolution",
+ "quality",
+ "rid",
+ "rtx_ssrc",
+ "ssrc",
+ "type"
+ ]
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "audio_ssrc",
+ "video_ssrc"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "WebhookCreateSchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "maxLength": 80,
+ "type": "string"
+ },
+ "avatar": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "name"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "WidgetModifySchema": {
+ "type": "object",
+ "properties": {
+ "enabled": {
+ "type": "boolean"
+ },
+ "channel_id": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "channel_id",
+ "enabled"
+ ],
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ },
+ "ChannelModifySchema": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "maxLength": 100,
+ "type": "string"
+ },
+ "type": {
+ "enum": [
+ 0,
+ 1,
+ 10,
+ 11,
+ 12,
+ 13,
+ 14,
+ 15,
+ 2,
+ 255,
+ 3,
+ 33,
+ 34,
+ 35,
+ 4,
+ 5,
+ 6,
+ 64,
+ 7,
+ 8,
+ 9
+ ],
+ "type": "number"
+ },
+ "topic": {
+ "type": "string"
+ },
+ "icon": {
+ "type": [
+ "null",
+ "string"
+ ]
+ },
+ "bitrate": {
+ "type": "integer"
+ },
+ "user_limit": {
+ "type": "integer"
+ },
+ "rate_limit_per_user": {
+ "type": "integer"
+ },
+ "position": {
+ "type": "integer"
+ },
+ "permission_overwrites": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "type": {
+ "$ref": "#/definitions/ChannelPermissionOverwriteType"
+ },
+ "allow": {
+ "type": "string"
+ },
+ "deny": {
+ "type": "string"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "allow",
+ "deny",
+ "id",
+ "type"
+ ]
+ }
+ },
+ "parent_id": {
+ "type": "string"
+ },
+ "id": {
+ "type": "string"
+ },
+ "nsfw": {
+ "type": "boolean"
+ },
+ "rtc_region": {
+ "type": "string"
+ },
+ "default_auto_archive_duration": {
+ "type": "integer"
+ },
+ "flags": {
+ "type": "integer"
+ },
+ "default_thread_rate_limit_per_user": {
+ "type": "integer"
+ }
+ },
+ "additionalProperties": false,
+ "definitions": {
+ "ChannelPermissionOverwriteType": {
+ "enum": [
+ 0,
+ 1,
+ 2
+ ],
+ "type": "number"
+ }
+ },
+ "$schema": "http://json-schema.org/draft-07/schema#"
+ }
+}
\ No newline at end of file
diff --git a/fosscord-server.code-workspace b/fosscord-server.code-workspace
index 56450f85..8b7268a5 100644
--- a/fosscord-server.code-workspace
+++ b/fosscord-server.code-workspace
@@ -16,6 +16,8 @@
"settings": {
"files.exclude": {
"*.ansi": true,
+ "**/cache": true,
+ "**/cache_src": true
}
},
"launch": {
@@ -28,10 +30,16 @@
"type": "node-terminal"
},
{
- "command": "kitty npm run start:bundle:vscode-dbg",
+ "command": "[ \"$(basename $PWD)\" != \"fosscord-server\" ] && cd ..; node scripts/build_new.js && kitty node --enable-source-maps --inspect dist/start.js",
"name": "Run Fosscord with debugger (kitty)",
"request": "launch",
"type": "node-terminal"
+ },
+ {
+ "command": "[ \"$(basename $PWD)\" != \"fosscord-server\" ] && cd ..; $(ps -o comm= $PPID) assets/cache",
+ "name": "Open testclient patch workspace",
+ "request": "launch",
+ "type": "node-terminal"
}
]
}
diff --git a/src/api/middlewares/TestClient.ts b/src/api/middlewares/TestClient.ts
index 3afd0339..480d7f0b 100644
--- a/src/api/middlewares/TestClient.ts
+++ b/src/api/middlewares/TestClient.ts
@@ -82,6 +82,15 @@ export default function TestClient(app: Application) {
res.send(fs.readFileSync(path.join(__dirname, "..", "..", "..", "assets", "developers.html"), { encoding: "utf8" }));
});
+ app.get("/popout", (_req: Request, res: Response) => {
+ const { useTestClient } = Config.get().client;
+ res.set("Cache-Control", "public, max-age=" + 60 * 60 * 24);
+ res.set("content-type", "text/html");
+
+ if (!useTestClient) return res.send("Test client is disabled on this instance. Use a stand-alone client to connect this instance.");
+
+ res.send(fs.readFileSync(path.join(__dirname, "..", "..", "..", "assets", "popout.html"), { encoding: "utf8" }));
+ });
app.get("*", (req: Request, res: Response) => {
const { useTestClient } = Config.get().client;
res.set("Cache-Control", "public, max-age=" + 60 * 60 * 24);
diff --git a/src/gateway/events/Message.ts b/src/gateway/events/Message.ts
index e5ee5828..d58db1c3 100644
--- a/src/gateway/events/Message.ts
+++ b/src/gateway/events/Message.ts
@@ -43,6 +43,7 @@ export async function Message(this: WebSocket, buffer: Buffer) {
const OPCodeHandler = OPCodeHandlers[data.op];
if (!OPCodeHandler) {
console.error("[Gateway] Unkown opcode " + data.op);
+ if(process.env.WS_VERBOSE_UNKNOWN) console.log(data);
// TODO: if all opcodes are implemented comment this out:
// this.close(CloseCodes.Unknown_opcode);
return;
diff --git a/src/gateway/opcodes/VoiceServerPing.ts b/src/gateway/opcodes/VoiceServerPing.ts
new file mode 100644
index 00000000..f684cb33
--- /dev/null
+++ b/src/gateway/opcodes/VoiceServerPing.ts
@@ -0,0 +1,9 @@
+import { Payload, WebSocket } from "@fosscord/gateway";
+import { Send } from "../util/Send";
+
+export async function onVoiceServerPing(this: WebSocket, data: Payload) {
+ console.log("Got voice server ping: ", data, "Doing a noop!");
+
+
+ // return this.close(CloseCodes.Invalid_session);
+}
diff --git a/src/gateway/opcodes/index.ts b/src/gateway/opcodes/index.ts
index d5dc7de1..818d1597 100644
--- a/src/gateway/opcodes/index.ts
+++ b/src/gateway/opcodes/index.ts
@@ -6,6 +6,7 @@ import { onPresenceUpdate } from "./PresenceUpdate";
import { onRequestGuildMembers } from "./RequestGuildMembers";
import { onResume } from "./Resume";
import { onVoiceStateUpdate } from "./VoiceStateUpdate";
+import { onVoiceServerPing } from "./VoiceServerPing";
export type OPCodeHandler = (this: WebSocket, data: Payload) => any;
@@ -14,12 +15,14 @@ export default {
2: onIdentify,
3: onPresenceUpdate,
4: onVoiceStateUpdate,
- // 5: Voice Server Ping
+ 5: onVoiceServerPing, //Voice Server Ping
6: onResume,
// 7: Reconnect: You should attempt to reconnect and resume immediately.
8: onRequestGuildMembers,
// 9: Invalid Session
// 10: Hello
+ // 11: Heartbeat ACK
+
// 13: Dm_update
14: onLazyRequest
};