Last active
October 22, 2020 21:49
-
-
Save devsnek/5fa6e13c180b6b6ea59acd6ee4c0f942 to your computer and use it in GitHub Desktop.
Discord Testers Version Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function info() { | |
const style = 'text-decoration: underline; font-weight: bold;'; | |
const chunk = Date.now(); | |
const web = typeof require === 'undefined'; | |
const version = web ? 'Web' : require("electron").remote.app.getVersion(); | |
window.webpackJsonp([chunk], { [chunk]: (a, b, r) => { | |
let raven = null; | |
for (const e of Object.values(r.c)) { | |
if (!e || !e._globalOptions) continue; | |
raven = e._globalOptions; | |
break; | |
} | |
const constants = r(0); | |
let env = constants.API_HOST.split('.')[0].toUpperCase(); | |
if (env === 'DISCORDAPP') env = 'STABLE'; | |
console.info('%cDiscord Information', style); | |
console.info('Environment:', env, web ? '(WEB)' : ''); | |
console.info('Version:', version); | |
if (raven) console.info('Build Number:', raven.release); | |
if (env !== 'STABLE' && web) console.warn('You %cshould not%c report bugs from this version of Discord', style, ''); | |
else console.info('You %cshould%c report bugs from this version of Discord', style, ''); | |
} }, [chunk]); | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment