Skip to content

A bot that forwards messages from minecraft chat to telegram and vice versa.

License

Notifications You must be signed in to change notification settings

etomarat/telecraft

Repository files navigation

telecraft PRs Welcome

A bot that forwards messages from minecraft chat to telegram and vice versa.

How to install

Prerequisites

1. Installing requirements

  • Clone this repo:
git clone https://github.com/etomarat/telecraft.git && cd telecraft
  • Install dependencies
npm install

2. Setting up config file

  • Copy example settings
cp .env.example .env
  • Edit .env file with you data. For example:
HOST=localhost
PORT=25565
USERNAME="чатбот"
PASSWORD=
AUTH=
LANG_FILE="./minecraft/lang/ru_ru.json"
TELEGRAM_TOKEN="YOU TOKEN HERE"
  • PASSWORD and AUTH fields can be empty.
  • The USERNAME field supports unicode.
  • telecraft comes with two language packs: en_us and ru_ru. Need more? see this

3. Deploy

  • Localy or testing
node index.js
  • On the server side you can use for example PM2

4. How to use

  • Add your bot to group-chat or text him in a pm
  • Available command list:
/start — start forwarding messages from minecraft chat here
/stop — stop it
/say message — send message to minecraft chat
/reg username — set your username for /say , otherwise it will be username from telegram

5. Recommendation

  • Change the game mode to "spectator" for the chatbot-player so that it does not get killed. In game-console:
gamemode spectator "chatbotusername"

or

/gamemode spectator "chatbotusername"

About

A bot that forwards messages from minecraft chat to telegram and vice versa.

Topics

Resources

License

Stars

Watchers

Forks