Skip to content

Commit f21f474

Browse files
committed
Add food specialty to character command
1 parent f0b1ca8 commit f21f474

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/commands/characters/character.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,10 @@ Note: this command supports fuzzy search.`,
291291
if (upgradeLines.length > 0)
292292
embed.addField("Upgrade material", upgradeLines.join("\n"))
293293

294+
const specialties = Object.values(data.materials).filter(x => x.specialty && x.specialty.char == char.name)
295+
if (specialties.length > 0)
296+
embed.addField("Specialty", specialties.map(x => `[**${x.name}**](${data.baseURL}materials/${urlify(x.name, false)}) can be obtained while cooking [**${x.specialty?.recipe}**](${data.baseURL}materials/${urlify(x.specialty?.recipe ?? "", false)})`).join("\n"))
297+
294298
const guides = client.data.getGuides("character", char.name).map(({ guide, page }) => getLinkToGuide(guide, page)).join("\n")
295299

296300
if (guides)

0 commit comments

Comments
 (0)