import { SchemaStore, Schema } from "@sapphire/string-store";
const Id = {
AgeUpdate: 0,
StrengthUpdate: 1,
};
// Create the store
const store = new SchemaStore()
.add(new Schema(Id.AgeUpdate).int32("age"))
.add(new Schema(Id.StrengthUpdate).float32("strength"));
const buffer = store.serialize(Id.AgeUpdate, { age: 1 }).toString();
import { SchemaStore, Schema } from "@sapphire/string-store";
const Id = {
AgeUpdate: 0,
StrengthUpdate: 1,
};
// Create the store
const store = new SchemaStore()
.add(new Schema(Id.AgeUpdate).int32("age"))
.add(new Schema(Id.StrengthUpdate).float32("strength"));
const buffer = store.serialize(Id.AgeUpdate, { age: 1 }).toString();