aboutsummaryrefslogtreecommitdiff
path: root/discord
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-05 17:21:23 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-05 17:21:23 +0200
commitd5a620cf09b835db2bccd99556525c90b458719f (patch)
tree1507f96be0413bd20026878890b0c1ad438e51d2 /discord
parent44210691ee8444509ac466a362337af77f2bcd49 (diff)
downloadkartik-client-d5a620cf09b835db2bccd99556525c90b458719f.tar.gz
kartik-client-d5a620cf09b835db2bccd99556525c90b458719f.tar.bz2
kartik-client-d5a620cf09b835db2bccd99556525c90b458719f.zip
i18n for 21.08
Diffstat (limited to 'discord')
-rw-r--r--discord/client.js78
1 files changed, 39 insertions, 39 deletions
diff --git a/discord/client.js b/discord/client.js
index d849ed3..63dd6db 100644
--- a/discord/client.js
+++ b/discord/client.js
@@ -1,40 +1,40 @@
-const DiscordRPC = require('discord-rpc');
-
-// Set this to your Client ID.
-const clientId = '821064368535633920';
-
-// Only needed if you want to use spectate, join, or ask to join
-DiscordRPC.register(clientId);
-
-const rpc = new DiscordRPC.Client({ transport: 'ipc' });
-const startTimestamp = new Date();
-
-async function setActivity() {
- if (!rpc) {
- return;
- }
-
- //const boops = await mainWindow.webContents.executeJavaScript('window.boops');
-
- // You'll need to have snek_large and snek_small assets uploaded to
- // https://discord.com/developers/applications/<application_id>/rich-presence/assets
- rpc.setActivity({
- details: win.ddetails,
- state: win.dstate,
- startTimestamp,
- largeImageKey: 'kartik',
- largeImageText: 'Kartik, ' + lang.game.credits.by + ' Minteck',
- smallImageKey: dimg,
- smallImageText: dchan,
- instance: false,
- });
-}
-
-rpc.on('ready', () => {
- // activity can only be set every 15 seconds
- setInterval(() => {
- setActivity();
- }, 15e3);
-});
-
+const DiscordRPC = require('discord-rpc');
+
+// Set this to your Client ID.
+const clientId = '821064368535633920';
+
+// Only needed if you want to use spectate, join, or ask to join
+DiscordRPC.register(clientId);
+
+const rpc = new DiscordRPC.Client({ transport: 'ipc' });
+const startTimestamp = new Date();
+
+async function setActivity() {
+ if (!rpc) {
+ return;
+ }
+
+ //const boops = await mainWindow.webContents.executeJavaScript('window.boops');
+
+ // You'll need to have snek_large and snek_small assets uploaded to
+ // https://discord.com/developers/applications/<application_id>/rich-presence/assets
+ rpc.setActivity({
+ details: win.ddetails,
+ state: win.dstate,
+ startTimestamp,
+ largeImageKey: 'kartik',
+ largeImageText: 'Kartik, ' + lang.game.credits.by + ' Minteck',
+ smallImageKey: dimg,
+ smallImageText: dchan,
+ instance: false,
+ });
+}
+
+rpc.on('ready', () => {
+ // activity can only be set every 15 seconds
+ setInterval(() => {
+ setActivity();
+ }, 15e3);
+});
+
rpc.login({ clientId }).catch(console.error); \ No newline at end of file