Git Product home page Git Product logo

shulker's Introduction

shulker

Connects Discord and Minecraft Servers by sending messages back and forth without any mods or plugins.

In Action

discord-irc

Installation and usage

In your Minecraft server.properties, make sure you have and restart the server:

enable-rcon=true
rcon.password=<your password>
rcon.port=<1-65535>

Clone repository onto a server, edit config.json (see below for more info) and change any options, and then, in the repository folder:

$ npm install
$ npm start

Run the following on your server hosting (in a screen/tmux session or background process, make sure to replace your YOUR_URL with whatever URL you're using (localhost:8000 if running on the same server and default config) and PATH_TO_MINECRAFT_INSTALL with the path to the Minecraft server installation, such as /usr/home/minecraft_server/):

tail -F /PATH_TO_MINECRAFT_INSTALL/logs/latest.log | grep --line-buffered ": <" | while read x ; do echo -ne $x | curl -X POST -d @- http://YOUR_URL/minecraft/hook ; done

You can also easily Deploy to Heroku or Bluemix, just be sure to edit YOUR_URL in the command to match accordingly.

Deploy to Heroku Deploy to Bluemix

Configuration

{
    "PORT": 8000, /* Port you want to run the webserver for the hook on */
    "DISCORD_TOKEN": "<12345>", /* Discord bot token. [Click here](https://discordapp.com/developers/applications/me) to create you application and add a bot to it. */
    "DISCORD_CHANNEL_ID": "<12345>", /* Discord channel ID for for the discord bot. Enable developer mode in your Discord client, then right click channel and select "Copy ID". */
    "MINECRAFT_SERVER_RCON_IP": "example.com", /* Minecraft server IP (make sure you have enabled rcon) */
    "MINECRAFT_SERVER_RCON_PORT": <1-65535>, /* Minecraft server rcon port */
    "MINECRAFT_SERVER_RCON_PASSWORD": "<your password>", /* Minecraft server rcon password */
    "WEBHOOK": "/minecraft/hook", /* Web hook, where to send the log to */
    "REGEX_MATCH_CHAT_MC": "\\[Server thread/INFO\\]: <(.*)> (.*)", /* What to match for chat (best to leave as default) */
    "REGEX_IGNORED_CHAT": "packets too frequently", /* What to ignore, you can put any regex for swear words for example and it will  be ignored */
    "DEBUG": false /* Dev debugging */
}

Tests

Run the tests with:

$ npm test

Upcoming

None

Suggestions

If you have any suggestions or feature requests, feel free to add an issue and I will take a look and possibly add it to the "Upcoming" section!

Thanks

License

ISC. See LICENSE.

shulker's People

Contributors

destruc7i0n avatar secretonline avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.