mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 00:23:30 +01:00
Fix doc gen
This commit is contained in:
BIN
docs/docs.json
BIN
docs/docs.json
Binary file not shown.
@@ -1,4 +1,4 @@
|
||||
{
|
||||
"GEN_VERSION": 10,
|
||||
"COMPRESS": false
|
||||
"COMPRESS": true
|
||||
}
|
||||
@@ -11,10 +11,13 @@ const docScanner = new DocumentationScanner(this);
|
||||
function parseDocs(json) {
|
||||
console.log(`${json.length} items found`);
|
||||
const documentation = new Documentation(json);
|
||||
console.log('serializing');
|
||||
let output = JSON.stringify(documentation.serialize(), null, 0);
|
||||
if (compress) {
|
||||
console.log('compressing');
|
||||
output = zlib.deflateSync(output).toString('utf8');
|
||||
}
|
||||
console.log('writing to docs.json');
|
||||
fs.writeFileSync('./docs/docs.json', output);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,19 +37,19 @@ class DocumentedClass extends DocumentedItem {
|
||||
this.classConstructor = item;
|
||||
} else if (item instanceof DocumentedFunction) {
|
||||
if (this.methods.get(item.directData.name)) {
|
||||
throw new Error(`Doc ${this.directData.name} already has method ${item.name}`);
|
||||
throw new Error(`Doc ${this.directData.name} already has method ${item.directData.name}`);
|
||||
}
|
||||
this.methods.set(item.name, item);
|
||||
this.methods.set(item.directData.name, item);
|
||||
} else if (item instanceof DocumentedMember) {
|
||||
if (this.props.get(item.directData.name)) {
|
||||
throw new Error(`Doc ${this.directData.name} already has prop ${item.name}`);
|
||||
throw new Error(`Doc ${this.directData.name} already has prop ${item.directData.name}`);
|
||||
}
|
||||
this.props.set(item.name, item);
|
||||
this.props.set(item.directData.name, item);
|
||||
} else if (item instanceof DocumentedEvent) {
|
||||
if (this.props.get(item.directData.name)) {
|
||||
throw new Error(`Doc ${this.directData.name} already has event ${item.name}`);
|
||||
if (this.events.get(item.directData.name)) {
|
||||
throw new Error(`Doc ${this.directData.name} already has event ${item.directData.name}`);
|
||||
}
|
||||
this.events.set(item.name, item);
|
||||
this.events.set(item.directData.name, item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,10 +52,6 @@ class WebSocketManager {
|
||||
* @returns {null}
|
||||
*/
|
||||
connect(gateway) {
|
||||
/**
|
||||
* The status of the Client's connection, a type of Constants.Status
|
||||
* @type {Number}
|
||||
*/
|
||||
this.status = Constants.Status.CONNECTING;
|
||||
/**
|
||||
* The WebSocket connection to the gateway
|
||||
|
||||
Reference in New Issue
Block a user