Skip to content

Commit e2e91f4

Browse files
committed
Add food effects
1 parent f21f474 commit e2e91f4

3 files changed

Lines changed: 770 additions & 169 deletions

File tree

src/commands/misc/material.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,17 @@ Note: this command supports fuzzy search.`,
153153
if (recipe)
154154
embed.addField("Recipe", data.getItemCosts(recipe))
155155

156+
const effect = material.effect
157+
if (effect && typeof effect == "string")
158+
embed.addField("Effect", effect)
159+
else if (effect && typeof effect == "object") {
160+
const effects = [
161+
...Object.entries(effect),
162+
...otherMaterial.filter(x => x.effect && typeof x.effect == "string").map(x => [`[${x.name}](${data.baseURL}materials/${urlify(x.name, false)})`, x.effect as string])
163+
]
164+
embed.addField("Effects", effects.map(([name, e]) => `**${name}**: ${e}`).join("\n"))
165+
}
166+
156167
const charAscension: Character[] = []
157168
const charTalents: Character[] = []
158169

0 commit comments

Comments
 (0)