chore: Prettified Code
[ci skip]
This commit is contained in:
parent
9745db748b
commit
ed7a41bf49
1 changed files with 12 additions and 12 deletions
|
@ -59,18 +59,18 @@ export default class DiscordRPC {
|
||||||
const self = this;
|
const self = this;
|
||||||
ipcMain.on("discordrpc:updateImage", async (_event, imageurl) => {
|
ipcMain.on("discordrpc:updateImage", async (_event, imageurl) => {
|
||||||
if (!this._utils.getStoreValue("general.privateEnabled")) {
|
if (!this._utils.getStoreValue("general.privateEnabled")) {
|
||||||
fetch("https://api-test.cider.sh/v1/images", {
|
fetch("https://api-test.cider.sh/v1/images", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
headers: {
|
headers: {
|
||||||
"User-Agent": this._utils.getWindow().webContents.getUserAgent(),
|
"User-Agent": this._utils.getWindow().webContents.getUserAgent(),
|
||||||
"url": imageurl
|
url: imageurl,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
.then(function (json) {
|
.then(function (json) {
|
||||||
self._attributes["artwork"]["url"] = json.imageUrl;
|
self._attributes["artwork"]["url"] = json.imageUrl;
|
||||||
self.setActivity(self._attributes);
|
self.setActivity(self._attributes);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
ipcMain.on("discordrpc:reload", (_event, configUpdate = null) => {
|
ipcMain.on("discordrpc:reload", (_event, configUpdate = null) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue