From 18dcb1f2600203f903c2afb8392895a5ce477e27 Mon Sep 17 00:00:00 2001 From: huanmeng_qwq <1871735932@qq.com> Date: Thu, 22 Feb 2024 17:17:33 +0800 Subject: [PATCH] UserClickButtonListener should be internal --- .../kookbc/impl/event/internal/UserClickButtonListener.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/snw/kookbc/impl/event/internal/UserClickButtonListener.java b/src/main/java/snw/kookbc/impl/event/internal/UserClickButtonListener.java index a21baa58..c92770c7 100644 --- a/src/main/java/snw/kookbc/impl/event/internal/UserClickButtonListener.java +++ b/src/main/java/snw/kookbc/impl/event/internal/UserClickButtonListener.java @@ -33,7 +33,7 @@ public UserClickButtonListener(KBCClient client) { this.client = client; } - @EventHandler + @EventHandler(internal = true) public void event(UserClickButtonEvent event) { String value = event.getValue(); if (!value.startsWith(HELP_VALUE_HEADER)) { @@ -43,7 +43,6 @@ public void event(UserClickButtonEvent event) { int page = detail.get("page").getAsInt(); int currentPage = detail.get("current").getAsInt(); String messageType = detail.get("messageType").getAsString(); - boolean force = detail.has("force") && detail.get("force").getAsBoolean(); if (page == currentPage) { return; } @@ -117,7 +116,6 @@ public void event(UserClickButtonEvent event) { if (messageType.equals("PM")) { Message message = this.client.getCore().getUnsafe().getPrivateMessage(event.getMessageId()); - ; message.setComponent(finalComponent); } else if (messageType.equals("CM")) { Message message = this.client.getCore().getUnsafe().getTextChannelMessage(event.getMessageId());