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) => {
|
return new Promise((resolve, reject) => {
|
||||||
const handler = data => {
|
const handler = data => {
|
||||||
timeout.refresh();
|
timeout.refresh();
|
||||||
if (data.metadata.nonce !== nonce) return;
|
if (data.metadata?.nonce !== nonce) return;
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
this.client.removeListener('interactionResponse', handler);
|
this.client.removeListener('interactionResponse', handler);
|
||||||
this.client.decrementMaxListeners();
|
this.client.decrementMaxListeners();
|
||||||
@ -987,7 +987,7 @@ class ApplicationCommand extends Base {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const handler = data => {
|
const handler = data => {
|
||||||
timeout.refresh();
|
timeout.refresh();
|
||||||
if (data.metadata.nonce !== nonce) return;
|
if (data.metadata?.nonce !== nonce) return;
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
this.client.removeListener('interactionResponse', handler);
|
this.client.removeListener('interactionResponse', handler);
|
||||||
this.client.decrementMaxListeners();
|
this.client.decrementMaxListeners();
|
||||||
|
@ -199,7 +199,7 @@ class MessageButton extends BaseMessageComponent {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const handler = data => {
|
const handler = data => {
|
||||||
timeout.refresh();
|
timeout.refresh();
|
||||||
if (data.metadata.nonce !== nonce) return;
|
if (data.metadata?.nonce !== nonce) return;
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
message.client.removeListener('interactionResponse', handler);
|
message.client.removeListener('interactionResponse', handler);
|
||||||
message.client.decrementMaxListeners();
|
message.client.decrementMaxListeners();
|
||||||
|
@ -359,7 +359,7 @@ class MessageSelectMenu extends BaseMessageComponent {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const handler = data => {
|
const handler = data => {
|
||||||
timeout.refresh();
|
timeout.refresh();
|
||||||
if (data.metadata.nonce !== nonce) return;
|
if (data.metadata?.nonce !== nonce) return;
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
message.client.removeListener('interactionResponse', handler);
|
message.client.removeListener('interactionResponse', handler);
|
||||||
message.client.decrementMaxListeners();
|
message.client.decrementMaxListeners();
|
||||||
|
@ -247,7 +247,7 @@ class Modal {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const handler = data => {
|
const handler = data => {
|
||||||
timeout.refresh();
|
timeout.refresh();
|
||||||
if (data.metadata.nonce !== nonce) return;
|
if (data.metadata?.nonce !== nonce) return;
|
||||||
clearTimeout(timeout);
|
clearTimeout(timeout);
|
||||||
this.client.removeListener('interactionResponse', handler);
|
this.client.removeListener('interactionResponse', handler);
|
||||||
this.client.decrementMaxListeners();
|
this.client.decrementMaxListeners();
|
||||||
|
Loading…
Reference in New Issue
Block a user