Send user and roles id array in GET /guilds/:id/members/:id

This commit is contained in:
Madeline
2023-06-11 00:27:38 +10:00
parent e545edad94
commit 6e47b8e0b3
5 changed files with 4273 additions and 34 deletions
+1 -31
View File
@@ -34,9 +34,7 @@ const settings = {
noExtraProps: true,
defaultProps: false,
};
const compilerOptions = {
strictNullChecks: true,
};
const Excluded = [
"DefaultSchema",
"Schema",
@@ -61,14 +59,6 @@ const Excluded = [
"TransportMakeRequestResponse",
];
function modify(obj) {
for (var k in obj) {
if (typeof obj[k] === "object" && obj[k] !== null) {
modify(obj[k]);
}
}
}
function main() {
const program = TJS.programFromConfig(
path.join(__dirname, "..", "tsconfig.json"),
@@ -111,32 +101,12 @@ function main() {
delete part.properties[key];
continue;
}
// if (part.properties[key].anyOf) {
// const nullIndex = part.properties[key].anyOf.findIndex(
// (x) => x.type == "null",
// );
// if (nullIndex != -1) {
// part.properties[key].nullable = true;
// part.properties[key].anyOf.splice(nullIndex, 1);
// if (part.properties[key].anyOf.length == 1) {
// Object.assign(
// part.properties[key],
// part.properties[key].anyOf[0],
// );
// delete part.properties[key].anyOf;
// }
// }
// }
}
}
definitions = { ...definitions, [name]: { ...part } };
}
//modify(definitions);
fs.writeFileSync(schemaPath, JSON.stringify(definitions, null, 4));
}