koishi-core
Advanced tools
Comparing version 1.11.1 to 1.11.2
@@ -54,4 +54,3 @@ "use strict"; | ||
let shouldFetchAuthority = !userFields.has('authority') && authority > 0; | ||
let shouldFetchUsage = !userFields.has('usage') && (typeof maxUsage === 'number' && maxUsage < Infinity || | ||
typeof minInterval === 'number' && minInterval > 0); | ||
let shouldFetchUsage = !(userFields.has('usage') || !maxUsage && !minInterval); | ||
for (const option of command._options) { | ||
@@ -58,0 +57,0 @@ if (option.camels[0] in options) { |
@@ -329,3 +329,2 @@ "use strict"; | ||
}); | ||
let resolved = false; | ||
this.socket.on('message', (data) => { | ||
@@ -342,7 +341,2 @@ var _a, _b; | ||
} | ||
if (!resolved) { | ||
resolved = true; | ||
this.debug('connect to ws server:', this.app.options.server); | ||
resolve(); | ||
} | ||
if ('post_type' in parsed) { | ||
@@ -353,6 +347,6 @@ const meta = this.prepareMeta(parsed); | ||
} | ||
else { | ||
if (parsed.echo === -1) { | ||
this.version = koishi_utils_1.camelCase(parsed.data); | ||
} | ||
else if (parsed.echo === -1) { | ||
this.version = koishi_utils_1.camelCase(parsed.data); | ||
this.debug('connect to ws server:', this.app.options.server); | ||
resolve(); | ||
(_b = (_a = this._listeners)[parsed.echo]) === null || _b === void 0 ? void 0 : _b.call(_a, parsed); | ||
@@ -359,0 +353,0 @@ } |
{ | ||
"name": "koishi-core", | ||
"description": "Core features for Koishi", | ||
"version": "1.11.1", | ||
"version": "1.11.2", | ||
"main": "dist/index.js", | ||
@@ -36,6 +36,6 @@ "typings": "dist/index.d.ts", | ||
"@types/debug": "^4.1.5", | ||
"@types/ws": "^7.2.2", | ||
"@types/ws": "^7.2.3", | ||
"get-port": "^5.1.1", | ||
"koishi-database-memory": "^1.1.6", | ||
"koishi-test-utils": "^3.2.1" | ||
"koishi-database-memory": "^1.1.7", | ||
"koishi-test-utils": "^3.2.2" | ||
}, | ||
@@ -42,0 +42,0 @@ "dependencies": { |
126993
3115