fix: interaction response
This commit is contained in:
parent
e8f3b590c1
commit
bd66c99ef2
@ -891,7 +891,7 @@ class ApplicationCommand extends Base {
|
||||
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();
|
||||
@ -987,7 +987,7 @@ class ApplicationCommand extends Base {
|
||||
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();
|
||||
|
@ -199,7 +199,7 @@ class MessageButton extends BaseMessageComponent {
|
||||
return new Promise((resolve, reject) => {
|
||||
const handler = data => {
|
||||
timeout.refresh();
|
||||
if (data.metadata.nonce !== nonce) return;
|
||||
if (data.metadata?.nonce !== nonce) return;
|
||||
clearTimeout(timeout);
|
||||
message.client.removeListener('interactionResponse', handler);
|
||||
message.client.decrementMaxListeners();
|
||||
|
@ -359,7 +359,7 @@ class MessageSelectMenu extends BaseMessageComponent {
|
||||
return new Promise((resolve, reject) => {
|
||||
const handler = data => {
|
||||
timeout.refresh();
|
||||
if (data.metadata.nonce !== nonce) return;
|
||||
if (data.metadata?.nonce !== nonce) return;
|
||||
clearTimeout(timeout);
|
||||
message.client.removeListener('interactionResponse', handler);
|
||||
message.client.decrementMaxListeners();
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user