Skip to content

Commit

Permalink
fix: throw error at emoji undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
SocketSomeone committed Jan 13, 2024
1 parent 8bff83f commit 73b24a9
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/helpers/pagination-builder.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,17 @@ export class PaginationBuilder {
navigationPage = 'traversal';
}

return new ButtonBuilder()
const builder = new ButtonBuilder()
.setStyle(button.style)
.setEmoji(button.emoji)
.setLabel(button.label)
.setDisabled(disabled)
.setCustomId(`necord-pagination/${this.customId}/${navigationPage}`);

if (button.emoji) {
builder.setEmoji(button.emoji);
}

return new ButtonBuilder();
});
}
}

0 comments on commit 73b24a9

Please sign in to comment.