Skip to content
/ mc2tg Public

A bot to synchronize messages from minecraft server to Telegram and back

License

Notifications You must be signed in to change notification settings

lilydjwg/mc2tg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Synchronize messages from minecraft server to Telegram and back

Requirement

Your minecraft server is running inside tmux.

You need Python 3.8+ and all Python libraries in requirements.txt installed. If you want to use a socks proxy, you also need to install the aiohttp-socks package.

Currently the messages are in Simplified Chinese. Contributions for other languages are welcome.

Usage

Create your bot, make group messages accessible to it, add it to your group, write a configuration file for this script (see sample-config.toml), figure out the tmux pane your minecraft is running, and then run like this (paths need to be absolute):

tmux pipe-pane -IO -o -t session:5.0 "$PWD/mc2tg.py -c $PWD/config.toml"

To get the log, you can use shell redirection. You can also create a named pipe (fifo) with mkfifo if you don't want a ever-growing log file.

tmux pipe-pane -IO -o -t session:5.0 "$PWD/mc2tg.py -c $PWD/config.toml 2>/path/to/logfile"

About

A bot to synchronize messages from minecraft server to Telegram and back

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages