Skip to content

Commit

Permalink
Adds example for scheduled destruction in paginator instance.
Browse files Browse the repository at this point in the history
  • Loading branch information
ShindouMihou authored Jul 22, 2022
1 parent 4c6f0fb commit fba54cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions examples/PoemCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ public void onSelect(NexusPaginatorCursor<String> cursor, ButtonClickEvent event
.setButton(NexusPaginatorButtonAssignment.CANCEL, Button.create("customId", ButtonStyle.DANGER, "", "🔥"))
.build()
.send(event.getBaseEvent().getInteraction(), responseUpdater)
.thenAccept(instance -> instance.destroyAndRemoveButtonsAfter(Duration.ofSeconds(60)));
);

}
Expand Down

0 comments on commit fba54cf

Please sign in to comment.