Modbot Docs
Discord

Messages and analytics

What the bot keeps from your Discord server, who can read stored messages, and the Discord charts built from it.

Once the bot is connected, Modbot keeps a record of your Discord server: its messages, who joins and leaves, moderation in the server, and time spent in voice. That record feeds the Discord members list, the person popup, AutoMod, the Discord page, and the Discord parts of the Stats page, described below.

What the bot stores

Messages

The bot stores every message in the channels and threads it can see, including messages from bots. For each message it keeps:

  • who sent it, in which channel or thread, and when;
  • the text;
  • the names, types and sizes of attached files, and Discord's link to each file. The files themselves are not downloaded;
  • which message it replied to, how many embeds and mentions it had, and whether it is pinned;
  • edits: the current text, and each earlier version of the text;
  • deletes: a deleted message is kept and marked as deleted, because the deleted message is often the one a moderator needs.

Without the Message Content Intent (see Setting up the bot), Discord sends messages with no text. Modbot still stores the rest.

Reading back older messages

When the bot first connects, it reads back the history of every channel and thread where it has View Channels and Read Message History. It reads each channel from newest to oldest, about two pages of 100 messages a second, so it leaves room for everything else the bot does. A small server finishes in minutes; a very large one can take hours.

It stops reading a channel when it reaches the first message, or when it finds three pages in a row it already has. If Modbot restarts part way through, it carries on where it stopped.

The Discord bot card on the Health page shows progress, for example Message history read back: 12 of 40 channels and threads · 85,000 messages stored, and how many channels it has no access to.

Catching up after being offline

When the bot reconnects after being away, it catches up on what it missed:

  • new messages in each channel since the newest one it has;
  • who joined and left, by comparing the member list with what it had;
  • bans, kicks, timeouts, role changes and removed messages, from the server's audit log;
  • who is in voice now.

For something it only found out about afterwards, Modbot records the window it happened in (between when the bot was last listening and when it came back) rather than making up an exact time.

Members, moderation and voice

The bot also records these as events, which appear in the audit log and the person popup, and can be sent to event channels:

  • people joining and leaving the server, nickname changes, and Discord roles given or taken away;
  • bans, unbans, kicks, timeouts and timeouts removed;
  • messages removed by a moderator, one at a time or in bulk;
  • channels and roles created, changed or deleted;
  • people joining, leaving and moving between voice channels.

With the View Audit Log permission, the bot also records who did each ban, kick, timeout, role change and message removal. Without it, those events are recorded with nobody named.

Time in voice is counted from these voice events.

How long messages are kept

Set how long messages are kept under Settings → Server, on the Keep for (days) panel, in Discord messages. 0 keeps them forever. Older messages, with their earlier edited versions, are removed by Modbot's retention job, and a message older than the setting is not stored in the first place. See Data and retention.

The daily totals behind the charts are kept after the messages themselves are gone, so charts can go back further than the stored messages.

Who can read messages

Stored messages can only be read by someone with Read Discord messages. Of the built-in roles, only Administrator has it. Give it to another role on the Roles page if you want to (see Roles and permissions).

With it, a person's popup has a Messages tab showing everything that person wrote, newest first, 50 to a page:

  • the channel, and the thread when there is one;
  • the text as it reads now, or No text;
  • attached files, as links;
  • an Edited mark when the text was changed, and a Deleted mark when the message was deleted. Hover over either mark to see when.

The app shows the current text of an edited message, not its earlier versions.

Nothing else in Modbot shows a person's messages. The Discord page, the Stats page and the popup's Discord tab only count them, and a flag quotes only the message a rule matched.

Discord analytics

The Discord page is under Integrations in the sidebar. It needs See analytics. It shows the server's header, who is in voice, and This week. Under the header, as in Discord's own server column: Overview (this page), Events (the calendar), Members (Discord members) and Bans (the Discord ban list).

The server's charts are on the Stats page, in the Discord part of each tab: Growth has Growth, Members and New members still here; Activity has Activity, Went quiet and Top contributors; Moderation has Moderation.

Active means the person sent a message or spent time in voice. Bots are never counted.

This week

Under the server's header, four numbers for the last seven days (today included), each with how far it moved from the seven days before: ▲ up, ▼ down, or Same as last week, like the first screen of Discord's own Server Insights. Press This week to open the Activity tab of Stats.

