imranbarbhuiya/TagScript

EmbedParser: JSON Embed Parser will not parse 2nd level tags

Closed this issue · 5 comments

Issue description

Create an embed with the EmbedParser using JSON method and try to use a tag on image.url (for example)

image

Code sample

{embed: {
    "title": "{data.name}", <---- This one will parse
    "image": { "url": "{data.sprites.other.showdown.front_default}" }, <---- This one will not
    "color": 15194415
} }

Package version

latest

Node.js version

latest

Operating system

Windows 11

I have tested this issue on a next release

No response

Uhmm, soo any updates on this?

I'm busy with other tasks so haven't got the time to add it, It's not an easy fix as it requires changing the Lexer logic, I'll try to add support for this once I become free. You can also try to change that file and see if u can make it work then you can create a pr to fix it.

Or if the data is coming from ObjectTransformer/SafeObjectTransformer , then u can parse the keys in https://github.com/imranbarbhuiya/TagScript/blob/main/packages/tagscript/src/lib/Transformer/Object.ts#L19 to make it work too

Ohh sorry, I didn't mean to bother you.

Yes, i'll see if i can fix it, if so, i will make sure to make it a PR

Update: I recently migrated the project that was using TagScript to rust so I don't need it anymore, but I will try to fix the issue anyways but it may be more late

fixed and released a new version