A feature-rich multi-category Discord bot built with discord.js v14, MongoDB, Riffy/Lavalink, and Giphy API. It supports both prefix commands and slash commands, includes a full economy system, moderation tools, music playback, social interactions with GIFs, and components v2-based responses.
- Prefix and slash command support
- Components v2 help menu and rich response cards with media galleries
- MongoDB-backed economy and moderation storage
- Music playback through Riffy + Lavalink
- Canvas-based now playing image cards
- Giphy API integration for social commands with animated GIFs
- 9 command categories: Utility, Info, Fun, Moderation, Economy, Music, Image, Games, Social
- Global slash command registration on startup
- Auto-reload with nodemon for development
- Node.js
discord.jsv14 with Components V2mongooseriffycanvasaxiosdotenvchalk
- Install dependencies
npm install- Create your environment file
Copy .env.example to .env and fill in your values:
DISCORD_TOKEN=your_discord_bot_token
MONGODB_URI=your_mongodb_url
CLIENT_ID=your_client_id
GIPHY_API_KEY=your_giphy_api_key
SUPPORT_SERVER_URL=https://discord.gg/your-server
VOTE_URL=https://top.gg/bot/your_bot_id/vote- Start the bot
# Production
npm start
# Development (auto-reload)
npm run devDISCORD_TOKEN: Your bot tokenMONGODB_URI: MongoDB connection stringCLIENT_ID: Discord application client IDGIPHY_API_KEY: Giphy API key for GIF integration (get free at https://developers.giphy.com/)SUPPORT_SERVER_URL: Support server link used in the help menuVOTE_URL: Vote link used in the help menu
src/
commands/
economy/
fun/
games/
image/
info/
moderation/
music/
social/
utility/
events/
models/
utils/
database.js
giphy.js
musicCard.js
respond.js
config.js
index.js
ping- Check bot latencyremind- Set a reminderpoll- Create a poll with reactionscalculate- Perform calculationschoose- Choose randomly from optionsafk- Set AFK statustimestamp- Generate Discord timestampsuptime- Check bot uptimerandomnumber- Generate random numbersbase64- Encode/decode base64embed- Create custom embeds
avatar- Get user's avatarhelp- Show all commands with category selectorserverinfo- Get server informationuserinfo- Get user information
8ball- Ask the magic 8ballmeme- Get random memesroll- Roll dicecoinflip- Flip a coinship- Ship two users togetherrps- Play rock paper scissorsrate- Rate something out of 10joke- Get random jokeswouldyourather- Get would you rather questionsfact- Get random fun facts
ban- Ban a memberkick- Kick a memberlock- Lock a channelunlock- Unlock a channellockdown- Lock all channelsunlockdown- Unlock all channelsnickname- Change user nicknamepurge- Bulk delete messagesroleinfo- Get role informationslowmode- Set channel slowmodetimeout- Timeout a memberunban- Unban a userwarn- Warn a memberwarnings- View user warningsmute- Mute a memberunmute- Unmute a memberaddrole- Add role to memberremoverole- Remove role from member
balance- Check balancebuy- Buy from shopdaily- Claim daily rewarddeposit- Deposit to bankgamble- Gamble coinsinventory- View inventoryleaderboard- View server leaderboardrob- Rob another usershop- View shop itemsshopmanage- Manage shop itemstransfer- Transfer coinswithdraw- Withdraw from bankwork- Work for coins
loop- Toggle loop modelyrics- Get song lyricsnowplaying- Show current songplay- Play a songqueue- View music queueskip- Skip current songstop- Stop playbackvolume- Adjust volume
ascii- Convert text to ASCII artemojify- Convert text to emojismock- Convert to mocking SpongeBob caseclap- Add clap emojis between wordsvaporwave- Convert to vaporwave aestheticbubble- Convert to bubble textzalgo- Convert to zalgo/glitch textreverse- Reverse textcolor- Get color information from hex
tictactoe- Play tic-tac-toeguess- Guess a number gametrivia- Answer trivia questionsdice- Roll customizable dice
hug- Hug someonekiss- Kiss someonepat- Pat someoneslap- Slap someonehighfive- High five someonepoke- Poke someonewave- Wave at someonedance- Dance with someonecry- Crylaugh- Laugh
The help command uses components v2 and includes:
- A category overview panel with command counts
- A select menu for switching between categories
- Invite, support, and vote link buttons
- Both prefix and slash command support
Social commands integrate with Giphy API to display animated GIFs:
- Fetches random GIFs from Giphy based on action type
- Displays GIFs inline using MediaGallery components v2
- Includes fallback GIFs if API is unavailable
- "View GIF" button for opening in new tab
The economy system includes:
- Wallet and bank balances
- Daily rewards and work payouts
- Shop and inventory support
- Transfers, robbery, and gambling
- Server leaderboard views
The music system includes:
- Queue-based playback
- Play, skip, stop, loop, queue, and volume controls
- Canvas now playing cards with track information
- Lavalink-backed playback through Riffy
All commands use Discord's Components V2 for rich interactions:
ContainerBuilderfor structured layoutsTextDisplayBuilderfor formatted textMediaGalleryBuilderfor image/GIF displaysButtonBuilderfor interactive buttonsSeparatorBuilderfor visual spacing
This bot expects a working Lavalink-compatible node for music playback. The current connection is configured in src/index.js.
Make sure the bot has permission to:
- Connect to voice channels
- Speak in voice channels
- Send messages in the bound text channel
Current models include:
Guild- Server-specific settingsUser- User economy dataWarning- Moderation warnings
- Slash commands are registered globally on startup
- Global slash command updates can take some time to propagate
- Prefix is currently set to
! - Most rich bot responses are rendered through components v2
- Nodemon auto-reloads on file changes in development mode
- DNS configured with Google (8.8.8.8, 8.8.4.4) and Cloudflare (1.1.1.1, 1.0.0.1)
To add a new command:
- Create a file in the correct category inside
src/commands/ - Export:
categorynamedescriptiondata(SlashCommandBuilder)executePrefix(message, args, client)executeSlash(interaction, client)
- Use Components V2 for responses (ContainerBuilder, TextDisplayBuilder, etc.)
- Restart the bot (or use
npm run devfor auto-reload)
const { getGiphyGif } = require('../../utils/giphy');
// In your execute function
const gifUrl = await getGiphyGif('searchTerm');
// Use MediaGalleryBuilder to display
const gallery = new MediaGalleryBuilder().addItems(
new MediaGalleryItemBuilder().setURL(gifUrl)
);- Giphy API: Used for fetching animated GIFs in social commands
- Lavalink: Used for music playback through Riffy
- MongoDB: Used for persistent data storage
MIT