Statistics
Daily statistics
/v1/guilds/:guildId/statsDay-by-day counts for the server: joins, leaves, kicks, bans, timeouts, boosts, messages sent, edited and deleted, voice joins and voice minutes, plus member count and active members. Every day in the range has a point, zero when nothing happened, so a series can be charted as it comes.
Days are UTC calendar days, and from and to are both inclusive. The response echoes the range nyx actually applied, which can be narrower than the one asked for when it reaches past the history nyx keeps.
kind says how to read a series. A count adds up across days, so total is the sum over the range. A gauge (member_count, active_members) is a level on each day: total is the latest day's value, and average is usually the number you want.
average is the mean per day over the range, rounded to one decimal. memberCount is the member count right now, not a day in the range.
Query parameters
metriccomma-separated list- Comma-separated metrics to return, in that order, such as
member_join,message_sent. Defaults to every metric. An unknown name is a 400 that lists the valid ones.- member_join
- Times someone joined. A member who leaves and rejoins counts each time, and bots count too.
- member_leave
- Times someone left, including kicks and bans. A member who leaves twice counts twice.
- member_kick
- Kicks, by anyone. Read from the audit log, so only counted while nyx has View Audit Log.
- member_ban
- Bans, by anyone, including bans issued through other bots.
- member_unban
- Bans lifted.
- member_timeout
- Timeouts put on members who were not already timed out. Extending a timeout does not count again. Timeouts on members nyx has not seen recently are read from the audit log, so those are only counted while nyx has View Audit Log.
- member_early_leave
- Members who left within 7 days of joining. Only counted when nyx knows when the member joined, so it can run low.
- member_count
- Gauge: the member count from the day's last hourly snapshot.
- message_sent
- Messages sent by members. Bots, webhooks and system messages are not counted.
- message_deleted
- Messages deleted one at a time, by their author or by staff. Messages nyx knows came from a bot are not counted.
- message_bulk_deleted
- Messages removed in bulk: purge commands, or bans that clear history.
- message_edited
- Text edits to recent messages nyx still has in memory. Edits to older messages are not counted.
- active_members
- Gauge: distinct members who sent a message or joined voice that day.
- voice_join
- Times a member connected to voice. Each connection counts, so one member joining three times is 3; moving between channels is not a new join.
- voice_minutes
- Minutes members spent in voice channels. Bots are not counted.
- boost
- Members who started boosting. A member adding another boost is not counted again.
fromdate- First day, inclusive, in UTC. Defaults to 29 days before
to, so the default range is 30 days. todate- Last day, inclusive, in UTC. Defaults to today. The range may span at most 365 days.
Errors
400 BAD_REQUEST when:
fromortois not a real date inYYYY-MM-DDform.fromis afterto.- The range spans more than 365 days, counting both ends.
metricnames a metric that does not exist.
Plus the failures every endpoint shares, listed under errors & limits.