Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

isKeyedSaveEventFor

isKeyedSaveEventFor(record, handle): boolean

Whether record, carried by any key event, names the key handle names: the same declaration, parent and key. A system that opens several keys reads each event’s record through it.

Parameter Type
record KeyAskedRecord | KeyClosedRecord | KeyDeletedRecord | KeyFetchedRecord | KeyOpenedRecord | KeyRefusedRecord
handle KeyedSaveHandle

boolean

for (const { record } of readEvents(step, KeyOpenedEvent))
if (isKeyedSaveEventFor(record, guildBanks.for("ravens"))) stockBank(step, record);