Skip to content
I am getting error = "Syntaxerror: Missing intializer in const declaration"
Profile icon
gfj126

Just help me on this to fix it :(

You are viewing a single comment. View All
Profile icon
JustCoding123

Change all the -s to =. So your code will be:

const RPC = require("discord-rpc") const client = new RPC.Client({ transport: "ipc" }) const activity = { details: "Join me", assets: { large_image: "images_512x512", large__text: "join me", small_image: "images_512x512", small_text: "just join" }, buttons: [ { "label": "Join", "url": "https" } ], timestamps: {start: Date.now()}, instance: true }; client.on("ready", () => { client.request("SET_ACTIVITY", {pid: process.pid, activity: activity}) console.log("DONE"); }) client.login({ clientId: "896042502606450698" });

(I also fixed some small errors)