Viewerclass
Someone we currently believe is in chat. Tracked from join/leave/message events, so this is a best-effort roster of active chatters - not silent lurkers.
Constructors1
Showing 1 constructors
public Viewer()
No results match this filter.
Properties11
Showing 11 properties
public string[] Sandbox.Streamer.Viewer.Badges { get; set; }
Their chat badges, if we've seen a message from them.
string[]—public System.Nullable`1<Color> Sandbox.Streamer.Viewer.Color { get; set; }
Their chat name color, if we've seen a message from them with a valid color set.
public Sandbox.DataBag Sandbox.Streamer.Viewer.Data { get; set; }
Arbitrary per-viewer data - stash gameplay state here, e.g. `viewer.Data.Set( "score", 10 )`. Lazily created, so viewers with no data cost nothing. This lives only as long as the viewer is in the roster: if they leave (or get pruned) and come back it's a fresh viewer with an empty bag, so keep anything you can't afford to lose in your own game state instead.
public string Sandbox.Streamer.Viewer.DisplayName { get; set; }
Their display name. Falls back to `Sandbox.Streamer.Viewer.Username` until we've seen a chat message from them.
string—public bool Sandbox.Streamer.Viewer.HasChatted { get; set; }
Whether we've seen this viewer actually chat, or only join.
bool—public bool Sandbox.Streamer.Viewer.IsBroadcaster { get; set; }
Whether this viewer is the broadcaster (channel owner).
bool—public bool Sandbox.Streamer.Viewer.IsModerator { get; set; }
Whether this viewer is a channel moderator.
bool—public bool Sandbox.Streamer.Viewer.IsSubscriber { get; set; }
Whether this viewer is a subscriber (founders count as subscribers).
bool—public string Sandbox.Streamer.Viewer.StreamerId { get; set; }
The viewer's stable numeric platform user id. Unlike `Sandbox.Streamer.Viewer.Username` this never changes, so it's the key to use when persisting per-viewer state. Null until we've seen them chat, sub, or appear in the chatter list.
string—No results match this filter.