From 6a4616e94146d08889b446a52205eac77fc25c6b Mon Sep 17 00:00:00 2001 From: Elysia <71698422+aiko-chan-ai@users.noreply.github.com> Date: Mon, 17 Jun 2024 18:05:28 +0700 Subject: [PATCH] fix #1195 #1119 #1189 ty <3 Co-Authored-By: Ian Mullins <39538734+ianmullins@users.noreply.github.com> --- src/structures/Message.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/structures/Message.js b/src/structures/Message.js index f7afe6a..944400b 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -1014,8 +1014,8 @@ class Message extends Base { } else { button = this.components[button.Y]?.components[button.X]; } - button = button.toJSON(); if (!button) throw new TypeError('BUTTON_NOT_FOUND'); + button = button.toJSON(); if (!button.custom_id || button.disabled) throw new TypeError('BUTTON_CANNOT_CLICK'); const nonce = SnowflakeUtil.generate(); const data = {