A simple Discord bot that monitors an announcement channel, automatically adds a ✅ reaction to new posts, and reminds users via DM every 2 hours if they haven’t reacted yet.
Built with TypeScript, Discord.js v14, and nodemon for hot reloading.
- Automatically reacts to new messages in your announcement channel.
- Tracks which users have reacted with ✅.
- Sends DM reminders every 2 hours to those who haven’t reacted.
- Updates the bot’s avatar on startup.
- No database required — runs entirely in memory.
discord-checkin-bot/
├─ bot/
│ └─ index.ts # main bot logic
├─ .env # environment variables
├─ package.json # project dependencies and scripts
├─ tsconfig.json # TypeScript config
├─ nodemon.json # nodemon config (optional)
└─ README.md
-
Clone this repository
git clone https://github.com/ledgerwave/discord-bot.git cd discord-bot -
Install dependencies
npm install
-
Create a
.envfileDISCORD_TOKEN=your_discord_bot_token_here ANNOUNCEMENT_CHANNEL_ID=your_announcement_channel_id GENERAL_CHANNEL_ID=your_general_channel_id MODERATOR_ID=your_moderator_user_id CHECKMARK=✅ REMINDER_INTERVAL=5000 MAX_MISSED_CHECKINS=5 BOT_ICON_PATH=./assets/icon.png
DISCORD_TOKEN→ Your Discord bot token (from the Discord Developer Portal)ANNOUNCEMENT_CHANNEL_ID→ Channel where announcements are postedGENERAL_CHANNEL_ID→ Channel where moderator notifications are sent (e.g., general channel)MODERATOR_ID→ User ID of the moderator to notifyCHECKMARK→ Emoji used for check-ins (default: ✅)REMINDER_INTERVAL→ Interval between reminders in milliseconds (default: 5000ms = 5 seconds)MAX_MISSED_CHECKINS→ Number of missed check-ins before notifying moderator (default: 5)BOT_ICON_PATH→ Optional path to your bot's avatar image
-
Enable Intents in Developer Portal
-
Go to Bot → Privileged Gateway Intents
-
Enable:
- ✅ Server Members Intent
- ✅ Message Content Intent
-
npm run startnpx ts-node index.tsThe bot will:
- Log in to Discord
- Set its avatar (optional)
- React ✅ to new announcement messages
- DM users who haven’t reacted every 2 hours
| Command | Description |
|---|---|
npm run start |
Start the bot with nodemon (auto-reload) |
npx ts-node index.ts |
Run once using ts-node |
npm run build |
(Optional) Compile to JavaScript if you add a build script |
-
If users have DMs disabled for server members, they will not receive reminders.
-
All data (reactions, users) is stored in memory — restarting the bot resets the data.
-
You can change the reminder interval inside
index.ts:const REMINDER_INTERVAL = 2 * 60 * 60 * 1000; // 2 hours
MIT License © 2025 Your Name
Pull requests and improvements are welcome! Feel free to fork and modify this bot for your own server.