{
"$jsonSchema": {
"required": [
"user",
"completed",
"category",
"description",
"photo",
"video",
"animation",
"caption",
"text"
],
"properties": {
"user": {
"bsonType": ["int", "long"],
"description": "Telegram ID of user"
},
"completed": {
"bsonType": "bool",
"description": "Whether spoiler is a completed one"
"category": {
"bsonType": ["string", "null"],
"enum": ["nsfw", "deanon", "other"],
"description": "Spoiler's category"
"description": {
"description": "Spoiler's description"
"photo": {
"description": "Spoilered photo"
"video": {
"description": "Spoilered video"
"animation": {
"description": "Spoilered animation/GIF"
"caption": {
"description": "Spoilered caption for media"
"text": {
"description": "Spoilered text"
}