diff --git a/TROUBLESHOOTING.md b/TROUBLESHOOTING.md new file mode 100644 index 0000000..e17a4eb --- /dev/null +++ b/TROUBLESHOOTING.md @@ -0,0 +1,16 @@ +# 💻 Troubleshooting +Having issues? Here you can find the most common issues and a way to get rid of them. + +## Errors inside the app + +**Q: I can't see my specs on Discord** +A: Check your **Activity Privacy** in your Discord app. + +**Q: I am getting a timeout error** +A: Try to restart both Discord and DiscordSpecsRP. + +**Q: My specs are incorrect, what do I do?** +A: You can either edit the values.js file or contact us with your HW specs and we will try to do our best to fix it in the next release. + +## Other errors +Getting other errors? Please post them in the Issues tab and we will try to resolve them together. diff --git a/main.js b/main.js index 1aff2c6..8f52485 100644 --- a/main.js +++ b/main.js @@ -36,15 +36,20 @@ const appVersion = "1.1.4"; const cpuPromise = new Promise((resolve, reject) => { si.cpu(function(data) { - cpuModel = Object.entries(replaceValues).reduce((acc, [key, value]) => acc.replace(key, value), data.brand); - cpuFrequency = Object.entries(replaceValues).reduce((acc, [key, value]) => acc.replace(key, value), data.speedMax.toFixed(1)); + cpuModel = Object.entries(replaceValues) + .reduce((acc, [key, value]) => acc.replace(key, value), data.brand); + + cpuFrequency = Object.entries(replaceValues) + .reduce((acc, [key, value]) => acc.replace(key, value), data.speedMax.toFixed(1)); + resolve(data.manufacturer + " " +cpuModel + " @ " + cpuFrequency + " GHz"); }); }); const gpuPromise = new Promise((resolve, reject) => { si.graphics(function(data) { - resolve(Object.entries(replaceValues).reduce((acc, [key, value]) => acc.replace(key, value), data.controllers[0].model)); + resolve(Object.entries(replaceValues) + .reduce((acc, [key, value]) => acc.replace(key, value), data.controllers[0].model)); }); }); @@ -54,7 +59,8 @@ const ramPromise = new Promise((resolve, reject) => { const osPromise = new Promise((resolve, reject) => { si.osInfo(function(data) { - resolve(data.distro + data.arch.replace('x86', '[32-bit]') + resolve(data.distro + data.arch + .replace('x86', '[32-bit]') .replace('x64', ' [64-bit]') .replace('arm64', ' [ARM 64-bit]')); }); diff --git a/values.js b/values.js index 4ded190..d8546e3 100644 --- a/values.js +++ b/values.js @@ -24,33 +24,6 @@ const replaceValues = { 'Graphics': '', '& Display': '', 'AMD': '', - // Motherboards - 'Apple': '', - 'Micro-Star': 'MSi', - 'ASUSTeK': 'ASUS', - 'COMPUTER INC.': '', - 'Gigabyte Technology Co., Ltd.': 'Gigabyte', - 'MSi International Co., Ltd': 'MSi', - // Drives - 'Samsung': '', - 'SAMSUNG': '', - 'KINGSTON': '', - 'WDC': '', - 'ATA Device': '', - 'USB Device': '', - 'SanDisk': '', - 'SANDISK': '', - 'APPLE': '', - // Network adapters - 'Gigabit': '', - 'Ethernet':'', - 'Controller':'', - 'Connection': '', - 'PCIe': '', - 'Family': '', - 'Network': '', - 'Wireless': '', - 'Version': '' }; module.exports = replaceValues; \ No newline at end of file