Commit ea556fe3 authored by nanahira's avatar nanahira

no lock

parent afcf741e
This diff is collapsed.
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
"testEnvironment": "node" "testEnvironment": "node"
}, },
"peerDependencies": { "peerDependencies": {
"koishi": "^4.11.6", "koishi": "^4.13.5",
"koishi-plugin-cache-aragami": "^2.5.0" "koishi-plugin-cache-aragami": "^2.5.0"
}, },
"devDependencies": { "devDependencies": {
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
"ts-jest": "^27.1.5", "ts-jest": "^27.1.5",
"ts-loader": "^9.4.2", "ts-loader": "^9.4.2",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^4.9.4", "typescript": "^5.1.6",
"webpack": "^5.75.0", "webpack": "^5.75.0",
"webpack-cli": "^4.10.0", "webpack-cli": "^4.10.0",
"ws": "^8.11.0" "ws": "^8.11.0"
......
...@@ -192,14 +192,14 @@ export default class WeComBot extends Bot<Partial<WeComBotConfig>> { ...@@ -192,14 +192,14 @@ export default class WeComBot extends Bot<Partial<WeComBotConfig>> {
} }
} }
getToken() { async getToken() {
return this.aragami.lock(this.selfId, async () => { // return this.aragami.lock(this.selfId, async () => {
const tokenObject = await this.aragami.get(WeComToken, this.selfId); const tokenObject = await this.aragami.get(WeComToken, this.selfId);
if (tokenObject) { if (tokenObject) {
return tokenObject.token; return tokenObject.token;
} }
return this.fetchNewToken(); return this.fetchNewToken();
}); // });
} }
async handleMenuEvent(event: string, session: Session) { async handleMenuEvent(event: string, session: Session) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment