From daae3db30522ff94e8c10cb85a5a043fc56ed552 Mon Sep 17 00:00:00 2001 From: profitroll Date: Mon, 8 May 2023 15:45:16 +0200 Subject: [PATCH] WIP: Validation --- validation/users.json | 24 ++++++++++++++++++++++++ validation/warnings.json | 18 ++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 validation/users.json create mode 100644 validation/warnings.json diff --git a/validation/users.json b/validation/users.json new file mode 100644 index 0000000..d76120c --- /dev/null +++ b/validation/users.json @@ -0,0 +1,24 @@ +{ + "$jsonSchema": { + "required": [ + "user", + "customrole", + "customchannel" + + ], + "properties": { + "user": { + "bsonType": "long", + "description": "Discord ID of user" + }, + "customrole": { + "bsonType": ["null", "long"], + "description": "Discord ID of custom role or 'null' if not set" + }, + "customchannel": { + "bsonType": ["null", "long"], + "description": "Discord ID of custom channel or 'null' if not set" + } + } + } +} \ No newline at end of file diff --git a/validation/warnings.json b/validation/warnings.json new file mode 100644 index 0000000..e28a79a --- /dev/null +++ b/validation/warnings.json @@ -0,0 +1,18 @@ +{ + "$jsonSchema": { + "required": [ + "user", + "warns" + ], + "properties": { + "user": { + "bsonType": "long", + "description": "Discord ID of user" + }, + "warns": { + "bsonType": "int", + "description": "Number of warnings on count" + } + } + } +} \ No newline at end of file