diff options
author | destruc7i0n <6181960+destruc7i0n@users.noreply.github.com> | 2019-02-11 20:06:46 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-11 20:06:46 -0500 |
commit | 1a4acf25e38d7ecbf4018abf089ca192358b3d14 (patch) | |
tree | 3041832d99401c104cd7706c9d0a6a9db9c8ed14 /README.md | |
parent | Merge pull request #33 from destruc7i0n/webhooks (diff) | |
parent | Local file support (diff) | |
download | shulker-1a4acf25e38d7ecbf4018abf089ca192358b3d14.tar.gz shulker-1a4acf25e38d7ecbf4018abf089ca192358b3d14.zip |
Merge pull request #37 from destruc7i0n/webhooks
Local file support
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/README.md b/README.md index 43c2141..5917a3c 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ > Connects [Discord](https://discordapp.com/) and [Minecraft](https://minecraft.net) Servers by sending messages back and forth without any mods or plugins. ## In Action -![discord-irc](http://i.thedestruc7i0n.ca/I5anbg.gif) +![discord-mc](http://i.thedestruc7i0n.ca/I5anbg.gif) ## Installation and usage @@ -27,7 +27,8 @@ $ yarn $ yarn 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_SERVER_INSTALL` with the path to the Minecraft server installation, such as `/usr/home/minecraft_server/`): +If you are running this locally, check the `IS_LOCAL_FILE` flag and related options below. Otherwise, perform the following command: +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_SERVER_INSTALL` with the path to the Minecraft server installation, such as `/usr/home/minecraft_server/`): ``` sh tail -F /PATH_TO_MINECRAFT_SERVER_INSTALL/logs/latest.log | grep --line-buffered ": <" | while read x ; do echo -ne $x | curl -X POST -d @- http://YOUR_URL/minecraft/hook ; done @@ -42,15 +43,22 @@ You can also easily Deploy to Heroku and the like, just be sure to edit `YOUR_UR ```js { "PORT": 8000, /* Port you want to run the webserver for the hook on */ + "USE_WEBHOOKS": true, /* If you want to use snazzy webhooks */ "WEBHOOK_URL": "DISCORD_WEBHOOK_URL_HERE", /* Be sure to create a webhook in the channel settings and place it here! */ "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": "<channel>", /* Discord channel ID for for the discord bot. Enable developer mode in your Discord client, then right click channel and select "Copy ID". */ "DISCORD_MESSAGE_TEMPLATE": "`%username%`:%message%", /* Message template to display in Discord */ + "MINECRAFT_SERVER_RCON_IP": "127.0.0.1", /* 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 */ "MINECRAFT_TELLRAW_TEMPLATE": "[{\"color\": \"white\", \"text\": \"<%username%> %message%\"}]", /* Tellraw template to display in Minecraft */ + + "IS_LOCAL_FILE": false, /* should tail the local file, may be a little buggy. please report any you find */ + "LOCAL_FILE_PATH": "/usr/home/minecraft_server/logs/latest.log", /* the path to the local file if specified */ + "ALLOW_USER_MENTIONS": false, /* should replace @mentions with the mention in discord */ + "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 */ |