Monitors YouTube and TikTok activity, and provides moderation tools with role-based access control and immune admin protection.
| Command | Description |
|---|---|
/ping |
Check bot latency, API response time, and system info (CPU, RAM, Uptime) |
/info |
Display server information in a rich embed |
Requires
MODERATOR_ROLE_ID. Users listed inIMMUNE_ADMINcannot be targeted.
| Command | Description |
|---|---|
/ban [target] [alasan] |
Ban a user from the server with an optional reason |
/kick [target] [alasan] |
Kick a user from the server with an optional reason |
/timeout [target] [durasi] [alasan] |
Timeout a user for 1–40320 minutes (up to 28 days) |
/untimeout [target] |
Remove timeout from a user |
/clear [jumlah] |
Bulk delete 1–100 messages in the current channel |
| Feature | Description |
|---|---|
| YouTube Video Notifier | Polls every 30s via YouTube Data API v3 for new video uploads |
| YouTube Live Notifier | Polls every 3 minutes and notifies when a channel goes LIVE on YouTube |
| TikTok Post Notifier | Scrapes TikTok profile every 30s for new posts using Puppeteer Stealth |
| TikTok Live Notifier | Connects via tiktok-live-connector and instantly notifies when a user goes LIVE |
- Real-time Presence — Displays online/total member count in bot status, updated on presence changes and member join/leave events
- Role-based Permissions — All moderation commands require a designated moderator role
- IMMUNE_ADMIN Protection — A specified user ID cannot be banned, kicked, or timed out by anyone
- Ephemeral Responses — All moderation feedback is private (only visible to the executor)
- Auto-deployment — Slash commands are automatically registered to the guild on bot startup
- Persistent State — YouTube and TikTok notifier state is saved in
notifier-state.jsonand survives restarts
- Node.js
>= 16.0.0 - A Discord Bot Token & Application
- YouTube Data API v3 Key (for YouTube monitoring)
-
Clone the repository
git clone https://github.com/DranxX/Bot.git cd Bot -
Install dependencies
npm install
-
Configure environment variables
Create a
.envfile in the root directory (see.env.example):TOKEN=your_discord_bot_token CLIENT_ID=your_application_id GUILD_ID=your_server_id NOTIFICATION_CHANNEL_ID=your_notification_channel_id MODERATOR_ROLE_ID=your_moderator_role_id IMMUNE_ADMIN=user_id_that_cannot_be_moderated YOUTUBE_API_KEY=your_youtube_data_api_v3_key
-
Configure social media targets
Edit
config.json:{ "youtubeChannelId": "UCxxxxxxxxxxxxxxxxxxxxxx", "tiktokUsername": "@your_tiktok_username" } -
Run the bot
npm start
| Variable | Description | Required |
|---|---|---|
TOKEN |
Discord bot token | ✅ |
CLIENT_ID |
Discord application (client) ID | ✅ |
GUILD_ID |
Server ID for command registration & presence | ✅ |
NOTIFICATION_CHANNEL_ID |
Channel ID where notifications are sent | ✅ |
MODERATOR_ROLE_ID |
Role ID required to use moderation commands | ✅ |
IMMUNE_ADMIN |
User ID that is immune to kick, ban, and timeout | ✅ |
YOUTUBE_API_KEY |
YouTube Data API v3 key for video & live monitoring | ✅ |
| Key | Description |
|---|---|
youtubeChannelId |
YouTube channel ID to monitor (e.g. UCxxxxxx) |
tiktokUsername |
TikTok username to monitor (including @) |
- Send Messages
- Use Slash Commands
- Ban Members
- Kick Members
- Moderate Members (Timeout)
- Manage Messages
- View Channels
- Read Message History
GuildsGuildMessagesMessageContentGuildMembersGuildPresences
npm install -g pm2
pm2 start index.js --name "DranxX-Bot"
pm2 save
pm2 startupnpm run dev- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request