K
📎 1 file 4,117 chars
📄
pasted-code-1782765823875.txt
txt 32 lines
▶
Create a complete, professional, production-ready Discord bot for my hosting community called **Hector Hosting** using **Node.js (latest LTS)** and **discord.js v14**. Write clean, modular, well-documented code that follows modern best practices with a scalable folder structure. Use slash commands only, environment variables for all sensitive data, proper error handling, logging, and automatic command registration.

The main feature of the bot is a high-quality 24/7 music system that supports **YouTube, Spotify, SoundCloud, Deezer, and direct audio URLs**. Music playback should include `/play`, `/pause`, `/resume`, `/skip`, `/stop`, `/queue`, `/nowplaying`, `/volume`, `/loop`, `/shuffle`, `/remove`, `/seek`, `/lyrics`, and `/autoplay`. Support playlists, queue history, autoplay recommendations, high audio quality, fast loading, automatic reconnection, and stable playback suitable for 24/7 hosting.

Create a `/24/7` command that makes the bot permanently stay in a selected voice channel. When enabled, the bot should save the voice channel to the database, automatically reconnect after crashes, restarts, or Discord outages, and continue working without any manual setup. Include `/24/7 disable` to turn the feature off.

Create a powerful `/say` command that allows administrators to send either plain messages or professional embeds with customizable titles, descriptions, colors, images, thumbnails, footers, timestamps, and optional role mentions. The interaction response should delete itself after successfully sending the message.

Add an `/announce` command for administrators that creates clean, professional announcement embeds with support for titles, descriptions, colors, images, buttons, timestamps, and optional role mentions, making it easy to post updates for the Hector Hosting community.

Include useful utility commands such as `/ping`, `/help`, `/avatar`, `/userinfo`, `/serverinfo`, `/botinfo`, `/uptime`, and `/invite`, all with clean, modern embed responses.

Add a simple moderation system with `/clear`, `/kick`, `/ban`, `/timeout`, and `/untimeout`, including proper permission checks and automatic logging.

Create a configurable logging system that records deleted messages, edited messages, member joins and leaves, moderation actions, command usage, and bot errors into designated log channels.

Include a welcome and goodbye system with customizable embed messages, automatic role assignment for new members, placeholders, and configurable channels.

Add a reaction role system using buttons or dropdown menus so members can assign themselves roles without staff assistance.

Create a giveaway system with commands to start, reroll, and end giveaways using attractive embeds and buttons.

Include a suggestions command that posts ideas in a designated suggestions channel with automatic upvote and downvote buttons or reactions.

Add a configurable status rotation displaying messages such as **"Hosting Hector Hosting"**, **"Streaming Music 24/7"**, **"Managing Your Server"**, and the current number of servers the bot is in.

Use MongoDB with Mongoose to store all server settings, logging channels, welcome settings, announcement settings, music settings, reaction roles, suggestions, giveaway data, and 24/7 voice channel information.

Ensure the bot is optimized for performance with efficient caching, cooldowns, permission validation, graceful shutdown handling, automatic reconnection, memory optimization, and comprehensive error handling. Include owner-only commands for reloading commands, restarting the bot, shutting it down, syncing slash commands, and broadcasting announcements.

Generate the **entire project**, including every source file, folder, configuration file, `.env.example`, `package.json`, README, installation guide, deployment instructions for a VPS, PM2 configuration, Docker support, and complete documentation. The final result should feel like a polished, premium Discord bot designed specifically for **Hector Hosting**, with a modern appearance, reliable performance, attractive embeds, and code that is easy to maintain and expand.
Kodari AI
KodariJun 29 at 8:44 pm 1
HectorBot
A premium, production-ready Discord bot for Hector Hosting community. Features a 24/7 high-quality music system supporting YouTube, Spotify, SoundCloud, Deezer, and direct URLs with full playback controls. Includes moderation, logging, welcome/goodbye system with auto-roles, reaction roles, giveaways, suggestions, customizable embeds (say/announce), status rotation, and owner-only commands. Built with discord.js v14, MongoDB/Mongoose, slash commands only, PM2/Docker support, and comprehensive error handling for reliable 24/7 operation.

I’ll create the complete HectorBot project. Starting with the foundation, then building up through every system

HectorBot
A premium, production-ready Discord bot for Hector Hosting community. Features a 24/7 high-quality music system supporting YouTube, Spotify, SoundCloud, Deezer, and direct URLs with full playback controls. Includes moderation, logging, welcome/goodbye system with auto-roles, reaction roles, giveaways, suggestions, customizable embeds (say/announce), status rotation, and owner-only commands. Built with discord.js v14, MongoDB/Mongoose, slash commands only, PM2/Docker support, and comprehensive error handling for reliable 24/7 operation.

Creating the complete HectorBot project. Starting with foundation files.

Creating the complete HectorBot project. Starting with all foundation and configuration files.

Now I’ll create every file in the project. Starting with foundation files, then building up through every layer.

Kodari can make mistakes. Review important code before using.
Files
package.json
Code
1 29
package.json
{
  "name": "hector-bot",
  "version": "1.0.0",
  "description": "Premium Discord bot for Hector Hosting community with 24/7 music, moderation, giveaways, and more.",
  "main": "src/bot.js",
  "scripts": {
    "start": "node src/bot.js",
    "dev": "node src/bot.js",
    "pm2": "pm2 start ecosystem.config.js",
    "deploy": "node src/deploy-commands.js"
  },
  "engines": {
    "node": ">=18.0.0"
  },
  "dependencies": {
    "@discordjs/voice": "^0.17.0",
    "discord.js": "^14.18.0",
    "dotenv": "^16.4.7",
    "mongoose": "^8.9.2",
    "play-dl": "^1.9.7",
    "sodium-native": "^4.3.0",
    "libsodium-wrappers": "^0.7.15",
    "moment": "^2.30.1",
    "moment-duration-format": "^2.3.2",
    "ms": "^2.1.3",
    "pretty-ms": "^9.1.0",
    "chalk": "^5.3.0"
  }
}