diff --git a/app/assets/js/discordwrapper.js b/app/assets/js/discordwrapper.js index f085fa8..9d88a79 100644 --- a/app/assets/js/discordwrapper.js +++ b/app/assets/js/discordwrapper.js @@ -1,5 +1,5 @@ // Work in progress -const Client = require('discord-rpc') +const {Client} = require('discord-rpc') const ConfigManager = require('./configmanager.js') let rpc @@ -11,10 +11,10 @@ exports.initRPC = function(genSettings, servSettings){ const activity = { // state = top text // details = bottom text - state: 'Server: ' + settings.shortId, - details: '', + state: 'Server: ' + servSettings.shortId, + details: 'Exploring the wall', largeImageKey: servSettings.largeImageKey, - largeImageText: serSettings.largeImageText, + largeImageText: servSettings.largeImageText, smallImageKey: genSettings.smallImageKey, smallImageText: genSettings.smallImageText, startTimestamp: new Date().getTime() / 1000, @@ -24,11 +24,11 @@ exports.initRPC = function(genSettings, servSettings){ rpc.setActivity(activity) }) - rpc.login(genSettings.clientID()).catch(error => { + rpc.login(genSettings.clientID).catch(error => { if(error.message.includes('ENOENT')) { console.log('Unable to initialize Discord Rich Presence, no client detected.') } else { - console.log('Unable to initialize Discord Rich Presence: ' + error.message) + console.log('Unable to initialize Discord Rich Presence: ' + error.message, error) } }) } diff --git a/app/assets/westeroscraft.json b/app/assets/westeroscraft.json index 948eda6..4dc353c 100644 --- a/app/assets/westeroscraft.json +++ b/app/assets/westeroscraft.json @@ -1,7 +1,7 @@ { "version": "1.0", "discord": { - "clientID": 385581240906022916, + "clientID": "385581240906022916", "smallImageText": "WesterosCraft", "smallImageKey": "seal-circle" },