Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discord Bot for Minecraft Server

English

This project is a Discord bot designed for Minecraft communities. It displays useful information, rules, IPs, links, and support to users through commands.

Main Features

  • Commands /guia, /reglas, /ip, /discord, /soporte, /tienda.
  • Responses with rich messages (embeds) and configurable data.
  • Easy to extend and maintain thanks to its modular structure.

Project Structure

bot-template-mc/
├── src/
│   ├── commands/        # Individual bot commands
│   ├── config/          # Sensitive configuration (token, IPs, etc.)
│   └── index.js         # Main bot file
├── package.json         # Dependencies and scripts
├── .gitignore           # Files to ignore in git
├── LICENSE              # Project license
└── README.md            # This file

Installation and Setup

1. Clone the repository

git clone https://github.com/FeliponsioDev/bot-template-mc
cd bot-template-mc

2. Install dependencies

npm install

3. Configure the bot

Copy the example config file and edit it:

cp src/config/config.json src/config/config.json

Edit src/config/config.json and place your Discord bot token and your server data.

Note: Do not upload your config.json to GitHub! It is already in .gitignore.

4. Start the bot locally

node src/index.js

How does the config.json file work?

The src/config/config.json file is essential for the bot's operation. Here you store all sensitive and configurable data, such as the bot token, server IPs, links, and Discord channel IDs.

If this file is not created, you can make a folder called config and create the config.json file.

Example config.json:

{
  "token": "YOUR_BOT_TOKEN_HERE",
  "ip_java": "play.yourserver.com",
  "ip_bedrock": "bedrock.yourserver.com",
  "puerto_bedrock": 19132,
  "discord_invite": "https://discord.gg/yourinvitecode",
  "tienda_url": "https://store.yourserver.com",
  "canal_ayuda": "HELP_CHANNEL_ID",
  "canal_tickets": "TICKETS_CHANNEL_ID"
}

Field explanation:

  • token: Your Discord bot token (never share or upload it to GitHub!).
  • ip_java: Your Minecraft Java server IP.
  • ip_bedrock: Your Minecraft Bedrock server IP.
  • puerto_bedrock: Your Bedrock server port (default 19132).
  • discord_invite: Invite link to your Discord server.
  • tienda_url: Link to your server's store (if you have one).
  • canal_ayuda: Discord channel ID where users can ask for help.
  • canal_tickets: Discord channel ID to create support tickets.

This file allows the bot to be easily configurable and adaptable to any community without modifying the source code.

Cloud Deployment

Render.com

  1. Create an account at Render.
  2. Create a new "Web Service" and connect your repository.
  3. In "Start Command" put:
    node src/index.js
    
  4. In "Environment" add a variable NODE_VERSION (e.g., 18 or the one you use).
  5. Upload your config.json manually from the Render dashboard (do not upload it to git).
  6. Done! The bot will run automatically.

Vercel/Netlify

Important: Vercel and Netlify are intended for web apps (HTTP), not for Discord bots that require persistent processes. They are not recommended for bots, but you can use Railway or Render for bots.

If you still want to try:

  • Use an adapter like vercel-node-server to keep the process alive (not recommended for production).
  • Upload your code and set the start command as in Render.

Adding new commands

  1. Create a .js file in src/commands/ following the format of the existing ones.
  2. The bot will load them automatically on startup.

License

This project is licensed under the MIT license. See the LICENSE file for more details.


📞 Contact

If you have questions, feel free to contact me:


Bot de Discord para Servidor de Minecraft

Español

Este proyecto es un bot de Discord diseñado para comunidades de Minecraft. Permite mostrar información útil, reglas, IPs, enlaces y soporte a los usuarios mediante comandos.

Características principales

  • Comandos /guia, /reglas, /ip, /discord, /soporte, /tienda.
  • Respuestas con mensajes enriquecidos (embeds) y datos configurables.
  • Fácil de extender y mantener gracias a su estructura modular.

Estructura del proyecto

