iTranslated by AI
[Discord.js] Building a Discord Bot with Read Tracking and Reminder Features
Introduction
Hello, I'm saitogo.
In this article, I'll introduce and explain how to use a Discord BOT I developed that manages message read status and provides reminder functions for Discord servers.
"I posted an important announcement, but I don't know who has read it..."
"There is information I want everyone to read for sure, but it gets overlooked..."
"I want to remind people who haven't seen the message yet, but sending DMs manually to each person is tedious..."
To solve these issues, I developed a BOT that can visually manage the read status of messages and send reminders to those who haven't read them yet.

Overview of the Created BOT
Main Features
- Automatic Read Management: The BOT automatically adds a 👀 reaction to messages where it is mentioned.
- Check Read Status: Check who has read or not read a message at a glance using a slash command.
- Reminder Function: Send bulk DM reminders to those who haven't read the message.
- Target Specification: Flexible targeting for individuals, roles, @everyone, etc.
Usage Scenarios
- Important Announcements: Information you want to ensure all members have read.
- Event Notifications: Announcements for game events or streams.
- Business Communication: Important business updates within a team.
- Study Groups: Confirming sharing of assignments or materials.
Tech Stack
| Category | Technology | Description |
|---|---|---|
| Runtime | Node.js | JavaScript runtime environment |
| Language | TypeScript | Improving code quality through type safety |
| Library | Discord.js | Interaction with the Discord API |
| Execution Tool | tsx | Direct execution of TypeScript files |
| Formatter/Linter | Biome | High-speed code quality management tool |
| Environment Variable Management | dotenv | Loading environment variables |
Reasons for Selection
- TypeScript: Enhances development efficiency and code quality through type safety.
- Discord.js v14: Allows utilization of the latest Discord API features.
- Biome: Maintains code quality with a high-speed formatter and linter.
- tsx: Allows direct execution of TypeScript files without the need for compilation.
Project Structure
discord-readme-bot/
├── src/
│ ├── commands/ # Slash commands
│ ├── events/ # Event handlers
│ ├── utils/ # Utility functions
│ ├── config.ts # Configuration file
│ └── index.ts # Entry point
├── package.json
├── tsconfig.json
└── biome.json
How to Set Up the BOT
1. Prerequisites
- Node.js 18 or higher
- A BOT created on the Discord Developer Portal
- Appropriate permission settings
2. Necessary Permissions
Permissions must be configured via the Discord Developer Portal.
In the Installation page, please allow "Manage Message".

In the Bot page, please allow the following three: "Presence Intent", "Server Members Intent", and "Message Content Intent".

3. Environment Variable Settings
DISCORD_TOKEN=your_bot_token_here
CLIENT_ID=your_bot_client_id_here
4. Installation and Startup
# Install dependencies
npm install
# Start the BOT
npm start
# Development mode (monitor file changes)
npm run watch
How to Use
Step 1: Posting a Message
Mention the BOT and post an important message.
Be sure to mention the target users or roles as well.
When the BOT detects the message, it automatically adds a 👀 reaction.

Points:
- Always mention the BOT (@ReadmeBot)
- Mention the targets (individuals, roles, @everyone, @here)
Step 2: User Read Confirmation
Target users acknowledge they have read the message by clicking the 👀 reaction.
User Operations:
- After checking the message, click the 👀 reaction
- Confirm that the reaction count increases
Step 3: Checking Read Status
Administrators can check the current read status using the /readme check command.



Step 4: Sending Reminders
If there are unread users, you can send DM reminders with the /readme remind command.



Step 5: Received Reminder DM
Unread users will receive a DM like the one shown below.

Conclusion
In this article, I introduced a BOT developed using Discord.js and TypeScript that features message read management and reminders.
With intuitive read confirmation via the 👀 reaction and automatic DM reminders for unread users, the BOT successfully prevents important information from being overlooked while reducing the burden on administrators.
Please give it a try in any setting where reliable information sharing is required, such as game servers or team management.
The code is fully available on GitHub, so feel free to contribute or customize it!
Discussion