summary refs log tree commit diff homepage
path: root/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'index.js')
-rw-r--r--index.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/index.js b/index.js
index 2c21524..9f22887 100644
--- a/index.js
+++ b/index.js
@@ -48,9 +48,10 @@ shulker.on("ready", function() {
 shulker.on("message", function(message) {
     if (message.channel.id === shulker.channels.get(c.DISCORD_CHANNEL_ID).id) {
         if (message.author.id !== shulker.user.id) {
-            var data = {
-                text: "<" + message.author.username + "> " + message.cleanContent
-            };
+            var data = [
+                {color: "gray", text: "[" + message.author.username + "#" + message.author.discriminator + "] "},
+                {color: "white", text: message.cleanContent}
+            ];
             var client = new Rcon(c.MINECRAFT_SERVER_RCON_IP, c.MINECRAFT_SERVER_RCON_PORT); // create rcon client
             client.auth(c.MINECRAFT_SERVER_RCON_PASSWORD, function(err){ // only authenticate when needed
                 client.command('tellraw @a ["",' + JSON.stringify(data) + ']', function(err, resp) {