kyra
SIASapphire - Imagine a framework
•Created by Dr. Software on 2/17/2025 in #sapphire-support
an easy simple question
Those:
- https://github.com/sapphiredev/utilities/blob/main/packages/lexure/src/lib/parser/strategies/PrefixedStrategy.ts#L25-L46
- https://github.com/sapphiredev/framework/blob/main/src/lib/structures/Command.ts#L114
5 replies
SIASapphire - Imagine a framework
•Created by choke on 2/11/2025 in #sapphire-support
Accessing a public method in a listener's class
Seeing you use TypeScript, you can do this instead:
That being said, pieces are supposed to be independent, so I would recommend you have a shared file for the two listeners and call from there rather than having a listener call another listener, it'll also solve casting and naming issues.
5 replies
SIASapphire - Imagine a framework
•Created by Amgelo on 2/10/2025 in #sapphire-support
string-store input validation
Yeah, I can make some checks
23 replies
SIASapphire - Imagine a framework
•Created by Amgelo on 2/10/2025 in #sapphire-support
string-store input validation
And I could make an option to make string-store insert RTTI, but it would still fail to validate correctly given arbitrary user input while deserialising
23 replies
SIASapphire - Imagine a framework
•Created by Amgelo on 2/10/2025 in #sapphire-support
string-store input validation
The lack of RTTI makes it very memory efficient
23 replies
SIASapphire - Imagine a framework
•Created by Amgelo on 2/10/2025 in #sapphire-support
string-store input validation
Yes
23 replies
SIASapphire - Imagine a framework
•Created by Amgelo on 2/10/2025 in #sapphire-support
string-store input validation
The way languages like JavaScript know what kind of object a region is, is because the memory has tags saying "hey, this is a string", "hey, this is a boolean", etc. string-store doesn't have RTTI, it's basically equivalent to doing
reinterpret_cast<MyStructure*>(&u16buffer)
, it just assumes23 replies
SIASapphire - Imagine a framework
•Created by Amgelo on 2/10/2025 in #sapphire-support
string-store input validation
Data is stored in binary format using the full range of UTF16
23 replies
SIASapphire - Imagine a framework
•Created by Amgelo on 2/10/2025 in #sapphire-support
string-store input validation
A 2 in a bitfield type is
0b10
😅23 replies
SIASapphire - Imagine a framework
•Created by Amgelo on 2/10/2025 in #sapphire-support
string-store input validation
My answer was for deserialization, for serialization I could add some validations
23 replies
SIASapphire - Imagine a framework
•Created by Amgelo on 2/10/2025 in #sapphire-support
string-store input validation
Oh, ok, note to self do not reply while commuting at 7:30 in the morning
23 replies
SIASapphire - Imagine a framework
•Created by Amgelo on 2/10/2025 in #sapphire-support
string-store input validation
It is impossible to do that considering string-store serialises similarly to the smallest representation of an object in memory without RTTI, there’s simply no information for that
And given arbitrary input, it’ll give you an error if it’s too short, or give you garbage (or an error) data otherwise, you would need to RTTI into it but even then it can still give you garbage data.
23 replies
SIASapphire - Imagine a framework
•Created by Baylem on 2/8/2025 in #sapphire-support
Precondition variations
Yes, it does
5 replies
SIASapphire - Imagine a framework
•Created by simnJS on 2/7/2025 in #sapphire-support
crash when loading a autocomplete
You can't defer in autocomplete, Favna
20 replies
SIASapphire - Imagine a framework
•Created by Amgelo on 2/4/2025 in #sapphire-support
string-store enum
You define an integer of the size you want, you then cast it later. For 1 byte uint that'd be
uint8
:)5 replies
SIASapphire - Imagine a framework
•Created by Jovan on 1/31/2025 in #sapphire-support
MikroORM with Sapphire (AsyncLocalStorage)
But as for MikroORM’s stuff… not the first question about it that’s been opened, I don’t know what they’re doing but it’s starting to feel like users use it in a way that works around using MikroORM rather than with them, and I’m curious to see more details about it to see what mechanisms we can recommend to make sure of everything
7 replies
SIASapphire - Imagine a framework
•Created by Jovan on 1/31/2025 in #sapphire-support
MikroORM with Sapphire (AsyncLocalStorage)
As a side note, if you want to switch from Prisma to something similar, there’s DrizzleORM
7 replies
SIASapphire - Imagine a framework
•Created by darktheages on 1/31/2025 in #sapphire-support
Skipped piece
That’s intentional
6 replies
SIASapphire - Imagine a framework
•Created by darktheages on 1/31/2025 in #sapphire-support
Skipped piece
That's the sourcemap file, not the actual piece file with the code.
6 replies
SIASapphire - Imagine a framework
•Created by darktheages on 1/25/2025 in #sapphire-support
How to find the context responses of Identifiers
I’d say check how Skyra does it 😅
4 replies