Struct Sticker
A sticker from an installed sticker pack, written as packId:stickerId (e.g. f3a9…:4).
Implements IParsable<TSelf>, so command arguments can bind to it.
public readonly record struct Sticker : IParsable<Sticker>, IEquatable<Sticker>
- Implements
- Inherited Members
Constructors
Sticker(string, int)
Creates a sticker reference.
public Sticker(string packId, int stickerId)
Parameters
packIdstringThe hex id of the sticker pack; normalized to lower case.
stickerIdintThe index of the sticker within the pack.
Exceptions
- SignalDomainException
packIdis not hex, orstickerIdis negative.
Properties
PackId
The hex id of the sticker pack.
public string PackId { get; }
Property Value
StickerId
The index of the sticker within the pack.
public int StickerId { get; }
Property Value
Methods
Parse(string)
Parses packId:stickerId (surrounding whitespace is trimmed).
public static Sticker Parse(string value)
Parameters
valuestringThe sticker text.
Returns
- Sticker
The sticker.
Exceptions
- SignalDomainException
valueis not in the formpackId:stickerId.
ToString()
Returns the API form packId:stickerId.
public override string ToString()
Returns
TryParse(string?, out Sticker)
Tries to parse packId:stickerId.
public static bool TryParse(string? value, out Sticker sticker)