FigureWhat it shows
New membersPeople who joined in the week and are still in the server. Someone who joined and left again, for example a captcha bot's kick, is not counted.
TalkedDifferent people who sent a message or were in voice.
MessagesMessages sent.
Time in voiceTime spent in voice channels.

Modbot's numbers will not match Discord's exactly. Discord counts a "communicator" only after three messages, and its voice figure is time spent speaking; Modbot's is time connected. Discord's Visitors (people who opened the server) is not something a bot can see.

On Stats, the range buttons at the top of the page set the range for the Discord parts too: 7 days, 30 days, 90 days or All time.

What the bot can read

At the top of each Discord part on Stats, after Details, Modbot says how many of the server's channels the bot can read, for example Reads 35 of 165 channels, and No audit log if it cannot read the audit log. It is shown in amber when anything is missing. With Manage settings, it links to the Discord part of Settings, which lists what the bot may do in each channel (see Permissions the bot needs).

Messages in a channel the bot cannot read are counted nowhere on the page: not in the totals, the busiest channels, active members or top contributors. Kicks and removed messages are only ever read from the audit log. To fill the gaps, give the bot's role View Channels and Read Message History in those channels, and View Audit Log, in Discord's server settings.

Growth

PanelWhat it shows
MembersDiscord's own member count, as last read, with how much it moved over the range.
JoinedPeople who joined in the range.
Still here after 7 daysThe share of people who joined in the range (at least a week ago) who were still in the server a week later.
Joins and leaves per dayPeople who Joined and Left each day. Switch to Member count for the count over time, from the last reading each day.

Activity

PanelWhat it shows
Messages and Time in voiceTotals for the range.
Messages per dayMessages sent each day.
Active membersDifferent people active each day. Switch between Day, 7 days and 30 days to count people active over a day, the week ending that day, or the 30 days ending that day. The latest figures are shown underneath.
Time in voice per dayTime spent in voice each day.
Busiest channelsThe 10 channels with the most messages in the range; Show all lists up to 20. Each has the picture Discord gives its kind (# text, a speech bubble for a forum, a speaker for a voice channel's own chat, a megaphone for announcements) and, after the count, its category, or Deleted if the channel is gone from Discord.
Busiest hoursMessages by day of the week and hour, in your own time zone (shown in the title).
Went quietSee below.
Top contributorsSee below.

Moderation

Moderation actions per day: Bans, Kicks, Timeouts and Messages removed each day. Bans in the corner opens the Discord ban list, if you may open it. When the bot cannot read the audit log, the panel says No audit log: kicks and removed messages missing. Bans and timeouts still show, because the bot sees those without it.

Members

About who is in the server now, whatever range you picked. Bots are not counted.

FigureWhat it shows
Linked to VRChatHow many members have linked a VRChat account, out of everyone in the server.
New accounts joiningOf the people who joined in the last 30 days, the share whose Discord account was under 30 days old when they joined, and how many of them are still here. An account's age comes from its id.
Here 1y or moreThe share of members who joined over a year ago.
How long members have been hereEveryone in the server split into Under 1mth, 1–6mth, 6–12mth and 1y or more. Someone whose join the bot never saw counts from when it first saw them.

New members still here

For people who joined in the range, at least 7 or 30 days ago:

ColumnMeaning
After7 days or 30 days after joining.
JoinedHow many joined.
Still hereHow many had not left, been kicked or been banned by then.
Still activeHow many were active in the week after that point.

Went quiet

This panel is about now, whatever range you picked. It counts current members who were active in the 30 days before the last 30, but have not been active since, and lists up to 20 of them with their messages and voice time from back then.

Top contributors

The 20 people who sent the most messages in the range, with their time in voice. Bots are not counted.

Every name on the page opens that person's popup (see Discord members).

If no Discord server is set up, or the bot has not read anything yet, the charts are empty.

Modbot is not endorsed by or affiliated with VRChat Inc. or Discord Inc. VRChat is a trademark of VRChat Inc. Discord is a trademark of Discord Inc. SteamVR is a trademark of Valve Corporation. Windows is a trademark of Microsoft Corporation. Docker is a trademark of Docker, Inc. PostgreSQL is a trademark of the PostgreSQL Community Association of Canada. Railway is a trademark of Railway Corp. Other names are trademarks of their respective owners; see Legal. Modbot and its logo are trademarks of the Modbot project. Open source under AGPL-3.0.

On this page