Skip to content
This repository has been archived by the owner on Feb 18, 2023. It is now read-only.

Commit

Permalink
Releases 0.1.2
Browse files Browse the repository at this point in the history
Support Auto Update
  • Loading branch information
Faelayis committed May 9, 2022
1 parent 0bbaeb1 commit 9eb0646
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion RPCPcStatus.plugin.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* @name RPC-Pc-Status
* @version 0.1.1
* @version 0.1.2
* @author Faelayis
* @authorId 328731868096888833
* @description Rich Presence Pc Status for your Discord
Expand All @@ -14,6 +14,20 @@
let RPClient,
Interval = Number;

const changelog = {
title: "RPC Pc Status Updated",
version: "0.1.2",
changelog: [
{
title: `v0.1.2: Support Auto Update`,
type: "fixed",
items: [
"",
]
}
]
};

(() => {
const path = require("path");
const fs = require("fs");
Expand Down Expand Up @@ -3687,13 +3701,19 @@ class RPCPcStatus {
}
}
initialize() {
window.ZeresPluginLibrary?.PluginUpdater?.checkForUpdate?.("RPCPcStatus", changelog.version, "https://raw.githubusercontent.com/Faelayis/RPC-Pc-Status-BetterDiscord/main/RPCPcStatus.plugin.js");
BdApi.showToast("RPC Pc Status has started!");
this.startTime = Date.now();
this.settings = BdApi.loadData("RPCPcStatus", "settings") || {};
this.currentClientID = this.settings.clientID;
this.rpcClientInfo = {};
this.discordSetActivityHandler = null;
this.startRichPresence();
if (!this.settings.lastChangelogVersionSeen || versionCompare(changelog.version, this.settings.lastChangelogVersionSeen) === 1) {
window.ZeresPluginLibrary.Modals.showChangelogModal(changelog.title, changelog.version, changelog.changelog);
this.settings.lastChangelogVersionSeen = changelog.version;
this.updateSettings();
}
this.initialized = true;
}
async stop() {
Expand Down

0 comments on commit 9eb0646

Please sign in to comment.