Table of Contents

Struct Sticker

Namespace
Signal.Domain.Messaging
Assembly
Signal.Domain.dll

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

packId string

The hex id of the sticker pack; normalized to lower case.

stickerId int

The index of the sticker within the pack.

Exceptions

SignalDomainException

packId is not hex, or stickerId is negative.

Properties

PackId

The hex id of the sticker pack.

public string PackId { get; }

Property Value

string

StickerId

The index of the sticker within the pack.

public int StickerId { get; }

Property Value

int

Methods

Parse(string)

Parses packId:stickerId (surrounding whitespace is trimmed).

public static Sticker Parse(string value)

Parameters

value string

The sticker text.

Returns

Sticker

The sticker.

Exceptions

SignalDomainException

value is not in the form packId:stickerId.

ToString()

Returns the API form packId:stickerId.

public override string ToString()

Returns

string

The sticker text, or an empty string for default.

TryParse(string?, out Sticker)

Tries to parse packId:stickerId.

public static bool TryParse(string? value, out Sticker sticker)

Parameters

value string

The sticker text.

sticker Sticker

The sticker when the method returns true.

Returns

bool

true if value is a valid sticker.