string-store not finding identifiers other than first in Schema on deserialize typescript
I am working on some new code for my bot and using the string-store utility. I've gone through https://discord.com/channels/737141877803057244/1303945790057746452 and https://discord.com/channels/737141877803057244/1303856829461168138 and have been able to get the system working with the steps in there.
My schema is:
It works fine when serializing and all the properties are accessible. but when I try to access in an associated listener it says
deserialized.data
does not have property foo after the first.Solution:Jump to solution
Your store has 2 schemas, so when it deserializes a buffer, it can be one of the two. Compare the
id
or cast the value to the correct type to fix this.3 Replies
when I hover it shows everything there, and the logger statements show it properly deserialized in the console
Solution
Your store has 2 schemas, so when it deserializes a buffer, it can be one of the two. Compare the
id
or cast the value to the correct type to fix this.Ok I'll try figuring that out. Thank you.
Seemed to fix it thanks