statut discord
This commit is contained in:
parent
62b6ca702c
commit
e93bff1ff0
@ -82,11 +82,3 @@ client.login({clientId: "946067255295369248"}).catch(error => {
|
||||
logger.log('Unable to initialize Discord Rich Presence: ' + error.message, error)
|
||||
}
|
||||
})
|
||||
|
||||
exports.shutdownRPC = function(){
|
||||
if(!client) return
|
||||
client.clearActivity()
|
||||
client.destroy()
|
||||
client = null
|
||||
activity = null
|
||||
}
|
@ -465,7 +465,7 @@ function asyncSystemScan(mcVersion, launchAfter = true){
|
||||
// Keep reference to Minecraft Process
|
||||
let proc
|
||||
// Is DiscordRPC enabled
|
||||
let hasRPC = false
|
||||
//let hasRPC = false
|
||||
// Joined server regex
|
||||
// Change this if your server uses something different.
|
||||
const GAME_JOINED_REGEX = /\[.+\]: Sound engine started/
|
||||
@ -655,9 +655,9 @@ function dlAsync(login = true){
|
||||
|
||||
const onLoadComplete = () => {
|
||||
toggleLaunchArea(false)
|
||||
if(hasRPC){
|
||||
/*if(hasRPC){
|
||||
DiscordWrapper.updateDetails('Loading game..')
|
||||
}
|
||||
}*/
|
||||
proc.stdout.on('data', gameStateChange)
|
||||
proc.stdout.removeListener('data', tempListener)
|
||||
proc.stderr.removeListener('data', gameErrorListener)
|
||||
@ -707,10 +707,10 @@ function dlAsync(login = true){
|
||||
|
||||
setLaunchDetails('Done. Enjoy the server!')
|
||||
|
||||
// Init Discord Hook
|
||||
/*// Init Discord Hook
|
||||
const distro = DistroManager.getDistribution()
|
||||
if(distro.discord != null && serv.discord != null){
|
||||
DiscordWrapper.initRPC(distro.discord, serv.discord)
|
||||
//DiscordWrapper.initRPC(distro.discord, serv.discord)
|
||||
hasRPC = true
|
||||
proc.on('close', (code, signal) => {
|
||||
loggerLaunchSuite.log('Shutting down Discord Rich Presence..')
|
||||
@ -718,7 +718,7 @@ function dlAsync(login = true){
|
||||
hasRPC = false
|
||||
proc = null
|
||||
})
|
||||
}
|
||||
}*/
|
||||
|
||||
} catch(err) {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user