Help for a professional Minecraft player - babushka Zina.
- python 3.7+ is recommended
- Poetry for dependency management.
$ python chat_reader.py --help
usage: Minechat client [-h] [--host HOST] [--port PORT] [--history FILEPATH]
optional arguments:
-h, --help show this help message and exit
Chat reader settings:
--host HOST Chat address (ip or host name)
--port PORT Chat port
--history FILEPATH Path to a history file, all messages will be saved there
--verbose Show more information on a screen
You can also set environmental variables:
MINECHAT_READ_HOST
- Chat address (ip or host name)MINECHAT_READ_PORT
- Chat portMINECHAT_HISTORY_PATH
- Path to a history file, all messages will be saved thereMINECHAT_READ_VERBOSE
- Show debug information on screen
The command-line arguments have more priority than environmental variables.
First of all you will need to register your username and write down your token for authentication.
$ python chat_writer.py --username "My very unique username"
> Please save this access token: 70563b20-f69c-11e9-8154-0242ac110002
With token you can send chat messages as follow:
$ python chat_writer.py --token "70563b20-f69c-11e9-8154-0242ac110002" --message "Hello everyone! Do you want to know some Minecraft secrets?"
You can also set token as environmental variables:
MINECHAT_WRITE_HOST
- Chat address (ip or host name)MINECHAT_WRITE_PORT
- Chat port for writingMINECHAT_TOKEN
- Token to access the chatMINECHAT_WRITE_VERBOSE
- Show debug information on screen
$ python chat_writer.py --help
usage: Minechat message sender [-h] [--host HOST] [--port PORT]
[--message MESSAGE] [--verbose]
[--token TOKEN | --username USERNAME]
optional arguments:
-h, --help show this help message and exit
Sender settings:
--host HOST Chat address (ip or host name)
--port PORT Chat port
--message MESSAGE Message to send
--verbose Show more information in output
--token TOKEN Authorization token
--username USERNAME Your username for register (if token is not set)
The code is written for educational purposes.