disngraft is discord bot based MineCraft server manager.
It allows you to get logs and share chats between Minecraft and Discord without any plugins.
Also it contains ngrok tunnel connection so that you don't have to open the router port.
- Python3.8.x
- Java
-
Clone this repository.
git clone https://github.com/mafusuke/disngraft.git cd disngraft pip install -r requirements.txt
-
Create your Discord BOT.
Go to Discord Developer Portal and create by clicking New Application. Then click Add Bot on Bot tab.
Turn on SERVER MEMBERS INTENT and copy TOKEN.
Next open Oauth2 tab, click bot on SCOPE and Administrator on BOT PERMISSIONS. After that Copy your bot's invite url and add them into your server.
-
Get the TOKEN of Ngrok.
SignUp on Ngrok Dashboard and you will see your TOKEN on Authentication tab.
-
Setup chat channel and console channel.
Before this, you have to enable developer mode of Discord.
Copy the ID of chanel that you want to receive console logs and ID of channel you want to receive chats.
-
Customize settings.
Copy your TOKEN of ngrok and Discord BOT, channel ID of console channel and chat channel into settings.py
Also you can customize settings by editing them. Descriptions are provided to each one as comment.
-
Prepare server jar file.
Since it doesn't depends on MineCraft server's version, it doesn't contain server file.
So you have to manually place your server files inside server directory.
Here is sample directory structure:
./disngraft ├── LICENSE ├── ProcManager.py ├── README.md ├── disngraft.png ├── enums.py ├── main.py ├── regex_data.py ├── requirements.txt ├── server │ ├── banned-ips.json │ ├── banned-players.json │ ├── bukkit.yml │ ├── commands.yml │ ├── connect.json │ ├── eula.txt │ ├── help.yml │ ├── logs │ │ └── latest.log │ ├── ops.json │ ├── permissions.yml │ ├── server-icon.png │ ├── server.jar │ ├── server.properties │ ├── usercache.json │ ├── whitelist.json │ ├── world │ │ └── (Abbreviated) ├── server.py └── settings.py
-
Now ready to start!
python3 main.py
If it says Now Discord bot is ready to use! you succeeded.
Type
d?help
on your server to check usage of each command.
You can change BOT's prefix (default d?
) on settings.py
d?start
... Start the MineCraft server
d?stop
... Stop the server
d?status
... Current status of the server
d?connect <your MineCraft name>
... Connect your account with MineCraft account