Command.Storage.Set

Sets a storage element. If accessing guild storage, you will need the Write to Guild Addon Storage permission. If replacing an existing element, you will also need write access to that element as well as the Delete from Guild Addon Storage permission. You cannot create an element that you cannot read, nor can you create an element with Officer write permissions if you are not an Officer. This command is throttled by the "storage" throttle type.

Usage:

Command.Storage.Set(segment, identifier, read, write, data, callback)
ParameterTypeDatatypeDescription
callbackparametercallbackfunctionA standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details.
dataparameterstringThe data to store. This parameter is binary-safe.
identifierparameterstringThe identifier of the storage bucket. Must be at least three characters long.
readparameterstringRead permissions for this element. If the segment is "player", this may be "public", "guild", or "private", where public is readable by anyone, guild is readable by your guildmembers only, and private is readable by the player only. If the segment is "guild", this may be "public", "guild", or "officer", where public is readable by anyone, guild is readable by guildmembers with the Listen permission, and officer is readable by guildmembers with the Officer Chat permission.
segmentparameterstringThe storage segment to access. "player" will access the target's per-player storage, "guild" will access the target's guild's per-guild storage. If this function has no target parameter, then the player will be targeted.
writeparameterstringWrite permissions for this element. If the segment is "player", this must be "private", as only you may modify your own storage. If the segment is "guild", this may be "guild" or "officer", where guild is changeable by guildmembers with the Delete from Guild Addon Storage permission, and officer is changeable by guildmembers with the Delete from Guild Addon Storage permission and the Officer Chat permission. The write permission must be "officer" if the read permission is "officer".