Skip to content

ShardlensClient

Defined in: packages/client/src/client.ts:63

Reads one collector. Every method rejects with a ShardlensClientError when it can’t get an answer.

readonly activity: ShardlensActivity

Defined in: packages/client/src/client.ts:121

Who ran what: the activity log of a collector in audit mode.

audience(spec, options?): Promise<AudienceResult>

Defined in: packages/client/src/client.ts:85

Unique users per day, week and salt period, and how runs split by locale, install, context and member tier.

Omit<AudienceQuery, "kind">

RequestOptions

Promise<AudienceResult>


bursts(spec, options?): Promise<BurstsResult>

Defined in: packages/client/src/client.ts:91

Minutes with far more runs than the median minute.

Omit<BurstsQuery, "kind">

RequestOptions

Promise<BurstsResult>


command(name, spec, options?): Promise<CommandResult>

Defined in: packages/client/src/client.ts:71

One command in depth: outcomes, subcommands, options, where and by whom it runs.

string

Omit<CommandQuery, "kind" | "name">

RequestOptions

Promise<CommandResult>


commands(spec, options?): Promise<CommandsResult>

Defined in: packages/client/src/client.ts:69

Every command that ran or is registered, compared with the period before.

Omit<CommandsQuery, "kind">

RequestOptions

Promise<CommandsResult>


eventProps(spec, options?): Promise<EventPropValues>

Defined in: packages/client/src/client.ts:99

One custom event’s property names or, with prop, the most common values of that property.

Omit<EventPropsQuery, "kind" | "prop"> & object

RequestOptions

Promise<EventPropValues>

eventProps(spec, options?): Promise<EventPropKeys>

Defined in: packages/client/src/client.ts:103

Omit<EventPropsQuery, "kind" | "prop"> & object

RequestOptions

Promise<EventPropKeys>

eventProps(spec, options?): Promise<EventPropsResult>

Defined in: packages/client/src/client.ts:107

Omit<EventPropsQuery, "kind">

RequestOptions

Promise<EventPropsResult>


events(spec, options?): Promise<EventsResult>

Defined in: packages/client/src/client.ts:97

The custom events sent with track().

Omit<EventsQuery, "kind">

RequestOptions

Promise<EventsResult>


funnel(spec, options?): Promise<FunnelResult>

Defined in: packages/client/src/client.ts:109

How many people got through 2 to 5 steps (custom events or commands), in order.

Omit<FunnelQuery, "kind">

RequestOptions

Promise<FunnelResult>


gauge(spec, options?): Promise<GaugeResult>

Defined in: packages/client/src/client.ts:89

A gauge over time, such as shard.ping_ms or memory.rss_bytes.

Omit<GaugeQuery, "kind">

RequestOptions

Promise<GaugeResult>


growth(spec, options?): Promise<GrowthResult>

Defined in: packages/client/src/client.ts:83

Servers joined and left, activation, cohorts and how long servers stay.

Omit<GrowthQuery, "kind">

RequestOptions

Promise<GrowthResult>


heatmap(spec, options?): Promise<HeatmapResult>

Defined in: packages/client/src/client.ts:77

Counts by weekday and hour of the day.

Omit<HeatmapQuery, "kind">

RequestOptions

Promise<HeatmapResult>


installs(spec, options?): Promise<InstallsResult>

Defined in: packages/client/src/client.ts:95

User installs and removals, from Discord’s webhook events.

Omit<InstallsQuery, "kind">

RequestOptions

Promise<InstallsResult>


live(options?): AsyncIterable<LiveUpdate>

Defined in: packages/client/src/client.ts:119

What the bot is doing right now, about once a second, over Server-Sent Events. The connection opens when iteration starts and is closed when it ends: on the signal, on leaving the loop, or when the collector closes the stream (a restart, a proxy’s time limit). Call live() again to reconnect.

RequestOptions

AsyncIterable<LiveUpdate>


meta(options?): Promise<Meta>

Defined in: packages/client/src/client.ts:113

The app and how its collector is set up: mode, salt period, time zone, retention.

RequestOptions

Promise<Meta>


overview(options?): Promise<OverviewResult>

Defined in: packages/client/src/client.ts:67

The bot at a glance: the last 30 days of runs, servers, users, and whether events are arriving.

RequestOptions

Promise<OverviewResult>


premium(spec, options?): Promise<PremiumResult>

Defined in: packages/client/src/client.ts:93

Entitlements and subscriptions by SKU, and the premium share of runs.

Omit<PremiumQuery, "kind">

RequestOptions

Promise<PremiumResult>


query<S>(spec, options?): Promise<QueryResults[S["kind"]]>

Defined in: packages/client/src/client.ts:65

Runs any query. The answer’s type follows the spec’s kind.

S extends QuerySpec

S

RequestOptions

Promise<QueryResults[S["kind"]]>


reliability(spec, options?): Promise<ReliabilityResult>

Defined in: packages/client/src/client.ts:87

Missed deadlines, errors, REST calls, rate limits, shards and the SDK’s own health.

Omit<ReliabilityQuery, "kind">

RequestOptions

Promise<ReliabilityResult>


retention(spec, options?): Promise<RetentionResult>

Defined in: packages/client/src/client.ts:111

People who did one thing, by when they first did, and how many came back in each later period.

Omit<RetentionQuery, "kind">

RequestOptions

Promise<RetentionResult>


series(spec, options?): Promise<SeriesResult>

Defined in: packages/client/src/client.ts:73

A metric over time, optionally split by one dimension.

Omit<SeriesQuery, "kind">

RequestOptions

Promise<SeriesResult>


server(guild, options?): Promise<ServerResult>

Defined in: packages/client/src/client.ts:81

One server’s profile and history. found is false for a server the collector has never seen.

string

RequestOptions

Promise<ServerResult>


servers(spec?, options?): Promise<ServersResult>

Defined in: packages/client/src/client.ts:79

The servers the bot is or was in, filtered and sorted, one page at a time.

Omit<ServersQuery, "kind">

RequestOptions

Promise<ServersResult>


top(spec, options?): Promise<TopResult>

Defined in: packages/client/src/client.ts:75

The busiest values of one dimension: top commands, top servers, top routes.

Omit<TopQuery, "kind">

RequestOptions

Promise<TopResult>