bot-template-mc/
├── src/
│   ├── commands/        # Comandos individuales del bot
│   ├── config/          # Configuración sensible (token, IPs, etc.)
│   └── index.js         # Archivo principal del bot
├── package.json         # Dependencias y scripts
├── .gitignore           # Archivos a ignorar en git
├── LICENSE              # Licencia del proyecto
└── README.md            # Este archivo

Instalación y configuración

1. Clona el repositorio

git clone https://github.com/FeliponsioDev/bot-template-mc
cd bot-template-mc

2. Instala las dependencias

npm install

3. Configura el bot

Copia el archivo de ejemplo de configuración y edítalo:

cp src/config/config.json src/config/config.json

Edita src/config/config.json y coloca tu token de bot de Discord y los datos de tu servidor.

Nota: ¡No subas tu config.json a GitHub! Ya está en el .gitignore.

4. Inicia el bot localmente

node src/index.js

¿Cómo funciona el archivo config.json?

El archivo src/config/config.json es fundamental para el funcionamiento del bot. Aquí se almacenan todos los datos sensibles y configurables, como el token del bot, las IPs de los servidores, enlaces y los IDs de canales de Discord.

Si este archivo no se cuentra creado puedes hacer una carpeta llamada config y crear el archivo config.json.

Ejemplo de config.json:

{
  "token": "AQUI_TU_TOKEN_DEL_BOT",
  "ip_java": "play.tuserver.com",
  "ip_bedrock": "bedrock.tuserver.com",
  "puerto_bedrock": 19132,
  "discord_invite": "https://discord.gg/yourinvitecode",
  "tienda_url": "https://store.tuserver.com",
  "canal_ayuda": "ID_CANAL_AYUDA",
  "canal_tickets": "ID_CANAL_TICKETS"
}

Explicación de los campos:

  • token: El token de tu bot de Discord (¡nunca lo compartas ni subas a GitHub!).
  • ip_java: IP de tu servidor de Minecraft Java.
  • ip_bedrock: IP de tu servidor de Minecraft Bedrock.
  • puerto_bedrock: Puerto de tu servidor Bedrock (por defecto 19132).
  • discord_invite: Enlace de invitación a tu servidor de Discord.
  • tienda_url: Enlace a la tienda de tu servidor (si tienes).
  • canal_ayuda: ID del canal de Discord donde los usuarios pueden pedir ayuda.
  • canal_tickets: ID del canal de Discord para crear tickets de soporte.

Este archivo permite que el bot sea fácilmente configurable y adaptable a cualquier comunidad sin necesidad de modificar el código fuente.

Despliegue en la nube

Render.com

  1. Crea una cuenta en Render.
  2. Crea un nuevo servicio de tipo "Web Service" y conecta tu repositorio.
  3. En "Start Command" pon:
    node src/index.js
    
  4. En "Environment" agrega una variable NODE_VERSION (ej: 18 o la que uses).
  5. Sube tu config.json manualmente desde el dashboard de Render (no lo subas a git).
  6. ¡Listo! El bot se ejecutará automáticamente.

Vercel/Netlify

Importante: Vercel y Netlify están pensados para apps web (HTTP), no para bots de Discord que requieren procesos persistentes. No son recomendados para bots, pero puedes usar Railway o Render para bots.

Si aún así quieres intentarlo:

  • Usa un adaptador como vercel-node-server para mantener el proceso vivo (no recomendado para producción).
  • Sube tu código y configura el comando de inicio igual que en Render.

Agregar nuevos comandos

  1. Crea un archivo .js en src/commands/ siguiendo el formato de los existentes.
  2. El bot los cargará automáticamente al iniciar.

Licencia

Este proyecto está licenciado bajo la licencia MIT. Consulta el archivo LICENSE para más detalles.


📞 Contacto

Si tienes preguntas, no dudes en contactarme:


About

Discord bot for Minecraft communities. Provides server info, rules, support, and useful links with easy-to-use commands. Modular, configurable, and ready for your server!

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages