From 917f3297487f6c53d23b3da4fb51ee0d0c17cbd5 Mon Sep 17 00:00:00 2001 From: Ahad <86561855+CruelDev69@users.noreply.github.com> Date: Sun, 12 Jun 2022 02:30:50 +0500 Subject: [PATCH] =?UTF-8?q?=E2=99=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + config.json | 4 ++++ index.js | 35 +++++++++++++++++++++++++++++++++++ package.json | 34 ++++++++++++++++++++++++++++++++++ setup.bat | 4 ++++ start.bat | 4 ++++ 6 files changed, 82 insertions(+) create mode 100644 .gitignore create mode 100644 config.json create mode 100644 index.js create mode 100644 package.json create mode 100644 setup.bat create mode 100644 start.bat diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b512c09 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/config.json b/config.json new file mode 100644 index 0000000..d8bd3ff --- /dev/null +++ b/config.json @@ -0,0 +1,4 @@ +{ + "id": "", + "secret": "" +} \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 0000000..2686145 --- /dev/null +++ b/index.js @@ -0,0 +1,35 @@ +// Requiring dependencies. +const RPC = require("discord-rpc"); +const client = new RPC.Client({transport: "ipc" }); // Other Options: Websocket +const { id, secret } = require("./config.json"); + +// Customize your Presence +const activity = { + details: "Invite Vivre & Vivre Music Now.", + assets: { + large_image: "inshot_20211004_102237118", + large_text: "Vivre", + small_image: "vivre", + small_text: "Vivre Music" + }, + buttons: [ + { + "label": "Vivre", + "url": "https://www.vivre.cf/invite" + }, + { + "label": "Vivre Music", + "url": "https://www.vivre.cf/pages/vivre-music/invite" + } + ], + timestamps: {start: Date.now()}, + instance: true +}; + +client.on("ready", () => { + console.log("Listening on https://www.itscruel.cf"); + console.log("Made by Ahad#3257"); + client.request("SET_ACTIVITY", {pid: process.pid, activity: activity}); +}); + +client.login({clientId: id, clientSecret: secret}); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..8f2608d --- /dev/null +++ b/package.json @@ -0,0 +1,34 @@ +{ + "dependencies": { + "discord-rpc": "^4.0.1" + }, + "name": "discord-rpc", + "version": "1.0.0", + "description": "Discord RPC Made By Ahad#3257", + "main": "index.js", + "devDependencies": {}, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/CruelDev69/Discord-RPC.git" + }, + "keywords": [ + "rich-presence", + "discord", + "github", + "RPC", + "ahad", + "cruel", + "vivre", + "vivre-music", + "cool-status" + ], + "author": "Ahad#3257", + "license": "ISC", + "bugs": { + "url": "https://github.com/CruelDev69/Discord-RPC/issues" + }, + "homepage": "https://github.com/CruelDev69/Discord-RPC#readme" +} diff --git a/setup.bat b/setup.bat new file mode 100644 index 0000000..f3a0b5a --- /dev/null +++ b/setup.bat @@ -0,0 +1,4 @@ +@echo off +title Rich Presence Made By Ahad#3257 +:START +npm i \ No newline at end of file diff --git a/start.bat b/start.bat new file mode 100644 index 0000000..5df0576 --- /dev/null +++ b/start.bat @@ -0,0 +1,4 @@ +@echo off +title Rich Presence Made By Ahad#3257 +:START +node . \ No newline at end of file