A rebranded Discord bot that sends a stylish embedded welcome message via DMs when someone joins your server. It also tracks who invited who using invite codes and stores the data locally in json files.
greeting-bot/
├── commands/ # Bot commands like /invite and /stats
├── database/
│ └── invites.json # Local database for invite tracking
│ └── members.json # Local database for member tracking
├── events/
│ ├── guildMemberAdd.js # Handles new member joins (sends DM, tracks invite)
│ ├── guildMemberRemove.js # Handles member leaves
│ ├── inviteCreate.js # Handles tracking new invites
│ ├── inviteDelete.js # Handles the deletion of invites by removing them from the tracked invites database
│ └── ready.js # Logs bot startup
├── utils/
│ └── inviteValidator.js # Functions to sync and validate Discord invites
│ └── memberDatabase.js # DB logic between
├── .env # Bot token & Client ID
├── .gitignore # Ignores .env and node_modules
├── config.json # Bot settings
├── index.js # Bot entry point
├── package.json # Project metadata
├── package-lock.json # Exact dependency versions
└── README.md # You're reading this
- Sends a personalized DM welcome to new users
- Tracks who invited the new member (with invite code detection)
/inviteand/statsslash commands- Lightweight and modular structure
- Uses
.envandconfig.jsonfor easy configuration
git clone https://github.com/007codename/greeting-bot.git
cd greeting-botnpm installRename the .env.example file to .env and add your bot token & id:
GREETING_BOT_TOKEN=your_bot_token_here
GREETING_CLIENT_ID=your_client_id_here.gitignore.
Rename the config.json.example file to config.json and add the requested info to fit your server:
{
"guildId": "your_guild_id",
"joinLeaveChannelId": "your_join_leave_channel_id"
}node index.js- Make sure "Server Members Intent" is enabled in the Discord Developer Portal.
- This bot currently stores data locally in json files. For multi-server or persistent tracking, connect to a real database.
MIT License. Fork it. Remix it. Break it.
Discord: @007codename