fix: interaction response

This commit is contained in:
Elysia
2023-06-14 13:53:09 +07:00
parent e8f3b590c1
commit bd66c99ef2
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -247,7 +247,7 @@ class Modal {
return new Promise((resolve, reject) => {
const handler = data => {
timeout.refresh();
if (data.metadata.nonce !== nonce) return;
if (data.metadata?.nonce !== nonce) return;
clearTimeout(timeout);
this.client.removeListener('interactionResponse', handler);
this.client.decrementMaxListeners();