payload:`var $1=$2("div",{},void 0,$2("p",{},void 0,"Something has gone very, very wrong, and Discord has crashed."),$2("p",{},void 0,"If this is the first time you've seen this error screen, reload and hope for the best. If this screen appears again, follow these steps:"),$2("p",{},void 0,"Try removing any new plugins and restarting again. If this solves the problem there may be a bug in a plugin or a conflict."),$2("p",{},void 0,"If problems continue, it's likely that there is a bug in EndPwn or Discord."),$2("p",{},void 0,"If you need help, join the EndPwn Discord server (https://discord.gg/wXdPNf2)"),$2("p",{},void 0,"Details may be available in the console (Ctrl+Shift+I), but at this level of crash we can't be certain.")),$4=$2("div",{},void 0,$2($5.default,{size:$6.ButtonSizes.LARGE,onClick:()=>window.electron.getCurrentWindow().reload()},void 0,"Reload"),$2($5.default,{size:$6.ButtonSizes.LARGE,onClick:()=>{window.$api.localStorage.set('safemode',1);window.electron.getCurrentWindow().reload()}},void 0,"Reload in safe mode"));return $2(u.default,{theme:this.props.theme,title:"Discord: Fatal Error",`
}
],
},
preload:function(){
window.reload=()=>{app.relaunch();app.exit();};
window.endpwn={
// safemode
safemode:function(){
$api.ui.showDialog({
title:'EndPwn: safe mode',
body:'This will restart your client in a state without plugin support.',
confirmText:'Yes',cancelText:'No',
onConfirm:()=>{
$api.localStorage.set('safemode',1);
window.electron.getCurrentWindow().reload();
}
});
},
// uninstaller
uninstall:function(){
$api.ui.showDialog({
title:'EndPwn: confirm uninstallation',
body:'Are you sure you want to remove EndPwn from your client? You can reinstall it at any time.',
confirmText:'Yes',cancelText:'No',
onConfirm:()=>{
vardata=$api.data;
$api.settings.set('WEBAPP_ENDPOINT');
$api.settings.set('WEBAPP_PATH');
$api.settings.set('UPDATE_ENDPOINT');
reload();
}
});
},
// endpwn customizer
customizer:krequire('customizer'),
// settings page stuff
settings:krequire('settings'),
// wrapper function for dispatch()
// intended to simplify using executeJavaScript() from other windows as a bad IPC method
// we do this since afaik we cant use electron.ipc in a useful way (maybe im wrong? if i am ill make this better later on lol)
// if the version on the server is newer, pester the user
$api.ui.showDialog({
title:'EndPwn3: EPAPI Update Available',
body:'An update to EPAPI has been released. It is recommended that you restart your client in order to gain access to new features and maintain compatibility.',
confirmText:'Restart Now',cancelText:'Later',
// user pressed "Restart Now"
onConfirm:()=>{
// refresh the page if we're running in a browser, reboot the app if we're running outside of lite mode
reload();
},
// they pressed "Later", for some reason
onCancel:()=>{
// bother them again in 6 hrs (* 60 min * 60 sec * 1000 ms)