Added display names and buttons

This commit is contained in:
NeeEoo
2024-03-24 04:24:14 +01:00
parent 9370d5da43
commit 4cc8f27734
4 changed files with 61 additions and 10 deletions
+9
View File
@@ -4,6 +4,15 @@ function onGameOver() {
DiscordUtil.changePresence('Game Over', PlayState.SONG.meta.displayName + " (" + PlayState.difficulty + ")");
}
function onDiscordPresenceUpdate(e) {
var data = e.presence;
if(data.button1Label == null)
data.button1Label = "Codename Engine Discord";
if(data.button1Url == null)
data.button1Url = "https://discord.gg/2NTCdsQvx4";
}
function onPlayStateUpdate() {
DiscordUtil.changeSongPresence(
PlayState.instance.detailsText,