← Stats
<% if (!viewer) { %>
<%= q %>
No statistics for this viewer (yet). Names are Twitch logins, e.g. channel.
<% } else {
const hm = m => m >= 60 ? `${Math.floor(m / 60)} h ${m % 60} m` : `${m} m`;
const minutes = (viewer.watch.ticks || 0) * 5 + (viewer.importedMinutes || 0); %>
<%= viewer.name %> @<%= viewer.login %>
<%= viewer.level.name %>
<% if (viewer.hidden) { %> · hidden bot<% } %>
<% if (viewer.chat.first_seen) { %> · first chat <%= viewer.chat.first_seen.slice(0, 10) %>, last <%= viewer.chat.last_seen.slice(0, 10) %><% } %>
<%= viewer.total.toLocaleString() %>
points
<%= hm(minutes) %>
watched<%= viewer.importedMinutes ? ' · incl. StreamElements' : '' %>
<%= (viewer.chat.messages || 0).toLocaleString() %>
chat messages
<%= viewer.checkins %>
check-ins
<% for (const [k, v] of Object.entries(viewer.parts).sort((a, b) => b[1] - a[1])) { %><%= k %>: <%= v.toLocaleString() %><% } %>
<% if (viewer.emotes.length) { %>
Emotes
<% for (const e of viewer.emotes) {
const src = e.source === 'twitch' && e.emote_id ? `https://static-cdn.jtvnw.net/emoticons/v2/${e.emote_id}/default/dark/1.0`
: e.source === '7tv' && e.emote_id ? `https://cdn.7tv.app/emote/${e.emote_id}/1x.webp` : null; %>
<% if (src) { %>
<% } %><%= e.emote %> <%= e.uses %>
<% } %>
<% } %>
<% if (viewer.commands.length) { %>
Commands
<% for (const c of viewer.commands) { %><%= c.command %> <%= c.uses %><% } %>
<% } %>
<% if (viewer.actions.length) { %>
Actions
| Action | What | Times | Total | Last |
<% for (const a of viewer.actions) { %>
| <%= a.action.replace(/_/g, ' ') %> | <%= a.item %> | <%= a.uses %> |
<%= a.unit ? `${(+a.amount).toLocaleString()} ${a.unit}` : '' %> | <%= (a.last_at || '').slice(0, 10) %> |
<% } %>
<% } %>
<% } %>