This commit is contained in:
2025-05-11 07:30:13 +02:00
parent 48c5fd4ead
commit 0c01e826d9
3 changed files with 50 additions and 15 deletions

View File

@@ -3,19 +3,22 @@ const RPC = require("discord-rpc")
class DiscordRPC {
constructor() {
readonly: this.activity = {
details: "Actif dans le launcher",
details: "Officiel | Solva x Alcaz",
timestamps : { start: Date.now() },
assets: {
large_image: "logo",
large_text: "CatBoat Minecraft Launcher"
large_image: "rpc_catboat_large",
large_text: "CatBoat Launcher",
small_image : "alflamme_comm_legoshi",
small_text: "by TheAlfiTeam",
},
buttons: [
{
label: "Discord",
url: "https://discord.com/invite/catboat"
"label": "Discord",
"url": "https://discord.gg/catboat"
},
{
label: "CatBoat",
url: "https://catboat.fr/"
"label": "Download Launcher",
"url": "https://catboat.thealfigame.fr"
}
],
instance: true
@@ -30,12 +33,12 @@ class DiscordRPC {
this.client.request("SET_ACTIVITY", { pid: process.pid, activity: this.activity })
console.log("The Discord Rich Presence has been set successfully.")
})
this.client.login({ clientId: "1365563093157154868" }).catch(e => {
console.log(e)
this.client.login({ clientId: "1259291027148115988" }).catch(e => {
console.log("Silent client detected: the activity status has been disabled.")
console.log(e)
this.isEnabled = false
}).then(r => this.isEnabled = true)
.catch(err => console.log)
.catch(err => console.log(err))
}
}