Skip to content

Commit

Permalink
UserClickButtonListener should be internal
Browse files Browse the repository at this point in the history
  • Loading branch information
huanmeng-qwq committed Feb 22, 2024
1 parent 883d043 commit 18dcb1f
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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;
}
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 18dcb1f

Please sign in to comment.