function scenar(ns, emote, cb) { if (!require('@electron/remote').getCurrentWindow().voice) { return; }; min = 0; max = lang.scenario[ns].length - 1; id = Math.floor(Math.random() * (max - min + 1) + min); require('@electron/remote').getCurrentWindow().webContents.send("scenario", {message:lang.scenario[ns][id],lang:lp,namespace:ns,id:id,emote:emote,callback:cb}); }