Skip to content

Commit

Permalink
fix(application-form): give menu permanent lifespan
Browse files Browse the repository at this point in the history
Since application menus where users are going to apply from are going to
be permanent, we need their component IDs to not expire by the cache.

Previously there was a problem while testing where the already-existing
menus would expire and the Discord client would complain.

Refs: Together-Java#1024
  • Loading branch information
christolis committed Oct 6, 2024
1 parent 29c8ee6 commit 0bad5db
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ private void sendMenu(final CommandInteraction event) {
MessageEmbed embed = createApplicationEmbed();

StringSelectMenu.Builder menuBuilder = StringSelectMenu
.create(generateComponentId(Lifespan.REGULAR, event.getUser().getId()))
.create(generateComponentId(Lifespan.PERMANENT, event.getUser().getId()))
.setPlaceholder("Select role to apply for")
.setRequiredRange(1, 1);

Expand Down

0 comments on commit 0bad5db

Please sign in to comment.