Minecraft Chatbot
A robust solution that connects a Minecraft server with Discord. The chatbot enables dynamic community interaction and an in-game economy where players earn coins by executing commands.
Core Features
Minecraft-Discord Integration
Uses mineflayer for Minecraft and discord.js for Discord notifications (e.g. player join/leave).
[marcosgo16] has joined the server.
[chipinazo] has left the server.
In-Game Economy
Players earn 25 Coins every 8 hours with !inq and can check their balance using !bank. The economy data is stored in a MongoDB database.
Minecraft
[marcosgo16] !inq
[Minecraft Bot] marcosgo16, you have received 25 InquiCoins. Your total bank account is 25
MongoDB
_id: ObjectId('67e563d45b81ba1690ee97ba')
username: "marcosgo16"
points: 25
lastInquisition: 1743086548950
__v: 0
Automated Messaging
Sends random messages in Minecraft and welcomes players with personalized greetings.
[Bot de Minecraft] Events? But wait for Diakhaba
[Bot de Minecraft] Creator! Welcome back genius.
View Minecraft Example
Event Notifications
Announces key server events on both Minecraft and Discord, fostering an active and engaged community.
Technical Implementation
The technical implementation uses a modular Node.js architecture: mineflayer manages the Minecraft bot, while discord.js
handles Discord commands. Economy data is now stored in a MongoDB database, a NoSQL database built primarily in C++, , and all sensitive configurations
(tokens, hostnames, ports, etc.) are secured in a .env file.
Communication Flow
The communication is made from the Minecraft Server to the Discord Group Chat. The messages that are sent in the Server are moved to a private group chat of Discord where it is possible to make a fluent reading in real time of the game chat. The Discord user is able to participate into the Minecraft conversation using the !say command.
Deployment & Scalability
Bot fully deployed in Render.com , with plans to implement a private Linux server in the future to reduce maintenance costs. For persistent storage of economy data, a MongoDB free resource is used, open-source NoSQL database management system. MongoDB's flexibility and scalability allows to efficiently store and retrieve real-time user economy data without incurring additional costs. Modular architectture and cloud deployment ensuring scalability and resilience.
Project Repository
Loading repository data...