document
This commit is contained in:
parent
89508c214b
commit
391d972d98
2
.github/workflows/lint.yml
vendored
2
.github/workflows/lint.yml
vendored
@ -21,4 +21,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: ${{ matrix.node-version }}
|
node-version: ${{ matrix.node-version }}
|
||||||
- run: npm i
|
- run: npm i
|
||||||
- run: npm run lint:all
|
- run: npm run test
|
5
docs/index.yml
Normal file
5
docs/index.yml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
- name: General
|
||||||
|
files:
|
||||||
|
- name: Welcome
|
||||||
|
id: welcome
|
||||||
|
path: ../../README.md
|
38
package-lock.json
generated
38
package-lock.json
generated
@ -42,7 +42,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^16.0.1",
|
"@commitlint/cli": "^16.0.1",
|
||||||
"@commitlint/config-angular": "^16.0.0",
|
"@commitlint/config-angular": "^16.0.0",
|
||||||
"@discordjs/docgen": "^0.11.0",
|
"@discordjs/docgen": "^0.11.1",
|
||||||
"@favware/npm-deprecate": "^1.0.4",
|
"@favware/npm-deprecate": "^1.0.4",
|
||||||
"@types/node": "^16.11.12",
|
"@types/node": "^16.11.12",
|
||||||
"conventional-changelog-cli": "^2.2.2",
|
"conventional-changelog-cli": "^2.2.2",
|
||||||
@ -8114,9 +8114,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/jsdoc/node_modules/marked": {
|
"node_modules/jsdoc/node_modules/marked": {
|
||||||
"version": "4.0.14",
|
"version": "4.0.15",
|
||||||
"resolved": "https://registry.npmjs.org/marked/-/marked-4.0.14.tgz",
|
"resolved": "https://registry.npmjs.org/marked/-/marked-4.0.15.tgz",
|
||||||
"integrity": "sha512-HL5sSPE/LP6U9qKgngIIPTthuxC0jrfxpYMZ3LdGDD3vTnLs59m2Z7r6+LNDR3ToqEQdkKd6YaaEfJhodJmijQ==",
|
"integrity": "sha512-esX5lPdTfG4p8LDkv+obbRCyOKzB+820ZZyMOXJZygZBHrH9b3xXR64X4kT3sPe9Nx8qQXbmcz6kFSMt4Nfk6Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"marked": "bin/marked.js"
|
"marked": "bin/marked.js"
|
||||||
@ -8794,9 +8794,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/markdown-it-anchor": {
|
"node_modules/markdown-it-anchor": {
|
||||||
"version": "8.6.2",
|
"version": "8.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.3.tgz",
|
||||||
"integrity": "sha512-JNaekTlIwwyYGBN3zifZDxgz4bSL8sbEj58fdTZGmPSMMGXBZapFjcZk2I33Jy79c1fvCKHpF7MA/67FOTjvzA==",
|
"integrity": "sha512-3IiHYh/kJHY2IcuKv5qv+IKNxDwXjVoYQ5FvbBUPywcwCQ4ICLIw5z0QrhYBtcD7h88MfFK3zKAkABTvPMxm7A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@types/markdown-it": "*",
|
"@types/markdown-it": "*",
|
||||||
@ -14190,9 +14190,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/underscore": {
|
"node_modules/underscore": {
|
||||||
"version": "1.13.2",
|
"version": "1.13.3",
|
||||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.3.tgz",
|
||||||
"integrity": "sha512-ekY1NhRzq0B08g4bGuX4wd2jZx5GnKz6mKSqFL4nqBlfyMGiG10gDFhDTMEfYmDL6Jy0FUIZp7wiRB+0BP7J2g==",
|
"integrity": "sha512-QvjkYpiD+dJJraRA8+dGAU4i7aBbb2s0S3jA45TFOvg2VgqvdCDd/3N6CqA8gluk1W91GLoXg5enMUx560QzuA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
@ -20894,9 +20894,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"marked": {
|
"marked": {
|
||||||
"version": "4.0.14",
|
"version": "4.0.15",
|
||||||
"resolved": "https://registry.npmjs.org/marked/-/marked-4.0.14.tgz",
|
"resolved": "https://registry.npmjs.org/marked/-/marked-4.0.15.tgz",
|
||||||
"integrity": "sha512-HL5sSPE/LP6U9qKgngIIPTthuxC0jrfxpYMZ3LdGDD3vTnLs59m2Z7r6+LNDR3ToqEQdkKd6YaaEfJhodJmijQ==",
|
"integrity": "sha512-esX5lPdTfG4p8LDkv+obbRCyOKzB+820ZZyMOXJZygZBHrH9b3xXR64X4kT3sPe9Nx8qQXbmcz6kFSMt4Nfk6Q==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"mkdirp": {
|
"mkdirp": {
|
||||||
@ -21489,9 +21489,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"markdown-it-anchor": {
|
"markdown-it-anchor": {
|
||||||
"version": "8.6.2",
|
"version": "8.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.2.tgz",
|
"resolved": "https://registry.npmjs.org/markdown-it-anchor/-/markdown-it-anchor-8.6.3.tgz",
|
||||||
"integrity": "sha512-JNaekTlIwwyYGBN3zifZDxgz4bSL8sbEj58fdTZGmPSMMGXBZapFjcZk2I33Jy79c1fvCKHpF7MA/67FOTjvzA==",
|
"integrity": "sha512-3IiHYh/kJHY2IcuKv5qv+IKNxDwXjVoYQ5FvbBUPywcwCQ4ICLIw5z0QrhYBtcD7h88MfFK3zKAkABTvPMxm7A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {}
|
"requires": {}
|
||||||
},
|
},
|
||||||
@ -25370,9 +25370,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"underscore": {
|
"underscore": {
|
||||||
"version": "1.13.2",
|
"version": "1.13.3",
|
||||||
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.2.tgz",
|
"resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.3.tgz",
|
||||||
"integrity": "sha512-ekY1NhRzq0B08g4bGuX4wd2jZx5GnKz6mKSqFL4nqBlfyMGiG10gDFhDTMEfYmDL6Jy0FUIZp7wiRB+0BP7J2g==",
|
"integrity": "sha512-QvjkYpiD+dJJraRA8+dGAU4i7aBbb2s0S3jA45TFOvg2VgqvdCDd/3N6CqA8gluk1W91GLoXg5enMUx560QzuA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"undici": {
|
"undici": {
|
||||||
|
@ -5,14 +5,17 @@
|
|||||||
"main": "./src/index.js",
|
"main": "./src/index.js",
|
||||||
"types": "./typings/index.d.ts",
|
"types": "./typings/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"test": "echo \"Error: no test specified\" && exit 1",
|
"test": "npm run lint:all && npm run lint:typings && npm run docs:test",
|
||||||
|
"test:typescript": "tsc --noEmit && tsd",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"lint:fix": "eslint . --fix",
|
"lint:fix": "eslint . --fix",
|
||||||
"lint:typings": "tslint typings/index.d.ts",
|
"lint:typings": "tslint typings/index.d.ts",
|
||||||
"lint:typings:fix": "tslint typings/index.d.ts --fix",
|
"lint:typings:fix": "tslint typings/index.d.ts --fix",
|
||||||
"format": "prettier --write src/**/*.js typings/**/*.ts",
|
"format": "prettier --write src/**/*.js typings/**/*.ts",
|
||||||
"lint:all": "npm run lint && npm run lint:typings",
|
"lint:all": "npm run lint && npm run lint:typings",
|
||||||
"checkup": "node update.mjs"
|
"checkup": "node update.mjs",
|
||||||
|
"docs": "docgen --source src --custom docs/index.yml --output docs/docs.json",
|
||||||
|
"docs:test": "docgen --source src --custom docs/index.yml"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"src",
|
"src",
|
||||||
@ -83,7 +86,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^16.0.1",
|
"@commitlint/cli": "^16.0.1",
|
||||||
"@commitlint/config-angular": "^16.0.0",
|
"@commitlint/config-angular": "^16.0.0",
|
||||||
"@discordjs/docgen": "^0.11.0",
|
"@discordjs/docgen": "^0.11.1",
|
||||||
"@favware/npm-deprecate": "^1.0.4",
|
"@favware/npm-deprecate": "^1.0.4",
|
||||||
"@types/node": "^16.11.12",
|
"@types/node": "^16.11.12",
|
||||||
"conventional-changelog-cli": "^2.2.2",
|
"conventional-changelog-cli": "^2.2.2",
|
||||||
|
@ -127,10 +127,16 @@ class Client extends BaseClient {
|
|||||||
*/
|
*/
|
||||||
this.users = new UserManager(this);
|
this.users = new UserManager(this);
|
||||||
|
|
||||||
/** Patch
|
// Patch
|
||||||
*
|
/**
|
||||||
|
* All of the relationships {@link User}
|
||||||
|
* @type {RelationshipsManager}
|
||||||
*/
|
*/
|
||||||
this.relationships = new RelationshipsManager(this);
|
this.relationships = new RelationshipsManager(this);
|
||||||
|
/**
|
||||||
|
* All of the settings {@link Object}
|
||||||
|
* @type {ClientUserSettingManager}
|
||||||
|
*/
|
||||||
this.setting = new ClientUserSettingManager(this);
|
this.setting = new ClientUserSettingManager(this);
|
||||||
/**
|
/**
|
||||||
* All of the guilds the client is currently handling, mapped by their ids -
|
* All of the guilds the client is currently handling, mapped by their ids -
|
||||||
|
@ -9,8 +9,8 @@ module.exports = (client, { d: data }) => {
|
|||||||
client.relationships.cache.set(data.id, data.type);
|
client.relationships.cache.set(data.id, data.type);
|
||||||
/**
|
/**
|
||||||
* Emitted whenever a relationship is updated.
|
* Emitted whenever a relationship is updated.
|
||||||
* @event Client#relationshipUpdate
|
* @event Client#relationshipAdd
|
||||||
* @param {UserID} user The userID that was updated
|
* @param {UserId} user The userID that was updated
|
||||||
* @param {Number} type The new relationship type
|
* @param {Number} type The new relationship type
|
||||||
*/
|
*/
|
||||||
client.emit(Events.RELATIONSHIP_ADD, data.id, data.type);
|
client.emit(Events.RELATIONSHIP_ADD, data.id, data.type);
|
||||||
|
@ -6,8 +6,8 @@ module.exports = (client, { d: data }) => {
|
|||||||
client.relationships.cache.delete(data.id);
|
client.relationships.cache.delete(data.id);
|
||||||
/**
|
/**
|
||||||
* Emitted whenever a relationship is updated.
|
* Emitted whenever a relationship is updated.
|
||||||
* @event Client#relationshipUpdate
|
* @event Client#relationshipRemove
|
||||||
* @param {UserID} user The userID that was updated
|
* @param {UserId} user The userID that was updated
|
||||||
*/
|
*/
|
||||||
client.emit(Events.RELATIONSHIP_REMOVE, data.id);
|
client.emit(Events.RELATIONSHIP_REMOVE, data.id);
|
||||||
};
|
};
|
||||||
|
@ -68,6 +68,7 @@ class PartialGroupDMChannel extends Channel {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Invites fetch
|
* Invites fetch
|
||||||
|
* @type {Collection<string, Invite>}
|
||||||
*/
|
*/
|
||||||
this.invites = new Collection();
|
this.invites = new Collection();
|
||||||
|
|
||||||
|
@ -127,6 +127,7 @@ class User extends Base {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check relationship status
|
* Check relationship status
|
||||||
|
* @type {Relationship}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get relationships() {
|
get relationships() {
|
||||||
@ -136,6 +137,7 @@ class User extends Base {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Check note
|
* Check note
|
||||||
|
* @type {?string}
|
||||||
* @readonly
|
* @readonly
|
||||||
*/
|
*/
|
||||||
get note() {
|
get note() {
|
||||||
|
@ -195,7 +195,7 @@ exports.Opcodes = {
|
|||||||
INVALID_SESSION: 9, // # Receive used to notify client they have an invalid session id
|
INVALID_SESSION: 9, // # Receive used to notify client they have an invalid session id
|
||||||
HELLO: 10, // # Receive sent immediately after connecting, contains heartbeat and server debug information
|
HELLO: 10, // # Receive sent immediately after connecting, contains heartbeat and server debug information
|
||||||
HEARTBEAT_ACK: 11, // # Sent immediately following a client heartbeat that was received
|
HEARTBEAT_ACK: 11, // # Sent immediately following a client heartbeat that was received
|
||||||
// GUILD_SYNC: 12, // # Receive guild_sync but not used anymore
|
GUILD_SYNC: 12, // # Receive guild_sync but not used anymore
|
||||||
/** Add some opcode from Discum
|
/** Add some opcode from Discum
|
||||||
/* @extends https://github.com/Merubokkusu/Discord-S.C.U.M/blob/master/discum/gateway/gateway.py#L56
|
/* @extends https://github.com/Merubokkusu/Discord-S.C.U.M/blob/master/discum/gateway/gateway.py#L56
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user