No description
- TypeScript 98.8%
- Nix 1.1%
- JavaScript 0.1%
VSC Bot
Discord moderation and utility bot for the VSC community server. Built with discord.js v14 and TypeScript.
Features
Auto-Moderation
- Bad words filter — Automatically flags and removes profanity
- Phone number detection — Detects and removes Venezuelan phone numbers, mutes senders
- Text wall prevention — Deletes messages over 600 characters
- Scam/spam detection — Detects crypto scams, Discord invite spam, Steam scams, Telegram/WhatsApp link spam, and more
- Bot message cleanup — Automatically removes messages from Mudae, NotSoBot, fmbot, and command messages
- Attachment permission adviser — Replies when users ask for media posting permission
- Auto thread creation — Creates threads automatically in configured channels
- Recommendation reactions — Adds emoji reactions to posts in specific channels
Leveling System
- XP gained per message (15-25 XP, 10s cooldown)
- 16 reward roles from level 1 to 160
/rank— Check your level, XP, and position/levelsetup— Configure rewarded roles (admin)
Venezuelan Finance
- Scrapes BCV (Central Bank of Venezuela) for official USD/EUR exchange rates
- Fetches Binance P2P USDT/VES prices
/bcv— Get current exchange rates- Scheduled updates weekdays at 9:00 AM and 5:00 PM
Media Downloading
- Facebook video downloader
- Instagram video downloader
- YouTube video downloader (via yt-dlp API)
/dl— Download social media videos
Custom Roles
/role crear— Create a custom role with name and icon/role cambiar— Change your custom role's name or icon
Social & Fun
- Starboard — Messages with 6+ reactions get promoted
/afk— Set an AFK status/cats— Random cat videos>gel— Search Gelbooru>tcg— Search Pokémon TCG cards- Channel switcher (
>gl) — Toggle between general channels
AI / Utilities
/contexto— Analyzes last 50 messages and summarizes chat context using Gemini AI- AI Chat — Gemini-powered chatbot in designated channel
- Emoji management (
>emote) — Add, delete, rename emojis /say— Make the bot speak (owner only)/shutdown— Gracefully shut down the bot (owner only)/ping— Check API latency/help— List all commands
Logging
- Message logging (create, edit, delete)
- Slash command usage logging
- Reaction logging
- Deleted image/video backup
- Automod action logging
- Error reporting to designated channel
Welcome System
- Ghost ping on verification
- Webhook welcome messages (auto-delete after 1 min)
- Group greetings for batch verifications
- Staff alerts for new joins
- Partnership server greetings
Commands
Slash Commands
| Command | Description | Access |
|---|---|---|
/help |
List all commands | Everyone |
/ping |
Bot latency | Everyone |
/rank |
Your level and XP | Everyone |
/bcv |
BCV exchange rates | Everyone |
/afk |
Set AFK status | Everyone |
/cats |
Random cat video | Everyone |
/contexto |
Analyze chat context | Everyone |
/role crear |
Create custom role | Everyone |
/role cambiar |
Change custom role | Everyone |
/levelsetup |
Configure leveling | Admin |
/shutdown |
Shut down bot | Owner |
/say |
Make bot speak | Owner |
/setchannelname |
Rename channel | Owner |
/setchanneldescription |
Change channel description | Owner |
/getmention |
ID to mention | Moderator |
/ignore / /unignore |
Manage automod ignores | Disabled |
Prefix Commands (prefix: >)
| Command | Description | Access |
|---|---|---|
>gel |
Search Gelbooru | Everyone |
>tcg |
Search Pokémon TCG | Everyone |
>rules |
Show server rules | Everyone |
>dl |
Download media | Everyone |
>gl |
Switch general channel | Everyone |
>clearbots |
Clear bot messages | Moderator |
>emote |
Manage emojis | Moderator |
>replace |
Replace text in message | Owner |
>updateactive |
Update member count | Owner |
Setup
Prerequisites
- Node.js v18+
- pnpm
- A Discord application with bot token
Installation
git clone <repo-url>
cd vscbot
pnpm install
Configuration
Copy .env.template to .env and fill in the values:
TOKEN=your_bot_token_here
API_PORT=3006
DATABASE_DIR=./data
CUSTOM_ICONS_DIR=./icons
WEBHOOK_WELCOME_CHANNEL=your_webhook_url
MAIN_SERVER=your_guild_id
Building & Running
# Build
pnpm build
# Start
pnpm start
# Development (hot reload)
pnpm dev
Deploy Commands
pnpm deploy-commands
Tech Stack
- Runtime: Node.js + TypeScript
- Framework: discord.js v14
- Database: SQLite (via
sqlite3+sqlite) - API: Express (status endpoint)
- AI: Google Gemini API
- Scraping: Cheerio + Axios
- Image processing: Jimp
Project Structure
src/
├── index-vsc.ts # Entry point
├── commands/ # Command handlers
├── events/ # Discord event listeners
├── functions/ # Core bot logic
│ ├── automod/ # Auto-moderation modules
│ ├── levels/ # Leveling system
│ ├── lib/ # Shared utilities
│ ├── loggers/ # Specialized loggers
│ ├── timers/ # Scheduled tasks
│ └── welcome/ # Welcome/greeting scripts
├── handlers/ # Loader modules
├── db/ # Database layer
├── config/ # JSON configuration files
└── interfaces/ # TypeScript type definitions
License
ISC