Warning
This bot designed to work only on 1 Discord server!
enable_login_check
option in bot config!PaperMC
, Bukkit
and Spigot
Administrator
permission.*
or with *
and space if edited message should start with **
clck.ru
or tinyURL
if link longer than 256 symbols)[link](http://example.com "title")
):emoji_name:
(finds first full match, then if nothing is
found bot will try to find case-insensitive name)(xN)
, where N
is the number of these messages1.4.6
and higher
1.4.6
server started logging players' deaths1.15.0
server started logging villagers' deaths1.17.1
server started logging named mobs' deaths1.16.0
and higher1.7.2
!How bot converts mentions from Minecraft chat to Discord for game chat:
Minecraft | Discord |
---|---|
@a |
@Minecrafters |
@all |
@Minecrafters |
@e |
@everyone |
@everyone |
@everyone |
@p |
@here |
@here |
@here |
@AnyRoleOrUserMention |
@AnyRoleOrUserMention |
@Minecrafters
- an optional role in Discord for managing the Minecraft server. If not stated then bot will
mention @everyone
.
Warning
Mentions from Minecraft mustn't contain
@
in them!
If you want to see help on all bot's commands use help
command when bot is running.
Note
Some commands will require an optional role or/and an admin role if you set them in bot config.
Supported 2 languages:
1.0.0
(vanilla or a modded one)
eula
and generate server.properties
Bot can automatically enable query
and rcon
in server.properties
if file exists, but you can enable and enter them
manually if you want.
Server Members Intent
, the Presence Intent
and the Message Content Intent
in
section Privileged Gateway Intents
on the Bot tab of your bot's page on
the Discord developer's portal.Type in command prompt: (you must have requirements.txt and requirements-build.txt in root folder of the project)
pip install -r requirements.txt -r requirements-build.txt
For macOS you have to update certificates by running script /Applications/Python 3.XX/Install Certificates.command
It builds an executable file with bundled Python interpreter.
Type in command prompt make
in root directory of the project to build it.
Executable file will be in %project_root_dir%/build_dist
.
It builds an executable archive, but it requires Python to launch!
Type in command prompt make build_pyz
in root directory of the project to build it.
Executable archive will be in %project_root_dir%/build_dist
. You can launch it with a double click or via
Python - python Discord_bot.pyz
.
Warning
If you're running Minecraft server between versions
1.7.2
and1.18.0
to avoid critical security vulnerabilityLog4Shell
do instructions stated in this article!Or check if your modded server already has a patch for it!
For game chat to work properly with languages other than English, you have to have argument -Dfile.encoding=UTF-8
when
you're executing *.bat
, *.cmd
, Windows shortcut, *.sh
or *.command
script.
Just start bot executable file.
For the bot to properly start the Minecraft server you have to have *.bat
or *.cmd
script (in bot setting you can
set name for this script) in your root Minecraft server directory! Example of file:
@echo off
rem java_runtime - path to java executable or its alias, default is 'java' alias
rem If path has spaces, enclose the string in double quotes! For example: java_runtime="path to java runtime"
rem min_ram, max_ram - consists how many min and max GB you're allocating for server on start up
rem your_jar_file - jar file that starts up your server. It can be for vanilla: standard server.jar or for modded server: spigot.jar, forge.jar and etc.
rem java_parameters - parameters for Minecraft server
set java_runtime=java
set min_ram=1
set max_ram=3
set your_jar_file=server.jar
set java_parameters=
chcp 65001
cls
title Minecraft Server Console (%max_ram%Gb RAM)
%java_runtime% -Xms%min_ram%G -Xmx%max_ram%G %java_parameters% -Dfile.encoding=UTF-8 -jar %your_jar_file% nogui
exit /b
Also, if you don't want the server console to pop up in front of other windows at startup, you'll need to create shortcut by doing these steps:
*.bat
or *.cmd
file. To do so, right-click on the file, click Create Shortcut
Properties
Run
: drop down, choose Minimized
OK
After creating shortcut you can specify it as start file for bot instead of script in config setup.
On the desktop version of Linux just start bot executable file.
On the server version of Linux you have to start bot executable file using terminal with screen command! Example:
screen -dmS %your_session_name% %path_to_bot%/bot_executable_file
For the bot to properly start the Minecraft server you have to have *.sh
script (in bot setting you can set name for
this script) in your root Minecraft server directory! Example of file:
# java_runtime - path to java executable or its alias, default is 'java' alias
# min_ram, max_ram - consists how many min and max GB you're allocating for server on start up
# your_jar_file - jar file that starts up your server. It can be for vanilla: standard server.jar or for modded server: spigot.jar, forge.jar and etc.
# java_parameters - parameters for Minecraft server
java_runtime='java'
min_ram='1G'
max_ram='3G'
your_jar_file='server.jar'
java_parameters=''
exec ${java_runtime} -Xms${min_ram} -Xmx${max_ram} ${java_parameters} -Dfile.encoding=UTF-8 -jar ${your_jar_file} nogui
For server process bot will start a virtual terminal session via screen
command with name according to the selected
server's name. You can connect to it via screen -r %selected_server_session_name%
. You can find server name in list
of virtual sessions - screen -ls
.
On macOS you should start bot executable file from terminal %path_to_bot%/bot_executable_file
. Because if you just
double-click on executable file, current working directory will be set as your home directory (~
) and bot won't
find config and key in most cases.
For the bot to properly start the Minecraft server you have to have *.command
or *.sh
script (in bot setting you can
set name for this script) in your root Minecraft server directory! Example of file can be seen above in Linux
section.
For server process bot will start a virtual terminal session via screen
command with name according to the selected
server's name. You can connect to it via screen -r %selected_server_session_name%
. You can find server name in list of
virtual sessions - screen -ls
.
For adding or updating/fixing translations:
*.pot
file running
script generate_pot.py (without admin privilege!) after you added translations
in *.py
files. Otherwise, if you only want to fix translations, then skip this step.*.po
file yourself for required language or create new one in this
path: %project_root_dir%/locales/%language_code%/LC_MESSAGES/lang.po
.*.mo
file running
script generate_mo.py.On Linux or macOS you may need to install gettext
:
sudo apt install gettext
brew install gettext
p3.8
in its name)