Events

A step-by-step guide on how to use events with Discord-VR!

After you’ve declared the DVRClient, you are able to use two events: ready and upvote. Here is a guide on how to use them:

dvrclient.on("ready", async () => {
    console.log("DVR Client is ready.");
});

dvrclient.on("upvote", async (info) => {
    console.log(`[${info.botlist}] Vote received! User: ${info.tag} (${info.userID}). This user has ${info.totalVotes} votes!`);
});

The ready event does not return any object, however the upvote event does, here is all the information you can get:

{
username: "3STEB4N28",
tag: "3STEB4N28#2621",
userID: 701292425624420362,
totalVotes: 0,
botlist: "top.gg"
}

For this example, we are using my data, but all the data will change depending on the user and the botlist. The botlist object will return the bot list’s URL where the upvote happened.

Last updated