const {ipcRenderer} = require("electron"); const packageJson = require("../../package.json") const ipc = ipcRenderer; const fs = require("fs") const closeBtn = document.getElementById("closeBtn"); const content = document.getElementById("content") const retryButtonSpan = document.getElementById("retryButtonSpan") const loadingSpan = document.getElementById("loadingSpan") const minimizeBtn = document.getElementById("minimizeBtn") document.getElementById("version").innerHTML = packageJson.version ipc.on("needRetry", () => { ipc.send("retryLogin") }) ipc.send("stateOfConnection") closeBtn.addEventListener("click", () => { ipc.send("close"); }); minimizeBtn.addEventListener("click", () => { ipc.send("minimize") }) ipc.on("connectSuccess", () => { content.innerHTML = '

Connexion vers Discord


Pour contrôler le bot, vérifie ton compte Discord !


' const discordconnect = document.getElementById("discord-connect") const discorSpan = document.getElementById("discord-span") const discordLogoSpan = document.getElementById("discordLogoSpan") discordconnect.addEventListener("click", () => { discorSpan.innerHTML = '' ipc.send("discordlogin") }) ipc.on("discordFailed", () => { discorSpan.innerHTML = '' const reDiscord = document.getElementById("discord-connect") reDiscord.addEventListener("click", () => { discordLogoSpan.innerHTML = '' discorSpan.innerHTML = '' ipc.send("discordlogin") }) }), ipc.on("discordCheckFailed", () => { discorSpan.innerHTML = '' discordLogoSpan.innerHTML = "

Vérification échouée : Vous n'êtes pas sur le serveur de Code Luc Player ou vous n'avez pas le Code Scipio

" const reDiscord = document.getElementById("discord-connect") reDiscord.addEventListener("click", () => { discordLogoSpan.innerHTML = '' discorSpan.innerHTML = '' ipc.send("discordlogin") }) }) }) ipc.on("connectFailed", () => { retryButtonSpan.innerHTML = '' loadingSpan.innerHTML = "

Echec de la connexion vers le serveur !

" const retryButton = document.getElementById("retryButton") retryButton.addEventListener("click",() => { loadingSpan.innerHTML = '' retryButtonSpan.innerHTML = "" ipc.send("retryLogin") }) })