-
pip install mcrcon
Python library for server management via RCON protocol -
Variables (file config.py)
-
YOUR_TELEGRAM_BOT_TOKEN
- Token of your Telegram bot. Receive @BotFather -
ADMINS_ID
- ID of users who have access to use the bot. If there are several, list through a symbol_
. You can get an ID at @my_id_bot -
IP_MC_SERVER
- IP address of your server -
PASS_RCON
– password for RCON connection. Configurable in the server fileserver.properties
. View screenshot -
PASS_PORT
(optional, default25575
) – port for RCON connection -
You can also change the language of the bot. The
language
variable takes the valuesua
,en
,ru
-
-
Issuing a donation
- sends the commandlp user NICKNAME parent set DONATE
.DONATE has meanings:
admin
,moder
,helper
,moderator
,yt
,default
.You can add your own privileges or change the configured ones in the file
donations.py
.To add, separated by commas: ["donate tag for the command","Donation name that will be displayed in the keyboard"].
-
Issuance of currency to the player
- sends the commandeco give NICKNAME VALUE
.VALUE accepts only numbers
-
Unban a player
- sends the commandpardon NICKNAME
. -
Ban player
- sends theban NICKNAME
command.When entering a player's nickname separated by a space, you can also enter the reason for the ban.
-
Restart server
- sends areload
command. In the next paragraph, when choosing the optionYes, I want to restart
, the commandreload confirm
will be sent -
Other commands just write to the chat with the bot:
say hello
,//help
. You can use the bot in a group. Then address like this:/say hi@bot_username
,//help@bot_username
https://github.com/DavisDmitry/TeleMCRCON - sending commands over RCON