Skip to content

Commit

Permalink
Update ExampleInteractions
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonmokk committed May 21, 2024
1 parent 3ed1483 commit 66f573d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/test/java/discord4j/core/ExampleInteractions.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public static void main(String[] args) {

Publisher<?> onSelect = client.on(SelectMenuInteractionEvent.class, event -> {
if (REPLY_MODE_SELECT.equals(event.getCustomId())) {
Snowflake user = event.getInteraction().getUser().getId();
Snowflake user = event.getUser().getId();
String selected = event.getValues().get(0);
String previous = modeByUser.put(user, selected);
if (previous == null) {
Expand All @@ -134,7 +134,7 @@ public static void main(String[] args) {
// create a listener that handles the button click
Publisher<?> onButton = client.on(ButtonInteractionEvent.class, event -> {
if (ACTION_BUTTON.equals(event.getCustomId())) {
Snowflake user = event.getInteraction().getUser().getId();
Snowflake user = event.getUser().getId();
String mode = modeByUser.getOrDefault(user, DEFER_REPLY);
switch (mode) {
case DEFER_REPLY:
Expand Down

0 comments on commit 66f573d

Please sign in to comment.