Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
Change list formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
acdvs committed Aug 13, 2021
1 parent 4428aa8 commit b0728b2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
13 changes: 5 additions & 8 deletions src/structures/RelicCollection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,11 @@ export default class RelicCollection {
: [];

for (const tier of this.tiers) {
if (!tier.isEmpty()) {
descriptionLines.push(
`**Tier ${tier.id}:** ${tier.getFormattedList({
separator: ' ',
code: true,
})}`
);
}
descriptionLines.push(
`**Tier ${tier.id}:** ${
tier.getFormattedList({ separator: ', ' }) || 'None'
}`
);
}

embed.setDescription(descriptionLines.join('\n'));
Expand Down
7 changes: 1 addition & 6 deletions src/structures/RelicTier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,7 @@ export default class RelicTier {
return '';
}

return this.relics
.map((r) => {
const relicStr = `T${r.tier.id}-${r.id}`;
return opts.code ? `\`${relicStr}\`` : relicStr;
})
.join(opts.separator);
return this.relics.map((r) => r.id).join(opts.separator);
}

serialize(): RawTierData {
Expand Down
1 change: 0 additions & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ export type EmbedOptions = {

export type TierFormattedListOptions = {
separator: string;
code: boolean;
};

export type RelicMetadata = {
Expand Down

0 comments on commit b0728b2

Please sign in to comment.