Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
zcpua committed Sep 5, 2023
1 parent e92118e commit 2cfc7c9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/discord.ws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ export class WsMessage {
});
this.log("appeal.httpStatus", httpStatus);
if (httpStatus == 204) {
//todo
this.on(newnonce, (data) => {
this.emit(nonce, data);
});
Expand Down Expand Up @@ -646,17 +647,17 @@ export class WsMessage {
this.waitMjEvents.set(nonce, {
nonce,
prompt,
onmodal: async (nonce, id) => {
onmodal: async (oldnonce, id) => {
if (onmodal === undefined) {
// reject(new Error("onmodal is not defined"))
return "";
}
var nonce = await onmodal(nonce, id);
var nonce = await onmodal(oldnonce, id);
if (nonce === "") {
// reject(new Error("onmodal return empty nonce"))
return "";
}
this.removeWaitMjEvent(nonce);
this.removeWaitMjEvent(oldnonce);
this.waitMjEvents.set(nonce, { nonce });
this.onceImage(nonce, handleImageMessage);
return nonce;
Expand Down

0 comments on commit 2cfc7c9

Please sign in to comment.