Skip to content

Commit

Permalink
Merge branch 'master' into feat/webhooks-3
Browse files Browse the repository at this point in the history
  • Loading branch information
DEVTomatoCake committed Aug 8, 2024
2 parents 4b1e9ba + 289a02f commit 4ca79ad
Show file tree
Hide file tree
Showing 9 changed files with 38,395 additions and 1,758 deletions.
274 changes: 260 additions & 14 deletions assets/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -635,14 +635,51 @@
}
}
},
"MessageComponent": {
"ActionRowComponent": {
"type": "object",
"properties": {
"type": {
"type": "integer"
"$ref": "#/components/schemas/MessageComponentType.ActionRow"
},
"components": {
"type": "array",
"items": {
"anyOf": [
{
"$ref": "#/components/schemas/ButtonComponent"
},
{
"$ref": "#/components/schemas/SelectMenuComponent"
},
{
"$ref": "#/components/schemas/StringSelectMenuComponent"
},
{
"$ref": "#/components/schemas/TextInputComponent"
}
]
}
}
},
"required": [
"components",
"type"
]
},
"MessageComponentType.ActionRow": {
"type": "number",
"enum": [
1
]
},
"ButtonComponent": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/MessageComponentType.Button"
},
"style": {
"type": "integer"
"$ref": "#/components/schemas/ButtonStyle"
},
"label": {
"type": "string"
Expand All @@ -661,19 +698,30 @@
},
"disabled": {
"type": "boolean"
},
"components": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MessageComponent"
}
}
},
"required": [
"components",
"style",
"type"
]
},
"MessageComponentType.Button": {
"type": "number",
"enum": [
2
]
},
"ButtonStyle": {
"enum": [
1,
2,
3,
4,
5,
6
],
"type": "number"
},
"PartialEmoji": {
"type": "object",
"properties": {
Expand All @@ -691,6 +739,199 @@
"name"
]
},
"SelectMenuComponent": {
"type": "object",
"properties": {
"type": {
"enum": [
3,
5,
6,
7,
8
],
"type": "number"
},
"custom_id": {
"type": "string"
},
"channel_types": {
"type": "array",
"items": {
"type": "integer"
}
},
"placeholder": {
"type": "string"
},
"default_values": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SelectMenuDefaultOption"
}
},
"min_values": {
"type": "integer"
},
"max_values": {
"type": "integer"
},
"disabled": {
"type": "boolean"
}
},
"required": [
"custom_id",
"type"
]
},
"SelectMenuDefaultOption": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"enum": [
"channel",
"role",
"user"
],
"type": "string"
}
},
"required": [
"id",
"type"
]
},
"StringSelectMenuComponent": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/MessageComponentType.StringSelect"
},
"options": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SelectMenuOption"
}
},
"custom_id": {
"type": "string"
},
"channel_types": {
"type": "array",
"items": {
"type": "integer"
}
},
"placeholder": {
"type": "string"
},
"default_values": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SelectMenuDefaultOption"
}
},
"min_values": {
"type": "integer"
},
"max_values": {
"type": "integer"
},
"disabled": {
"type": "boolean"
}
},
"required": [
"custom_id",
"options",
"type"
]
},
"MessageComponentType.StringSelect": {
"type": "number",
"enum": [
3
]
},
"SelectMenuOption": {
"type": "object",
"properties": {
"label": {
"type": "string"
},
"value": {
"type": "string"
},
"description": {
"type": "string"
},
"emoji": {
"$ref": "#/components/schemas/PartialEmoji"
},
"default": {
"type": "boolean"
}
},
"required": [
"label",
"value"
]
},
"TextInputComponent": {
"type": "object",
"properties": {
"type": {
"$ref": "#/components/schemas/MessageComponentType.TextInput"
},
"custom_id": {
"type": "string"
},
"style": {
"$ref": "#/components/schemas/TextInputStyle"
},
"label": {
"type": "string"
},
"min_length": {
"type": "integer"
},
"max_length": {
"type": "integer"
},
"required": {
"type": "boolean"
},
"value": {
"type": "string"
},
"placeholder": {
"type": "string"
}
},
"required": [
"custom_id",
"label",
"style",
"type"
]
},
"MessageComponentType.TextInput": {
"type": "number",
"enum": [
4
]
},
"TextInputStyle": {
"enum": [
1,
2
],
"type": "number"
},
"PollCreationSchema": {
"type": "object",
"properties": {
Expand Down Expand Up @@ -2263,7 +2504,7 @@
"components": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MessageComponent"
"$ref": "#/components/schemas/ActionRowComponent"
}
},
"poll": {
Expand Down Expand Up @@ -3504,7 +3745,7 @@
"components": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MessageComponent"
"$ref": "#/components/schemas/ActionRowComponent"
}
},
"poll": {
Expand Down Expand Up @@ -4146,12 +4387,17 @@
"type": "integer",
"default": 65535
},
"maxBulkBanUsers": {
"type": "integer",
"default": 200
},
"maxChannelsInCategory": {
"type": "integer",
"default": 65535
}
},
"required": [
"maxBulkBanUsers",
"maxChannels",
"maxChannelsInCategory",
"maxEmojis",
Expand Down Expand Up @@ -5684,7 +5930,7 @@
"components": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MessageComponent"
"$ref": "#/components/schemas/ActionRowComponent"
}
},
"poll": {
Expand Down Expand Up @@ -5829,7 +6075,7 @@
"components": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MessageComponent"
"$ref": "#/components/schemas/ActionRowComponent"
}
},
"poll": {
Expand Down
Loading

0 comments on commit 4ca79ad

Please sign in to comment.