Skip to content

Commit

Permalink
add missing await in collectors
Browse files Browse the repository at this point in the history
  • Loading branch information
ExampleWasTaken committed May 29, 2024
1 parent 0e24a94 commit 11a47c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/genericEmbedPagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export async function createPaginatedEmbedHandler(initialInteraction: CommandInt
const collector = message.createMessageComponentCollector({ filter, componentType: ComponentType.Button, time: 5_000 });

collector.on('collect', async (collectedInteraction: ButtonInteraction) => {
collectedInteraction.deferUpdate();
await collectedInteraction.deferUpdate();

if (collectedInteraction.customId === 'pagination_nextPage') {
currentPage++;
Expand Down
2 changes: 1 addition & 1 deletion src/lib/infractionEmbedPagination.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export async function createPaginatedInfractionEmbedHandler(initialInteraction:
const collector = message.createMessageComponentCollector({ filter, time: 5_000 });

collector.on('collect', async (collectedInteraction: ButtonInteraction) => {
collectedInteraction.deferUpdate();
await collectedInteraction.deferUpdate();

if (collectedInteraction.customId === 'infractions_about') {
currentPage = 0;
Expand Down

0 comments on commit 11a47c4

Please sign in to comment.